[go: up one dir, main page]

CN107291213A - Mode Selection Method, Device, Terminal, and Computer-Readable Storage Medium - Google Patents

Mode Selection Method, Device, Terminal, and Computer-Readable Storage Medium Download PDF

Info

Publication number
CN107291213A
CN107291213A CN201710633601.XA CN201710633601A CN107291213A CN 107291213 A CN107291213 A CN 107291213A CN 201710633601 A CN201710633601 A CN 201710633601A CN 107291213 A CN107291213 A CN 107291213A
Authority
CN
China
Prior art keywords
charging
frequency
mode
power saving
terminal
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
Application number
CN201710633601.XA
Other languages
Chinese (zh)
Other versions
CN107291213B (en
Inventor
张强
郭明强
石仁栋
韩通
汪昊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201710633601.XA priority Critical patent/CN107291213B/en
Publication of CN107291213A publication Critical patent/CN107291213A/en
Application granted granted Critical
Publication of CN107291213B publication Critical patent/CN107291213B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3206Monitoring of events, devices or parameters that trigger a change in power modality
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3206Monitoring of events, devices or parameters that trigger a change in power modality
    • G06F1/3212Monitoring battery levels, e.g. power saving mode being initiated when battery voltage goes below a certain level
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. Transmission Power Control [TPC] or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0251Power saving arrangements in terminal devices using monitoring of local events, e.g. events related to user activity
    • H04W52/0258Power saving arrangements in terminal devices using monitoring of local events, e.g. events related to user activity controlling an operation mode according to history or models of usage information, e.g. activity schedule or time of day
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. Transmission Power Control [TPC] or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0261Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Environmental & Geological Engineering (AREA)
  • Human Computer Interaction (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

本发明公开了一种模式选择方法、装置、终端及计算机可读存储介质。该方法包括:充电时检测终端是否处于省电模式;如果终端处于省电模式,则获取用户的使用频率;如果所述使用频率与预设频率匹配,则退出所述省电模式。本发明实施例提供的模式选择方法,能够充电时检测终端是否处于省电模式;如果终端处于省电模式,则获取用户的使用频率;如果使用频率与预设频率匹配,则退出省电模式,提高设备利用率。

The present invention discloses a mode selection method, device, terminal and computer-readable storage medium. The method comprises: detecting whether the terminal is in a power saving mode during charging; if the terminal is in the power saving mode, obtaining the user's usage frequency; if the usage frequency matches the preset frequency, exiting the power saving mode. The mode selection method provided by the embodiment of the present invention can detect whether the terminal is in a power saving mode during charging; if the terminal is in the power saving mode, obtaining the user's usage frequency; if the usage frequency matches the preset frequency, exiting the power saving mode, thereby improving the utilization rate of the device.

Description

模式选择方法、装置、终端及计算机可读存储介质Mode Selection Method, Device, Terminal, and Computer-Readable Storage Medium

技术领域technical field

本发明实施例涉及触摸屏技术,尤其涉及一种模式选择方法、装置、终端及计算机可读存储介质。Embodiments of the present invention relate to touch screen technology, and in particular to a mode selection method, device, terminal and computer-readable storage medium.

背景技术Background technique

随着智能终端发展,智能手机、平板电脑等移动终端得到普及。当智能终端剩余电量较低时,终端会启动省电模式,进而提高终端的续航时间。相关技术中,省电模式通常会在手机充电将近满电时取消省电模式,然而如此将牺牲终端性能,设备利用率低。With the development of smart terminals, mobile terminals such as smart phones and tablet computers are popularized. When the remaining power of the smart terminal is low, the terminal will start the power saving mode, thereby improving the battery life of the terminal. In related technologies, the power-saving mode usually cancels the power-saving mode when the mobile phone is nearly fully charged, however, terminal performance will be sacrificed in this way, and device utilization is low.

发明内容Contents of the invention

本发明提供一种模式选择方法、装置、终端及计算机可读存储介质,可以提高设备利用率。The invention provides a mode selection method, device, terminal and computer-readable storage medium, which can improve the utilization rate of equipment.

第一方面,本发明实施例提供了一种模式选择方法,包括:In a first aspect, an embodiment of the present invention provides a mode selection method, including:

充电时检测终端是否处于省电模式;Detect whether the terminal is in power saving mode when charging;

如果终端处于省电模式,则获取用户的使用频率;If the terminal is in the power saving mode, obtain the usage frequency of the user;

如果所述使用频率与预设频率匹配,则退出所述省电模式。If the usage frequency matches the preset frequency, exit the power saving mode.

第二方面,本发明实施例还提供了一种模式选择装置,包括:In the second aspect, the embodiment of the present invention also provides a mode selection device, including:

充电模式检测模块,充电时检测终端是否处于省电模式;The charging mode detection module detects whether the terminal is in the power saving mode during charging;

使用频率获取模块,用于如果所述充电模式检测模块检测出终端处于省电模式,则获取用户的使用频率;The frequency of use acquisition module is used to obtain the frequency of use of the user if the charging mode detection module detects that the terminal is in the power saving mode;

模式控制模块,用于如果所述使用频率获取模块获取的所述使用频率与预设频率匹配,则退出所述省电模式。A mode control module, configured to exit the power saving mode if the usage frequency acquired by the usage frequency acquisition module matches a preset frequency.

第三方面,本发明实施例还提供了一种终端,终端包括:In a third aspect, an embodiment of the present invention further provides a terminal, and the terminal includes:

一个或多个处理器;one or more processors;

存储装置,用于存储一个或多个程序,storage means for storing one or more programs,

当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现如第一方面所示的模式选择方法。When one or more programs are executed by one or more processors, the one or more processors implement the mode selection method as shown in the first aspect.

第四方面,本发明实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如第一方面所示的模式选择方法。In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the mode selection method as shown in the first aspect is implemented.

本发明实施例提供的模式选择方法,能够充电时检测终端是否处于省电模式;如果终端处于省电模式,则获取用户的使用频率;如果使用频率与预设频率匹配,则退出省电模式,提高设备利用率。The mode selection method provided by the embodiment of the present invention can detect whether the terminal is in the power saving mode when charging; if the terminal is in the power saving mode, obtain the user's usage frequency; if the usage frequency matches the preset frequency, exit the power saving mode, Improve equipment utilization.

附图说明Description of drawings

图1是本发明实施例中的一种模式选择方法的流程图;FIG. 1 is a flowchart of a mode selection method in an embodiment of the present invention;

图2是本发明实施例中的另一种模式选择方法的流程图;Fig. 2 is a flow chart of another mode selection method in the embodiment of the present invention;

图3是本发明实施例中的另一种模式选择方法的流程图;Fig. 3 is a flow chart of another mode selection method in the embodiment of the present invention;

图4是本发明实施例中的另一种模式选择方法的流程图;FIG. 4 is a flowchart of another mode selection method in an embodiment of the present invention;

图5是本发明实施例中的一种模式选择装置的结构示意图;Fig. 5 is a schematic structural diagram of a mode selection device in an embodiment of the present invention;

图6是本发明实施例中的另一种模式选择装置的结构示意图;FIG. 6 is a schematic structural diagram of another mode selection device in an embodiment of the present invention;

图7是本发明实施例中的一种终端的结构示意图。Fig. 7 is a schematic structural diagram of a terminal in an embodiment of the present invention.

具体实施方式detailed description

下面结合附图和实施例对本发明作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本发明,而非对本发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本发明相关的部分而非全部结构。The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, but not to limit the present invention. In addition, it should be noted that, for the convenience of description, only some structures related to the present invention are shown in the drawings but not all structures.

目前当智能终端剩余电量较低时,终端会启动省电模式,进而提高终端的续航时间。相关技术中,省电模式通常会在手机充电将近满电时取消省电模式,但是由于相关技术中退出省电模式的时间点为充电接近满电(如充满80%)才会退出省电模式,因此再到接近满电之前终端功能持续受到影响。此外,相关技术中还有一种省电模式为DOZE模式,但是该模式一旦接通电源便会退出。但是,在实际使用中如果终端剩余电量很低(例如5%),此时如果采用的是USB充电,则会出现用户边使用边充电时由于充电电量和耗电电量相差不多,导致终端充电速率变慢。为了解决上述问题,本发明实施例提供了一种模式选择方法,能够在USB充电或者其他充电方式时,根据用户的使用频率确定是否推迟省电模式,进而尽早合理的退出省电模式,提高设备利用率。At present, when the remaining power of the smart terminal is low, the terminal will start the power saving mode, thereby improving the battery life of the terminal. In the related technology, the power saving mode usually cancels the power saving mode when the mobile phone is nearly fully charged, but because the time point of exiting the power saving mode in the related technology is that the charging is close to full power (such as 80% full) before exiting the power saving mode , so the terminal function continues to be affected until it is close to full power. In addition, there is another power-saving mode in the related art called DOZE mode, but this mode will exit once the power is turned on. However, in actual use, if the remaining power of the terminal is very low (for example, 5%), if USB charging is used at this time, it will appear that when the user is charging while using, the charging power and power consumption are similar, resulting in a terminal charging rate slow down. In order to solve the above problems, the embodiment of the present invention provides a mode selection method, which can determine whether to postpone the power saving mode according to the user's usage frequency during USB charging or other charging methods, and then exit the power saving mode as soon as possible and reasonably, improving the performance of the device. utilization rate.

图1为本发明实施例提供的一种模式选择方法的流程图,该方法应用于具有触摸屏的终端中,例如智能手机、平板电脑、笔记本电脑等。该方法适用于终端进行充电的情况,具体包括下述步骤:FIG. 1 is a flowchart of a mode selection method provided by an embodiment of the present invention, and the method is applied to a terminal with a touch screen, such as a smart phone, a tablet computer, a notebook computer, and the like. This method is applicable to the case where the terminal is charging, and specifically includes the following steps:

步骤110、充电时检测终端是否处于省电模式。Step 110, detecting whether the terminal is in the power saving mode during charging.

省电模式是一种降低终端功耗的工作模式,该工作模式可以为减少后台数据收发,降低屏幕亮度等。示例性的,当终端电量小于预设电量后,不论是否连接到电源均启动DOZE模式。Doze模式是Android6.0上新出的一种模式,其可以在后台只有部分任务允许运行,其他都被强制停止。Doze模式通过延缓应用后台的CPU和网络活动减少电量的消耗。The power saving mode is a working mode that reduces the power consumption of the terminal. This working mode can reduce background data sending and receiving, reduce screen brightness, and so on. Exemplarily, when the power of the terminal is less than the preset power, the DOZE mode is activated regardless of whether it is connected to a power source. Doze mode is a new mode on Android 6.0, which allows only some tasks to run in the background, and the others are forcibly stopped. Doze mode reduces power consumption by delaying the CPU and network activities in the background of the application.

当终端通过连接线与电源连接后,终端能够获取到当前连接的电源类型。电源类型包括快充、普充和USB充电。快充通过提高充电电流实现快速,快充对应第一充电模式,快充充电电流大于1A。普充为通过电源适配器连接到220V的电源上,电源适配器为终端提供1A的充电电流,普充对应第二充电模式。USB充电可以将终端与个人电脑、笔记本电脑以及移动电源的USB接口连接,进而通过上述设备的USB接口进行充电。USB充电对应第三充电模式。USB充电的充电电流小于普充的充电电流,普充的充电电流小于快充充电电流。After the terminal is connected to the power supply through the connecting cable, the terminal can obtain the type of the currently connected power supply. Power types include fast charging, normal charging and USB charging. Fast charging achieves fast charging by increasing the charging current. The fast charging corresponds to the first charging mode, and the charging current of the fast charging is greater than 1A. General charging is connected to a 220V power supply through a power adapter, and the power adapter provides a charging current of 1A for the terminal, and general charging corresponds to the second charging mode. USB charging can connect the terminal with the USB interface of personal computer, notebook computer and mobile power supply, and then charge through the USB interface of the above-mentioned equipment. USB charging corresponds to the third charging mode. The charging current of USB charging is lower than that of normal charging, and the charging current of normal charging is lower than that of fast charging.

通常如果用户将终端连接到电源适配器进行普充或快充,则终端鞥能够快速进行充电,无需担心终端在充电期间耗电量过高导致充电速率过慢的问题。但是当使用USB接口充电时,由于不同的电子设备其USB接口上的电压不同,因此相应的充电电流也不同,此时如果用户使用终端则可能出现耗电量过高导致充电速率过慢的问题。基于此,如图2所示,在步骤110、充电时检测终端是否处于省电模式之前,包括:Usually, if the user connects the terminal to the power adapter for normal charging or fast charging, the terminal can be charged quickly, and there is no need to worry about the problem that the terminal consumes too much power during charging and the charging rate is too slow. However, when using the USB interface to charge, because different electronic devices have different voltages on the USB interface, the corresponding charging current is also different. At this time, if the user uses the terminal, the problem of excessive power consumption and slow charging rate may occur. . Based on this, as shown in FIG. 2, before step 110, detecting whether the terminal is in the power saving mode during charging, includes:

步骤101、当终端连接到充电设备时,获取当前充电模式。Step 101, when the terminal is connected to the charging device, obtain the current charging mode.

其中,充电模式为第一充电模式或第二充电模式或第三充电模式,第一充电模式的充电电流大于第二充电模式的充电电流,第二充电模式的充电电流大于第三充电模式的充电电流。Wherein, the charging mode is the first charging mode or the second charging mode or the third charging mode, the charging current of the first charging mode is greater than the charging current of the second charging mode, and the charging current of the second charging mode is greater than that of the third charging mode current.

第一充电模式和第二充电模式均可通过电源适配器进行充电,第三充电模式需要USB接口与非电源适配器进行连接。在安卓系统中,可通过Both the first charging mode and the second charging mode can be charged through a power adapter, and the third charging mode requires a USB interface to be connected to a non-power adapter. On Android, you can use the

在一种实现方式中,可以通过BatteryManager.BATTERY_PLUGGED_AC参数判定当前的充电模式。如果为BatteryManager.BATTERY_PLUGGED_AC,在当前处于第一充电模式或第二充电模式,如果为非BatteryManager.BATTERY_PLUGGED_AC,则确定当前处于第三充电模式。In one implementation, the current charging mode can be determined through the BatteryManager.BATTERY_PLUGGED_AC parameter. If it is BatteryManager.BATTERY_PLUGGED_AC, it is currently in the first charging mode or the second charging mode; if it is not BatteryManager.BATTERY_PLUGGED_AC, it is determined that it is currently in the third charging mode.

步骤102、如果当前充电模式为第三充电模式,判断当前剩余电量是否小于预设电量。Step 102, if the current charging mode is the third charging mode, determine whether the current remaining power is less than a preset power.

可通过action.equals(Intent.ACTION_BATTERY_CHANGED参数获取电池当前的剩余电量。在获取到当前剩余电量后,判断当前剩余电量是否小于预设电量。预设电量可以由程序员或用户进行预设值,例如预设电量为总电量的5%-20%,优选为总电量的10%。The current remaining power of the battery can be obtained through the action.equals(Intent.ACTION_BATTERY_CHANGED parameter. After obtaining the current remaining power, determine whether the current remaining power is less than the preset power. The preset power can be preset by the programmer or the user, for example The preset electricity is 5%-20% of the total electricity, preferably 10% of the total electricity.

步骤103、如果当前剩余电量小于预设电量,则进入省电模式。Step 103, if the current remaining power is less than the preset power, enter the power saving mode.

如果当前剩余电量小于预设电量,则说明当前剩余电量较低,为了保证终端能够开机运行,终端启动省电模式。省电模式可以是DOZE模式对应的省电策略。If the current remaining power is less than the preset power, it means that the current remaining power is low. In order to ensure that the terminal can be powered on and running, the terminal starts the power saving mode. The power saving mode may be a power saving strategy corresponding to the DOZE mode.

步骤104、如果当前剩余电量大于等于预设电量,则维持当前的运行状态。Step 104, if the current remaining power is greater than or equal to the preset power, maintain the current running state.

如果当前剩余电量大于等于预设电量,则说明当前剩余电量较高,能够在一定时间内维持终端的运行,终端可维持当前的运行状态。If the current remaining power is greater than or equal to the preset power, it means that the current remaining power is relatively high, and the operation of the terminal can be maintained within a certain period of time, and the terminal can maintain the current operating state.

本实施例通过对充电模式进行识别,能够确定当前连接的电源时USB电源还是电源适配器电源,进而更加准确的启动省电模式,提高设备利用率。In this embodiment, by identifying the charging mode, it is possible to determine whether the currently connected power source is a USB power source or a power adapter power source, so as to start the power saving mode more accurately and improve the utilization rate of the device.

步骤120、如果终端处于省电模式,则获取用户的使用频率。Step 120, if the terminal is in the power saving mode, acquire the frequency of use of the user.

用户的使用频率可以为用户输入的操作的数量,也可以为用户输入的触摸点的数量。The frequency of use by the user may be the number of operations input by the user, or the number of touch points input by the user.

可选的,判断前台运行的应用是否为预设应用。其中,预设应用的耗电量超过预设耗电量。如果前台运行的应用为预设应用,则获取用户在前台应用中每分钟的输入频率,将输入频率确定为使用频率。Optionally, it is determined whether the application running in the foreground is a preset application. Wherein, the power consumption of the preset application exceeds the preset power consumption. If the application running in the foreground is a preset application, the input frequency per minute of the user in the foreground application is acquired, and the input frequency is determined as the usage frequency.

可选的,应用会被设置为其运行期间屏幕常亮。比如,视频播放应用、视频聊天应用等。此时,当用户无触摸操作输入时,屏幕仍然点亮。如果用户持续输入触摸操作,则获取用户输入操作的输入频率作为使用频率。比如用户在视频播放应用中多次进行进度条的调整,或者用户在视频聊天应用中多次进行前置摄像头与后置摄像头的切换。用户输入的使用频率可以为每分钟5次或每分钟10次。Optionally, the screen is always on during the running of the application. For example, a video playback application, a video chat application, and the like. At this time, when the user does not touch the input, the screen is still on. If the user continues to input the touch operation, the input frequency of the user input operation is obtained as the usage frequency. For example, the user adjusts the progress bar multiple times in the video playing application, or the user switches the front camera and the rear camera multiple times in the video chat application. The usage frequency input by the user may be 5 times per minute or 10 times per minute.

可选的,应用在接收到用户输入的操作后,会启动后台运算处理,例如用户运行有游戏应用时,用户执行一个操作后,游戏应用不仅需要相应该操作,同时还通过运算后在屏幕中显示该操作的操作结果,同时还需要向网络侧服务器发送同步数据,进而后台耗电量较高。此时,如果用户输入了多个输入操作,则后台执行的相应操作较多,此时无法进入省电模式。此时,根据用户在屏幕中输入的触摸点的数量作为输入频率。Optionally, after the application receives the operation input by the user, it will start background calculation processing. For example, when the user runs a game application, after the user performs an operation, the game application not only needs the corresponding operation, but also performs the calculation on the screen. To display the operation result of this operation, it also needs to send synchronization data to the server on the network side, and the power consumption in the background is high. At this time, if the user inputs multiple input operations, more corresponding operations are performed in the background, and the power saving mode cannot be entered at this time. At this time, the input frequency is determined according to the number of touch points input by the user on the screen.

如果终端未处于省电模式,则说明电量充足,可以结束。或者返回执行步骤110。If the terminal is not in the power saving mode, it means that the power is sufficient and the process can be ended. Or go back to step 110.

步骤130、如果使用频率与预设频率匹配,则退出省电模式。Step 130, exit the power saving mode if the usage frequency matches the preset frequency.

对于前台运行有耗电量较高的应用,只有当用户输入频率降低时,其耗电量才能见效,因此在检测到用户的使用频率后,如果使用频率小于预设频率,则退出省电模式。否则,如果使用频率大于等于预设频率,则保持省电模式。预设频率可以由用户或程序员设置,也可以通过机器学习的方式确定。机器学习算法可以为神经网络等。For applications running in the foreground with high power consumption, the power consumption can only be effective when the user input frequency is reduced. Therefore, after detecting the user's frequency of use, if the frequency of use is less than the preset frequency, exit the power saving mode . Otherwise, if the usage frequency is greater than or equal to the preset frequency, the power saving mode will be kept. The preset frequency can be set by the user or programmer, or can be determined by machine learning. The machine learning algorithm may be a neural network or the like.

步骤140、如果使用频率与预设频率不匹配,则持续执行省电模式。Step 140, if the usage frequency does not match the preset frequency, continue to execute the power saving mode.

如果使用频率大于预设频率,则持续执行省电模式。If the frequency of use is greater than the preset frequency, the power saving mode will continue to be executed.

本发明实施例提供的模式选择方法,能够充电时检测终端是否处于省电模式;如果终端处于省电模式,则获取用户的使用频率;如果使用频率与预设频率匹配,则退出省电模式。相比相关技术中当接通电源时变退出省电模式以及当电量接近满电时退出省电模式相比,本实施例能够根据用户的实际使用频率灵活的调整退出省电模式的时间,提高设备利用率。The mode selection method provided by the embodiment of the present invention can detect whether the terminal is in the power saving mode when charging; if the terminal is in the power saving mode, obtain the user's usage frequency; if the usage frequency matches the preset frequency, exit the power saving mode. Compared with the related art that exits the power saving mode when the power is turned on and exits the power saving mode when the power is close to full, this embodiment can flexibly adjust the time to exit the power saving mode according to the user's actual frequency of use, improving equipment utilization.

在实施上述实施例的过程中发现,用户对终端的使用具有习惯性,即用户在工作日和节假日对于终端的使用频率是不同的。因此可根据当前的日期属性(工作日或节假日)确定相应的预设频率,提高退出省电模式的准确性。In the process of implementing the foregoing embodiments, it is found that users use terminals habitually, that is, users use terminals at different frequencies on weekdays and holidays. Therefore, the corresponding preset frequency can be determined according to the current date attribute (working day or holiday), so as to improve the accuracy of exiting the power saving mode.

图3为本发明实施例提供的另一种模式选择方法的流程图,作为对上述实施例的进一步说明,包括:FIG. 3 is a flow chart of another mode selection method provided by an embodiment of the present invention, as a further description of the above embodiment, including:

步骤210、充电时检测终端是否处于省电模式。Step 210, detecting whether the terminal is in the power saving mode during charging.

步骤220、如果终端处于省电模式,则获取用户的使用频率。Step 220, if the terminal is in the power saving mode, acquire the frequency of use of the user.

步骤230、根据当前时间确定当前的日期属性,日期属性包括工作日或节假日。Step 230, determine the current date attribute according to the current time, and the date attribute includes working days or holidays.

通过日历应用获取当前的日期信息,根据日期信息确定当前的日期属性。The current date information is obtained through the calendar application, and the current date attribute is determined according to the date information.

例如,通过日历应用获取当前的日期信息为周三。判断周三是否为工作日。如果是则为工作日,否则,如果为否则为节假日。For example, the current date information obtained through the calendar application is Wednesday. Determine whether Wednesday is a working day. If yes then it is a weekday, otherwise, if otherwise it is a holiday.

步骤240、获取日期属性对应的预设频率。Step 240, acquiring the preset frequency corresponding to the date attribute.

分别预设工作日对应预设频率以及借节日对应的预设频率,并对设置的数据进行存储。当步骤230确定了当前的日期属性时,读取与当前日期属性对应的预存储的预设频率。工作日对应预设频率低于借节日对应的预设频率。The preset frequencies corresponding to weekdays and holidays are respectively preset, and the set data are stored. When the current date attribute is determined in step 230, the pre-stored preset frequency corresponding to the current date attribute is read. The preset frequency corresponding to weekdays is lower than the preset frequency corresponding to holidays.

步骤250、如果使用频率与预设频率匹配,则退出省电模式。Step 250, if the usage frequency matches the preset frequency, exit the power saving mode.

步骤260、如果使用频率与预设频率不匹配,则持续执行省电模式。Step 260, if the usage frequency does not match the preset frequency, continue to execute the power saving mode.

本实施例提供的技术方案,能够根据工作日和节假日用户不同的操作习惯,设置不同的预设频率,进而更加准确地推出省电模式,进一步提高设备利用率。The technical solution provided by this embodiment can set different preset frequencies according to different operating habits of users on weekdays and holidays, and then launch a power-saving mode more accurately, further improving equipment utilization.

在一个使用场景中,如图4所示,预设使用频率的确定不仅可以通过工作日或节假日来计算,还可以通过平均值进行计算,具体方案如下:In a usage scenario, as shown in Figure 4, the determination of the preset usage frequency can be calculated not only by working days or holidays, but also by the average value. The specific scheme is as follows:

步骤310、充电时检测终端是否处于省电模式。Step 310, detecting whether the terminal is in the power saving mode during charging.

步骤320、如果终端处于省电模式,则获取用户的使用频率。Step 320, if the terminal is in the power saving mode, acquire the frequency of use of the user.

步骤330、获取当前用户在至少两个充电时段中的使用频率。Step 330 , acquiring the usage frequency of the current user in at least two charging periods.

终端可以为不同的用户设置不同的预设频率,原因在于不同的用户其使用的应用不同,且对于相同应用不同用户的操作内容不同。不同用户的可通过当前登录的账户进行识别,或者根据用户输入的绑定指纹进行识别。The terminal may set different preset frequencies for different users, because different users use different applications, and different users have different operation contents for the same application. Different users can be identified by the account currently logged in, or by the bound fingerprint entered by the user.

不同用户对应的预设频率可以通过下述任意一种方式进行实施:The preset frequencies corresponding to different users can be implemented in any of the following ways:

可选的,获取至少两天中相同的第一充电时间段对应的使用频率,第一充电时间段包含当前时间信息。Optionally, the frequency of use corresponding to the same first charging time period in at least two days is acquired, and the first charging time period includes current time information.

获取连续至少两天相同充电时间段对应的使用频率。或者,获取非连续的至少两天相同充电时间段中相同应用对应的使用频率,相同应用为当前的前台应用。Obtain the usage frequency corresponding to the same charging period for at least two consecutive days. Alternatively, the use frequency corresponding to the same application in the same charging time period of at least two non-consecutive days is acquired, and the same application is the current foreground application.

可选的,获取一天中多个第二充电时间段对应的使用频率。Optionally, use frequencies corresponding to multiple second charging time periods in a day are acquired.

获取一天从早上(如8:00)到晚上(22:00)期间的多个第二充电时间段中的使用频率。The frequency of use in multiple second charging time periods during a day from morning (eg 8:00) to night (22:00) is acquired.

步骤340、根据至少两个充电时段中的使用频率确定平均使用频率。Step 340. Determine an average usage frequency according to the usage frequencies in at least two charging periods.

求取获取到的多个使用频率的平均值,作为预设使用频率。Calculate the average value of the obtained multiple usage frequencies as the preset usage frequency.

步骤350、如果使用频率与平均使用频率匹配,则退出省电模式。Step 350, if the usage frequency matches the average usage frequency, exit the power saving mode.

本实施例能够根据具有共性的多个充电时间段中获取用户的使用频率,并根据获取到的历史使用频率确定适合当前用户的预设适应频率,进一步提高退出省电模式的准确度,提高设备利用率。This embodiment can obtain the user's use frequency in multiple charging time periods with common characteristics, and determine the preset adaptive frequency suitable for the current user according to the obtained historical use frequency, further improve the accuracy of exiting the power saving mode, and improve the accuracy of the device. utilization rate.

图5为本发明实施例提供的一种模式选择装置的结构示意图,该装置用于实现上述实施例上述的方法,该装置位于移动终端中,包括:FIG. 5 is a schematic structural diagram of a mode selection device provided by an embodiment of the present invention. The device is used to implement the method in the above embodiment. The device is located in a mobile terminal and includes:

充电模式检测模块410,充电时检测终端是否处于省电模式;The charging mode detection module 410 detects whether the terminal is in the power saving mode during charging;

使用频率获取模块420,用于如果充电模式检测模块410检测出终端处于省电模式,则获取用户的使用频率;The frequency of use acquisition module 420 is used to obtain the frequency of use of the user if the charging mode detection module 410 detects that the terminal is in the power saving mode;

模式控制模块430,用于如果使用频率获取模块420获取的使用频率与预设频率匹配,则退出省电模式。The mode control module 430 is configured to exit the power saving mode if the usage frequency acquired by the usage frequency acquisition module 420 matches the preset frequency.

进一步的,如图6所示,还包括充电模式获取模块440。Further, as shown in FIG. 6 , a charging mode acquiring module 440 is also included.

充电模式获取模块440用于:当终端连接到充电设备时,获取当前充电模式,充电模式为第一充电模式或第二充电模式或第三充电模式,第一充电模式的充电电流大于第二充电模式的充电电流,第二充电模式的充电电流大于第三充电模式的充电电流;The charging mode acquiring module 440 is used to: when the terminal is connected to the charging device, acquire the current charging mode, the charging mode is the first charging mode or the second charging mode or the third charging mode, and the charging current of the first charging mode is greater than that of the second charging mode The charging current of the mode, the charging current of the second charging mode is greater than the charging current of the third charging mode;

模式控制模块430还用于,如果当前充电模式为第三充电模式,判断当前剩余电量是否小于预设电量;如果当前剩余电量小于预设电量,则进入省电模式。The mode control module 430 is also used for, if the current charging mode is the third charging mode, judge whether the current remaining power is less than the preset power; if the current remaining power is less than the preset power, enter the power saving mode.

进一步的,还包括预设频率确定模块450。Further, a preset frequency determining module 450 is also included.

预设频率确定模块450用于:根据当前时间确定当前的日期属性,日期属性包括工作日或节假日;获取日期属性对应的预设频率。The preset frequency determination module 450 is configured to: determine the current date attribute according to the current time, and the date attribute includes weekdays or holidays; and acquire the preset frequency corresponding to the date attribute.

进一步的,使用频率获取模块420用于:Further, the frequency acquisition module 420 is used for:

判断前台运行的应用是否为预设应用,预设应用的耗电量超过预设耗电量;Determine whether the application running in the foreground is a default application, and the power consumption of the default application exceeds the preset power consumption;

如果前台运行的应用为预设应用,则获取用户在前台应用中每分钟的输入频率,将输入频率确定为使用频率。If the application running in the foreground is a preset application, the input frequency per minute of the user in the foreground application is acquired, and the input frequency is determined as the usage frequency.

进一步的,预设频率确定模块450还用于:Further, the preset frequency determination module 450 is also used for:

获取当前用户在至少两个充电时段中的使用频率;Obtain the usage frequency of the current user in at least two charging periods;

根据至少两个充电时段中的使用频率确定平均使用频率;determining an average frequency of use based on the frequency of use in at least two charging periods;

相应的,模式控制模块430用于,如果使用频率与平均使用频率匹配,则退出省电模式。Correspondingly, the mode control module 430 is configured to exit the power saving mode if the usage frequency matches the average usage frequency.

进一步的,预设频率确定模块450用于:获取至少两天中相同的第一充电时间段对应的使用频率,第一充电时间段包含当前时间信息;或者,获取一天中多个第二充电时间段对应的使用频率。Further, the preset frequency determination module 450 is configured to: obtain the frequency of use corresponding to the same first charging time period in at least two days, the first charging time period includes current time information; or obtain multiple second charging times in one day The frequency of use corresponding to the segment.

进一步的,模式控制模块430用于,如果使用频率小于预设频率,则退出省电模式。Further, the mode control module 430 is configured to exit the power saving mode if the usage frequency is lower than the preset frequency.

本发明实施例提供的模式选择装置,充电模式检测模块410能够充电时检测终端是否处于省电模式;使用频率获取模块420在终端处于省电模式时,获取用户的使用频率;模式控制模块430在使用频率与预设频率匹配时,退出省电模式。相比相关技术中当接通电源时变退出省电模式以及当电量接近满电时退出省电模式相比,本实施例能够根据用户的实际使用频率灵活的调整退出省电模式的时间,提高设备利用率。In the mode selection device provided by the embodiment of the present invention, the charging mode detection module 410 can detect whether the terminal is in the power saving mode when charging; the usage frequency acquisition module 420 acquires the user's usage frequency when the terminal is in the power saving mode; the mode control module 430 is in the When the frequency of use matches the preset frequency, exit the power saving mode. Compared with the related art that exits the power saving mode when the power is turned on and exits the power saving mode when the power is close to full, this embodiment can flexibly adjust the time to exit the power saving mode according to the user's actual frequency of use, improving equipment utilization.

上述装置可执行本发明前述所有实施例所提供的方法,具备执行上述方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本发明前述所有实施例所提供的方法。The above-mentioned device can execute the methods provided by all the foregoing embodiments of the present invention, and has corresponding functional modules and advantageous effects for executing the above-mentioned methods. For technical details not described in detail in this embodiment, reference may be made to the methods provided in all the foregoing embodiments of the present invention.

图7为本发明实施例提供的一种终端的结构示意图。如图7所示,该终端可以包括:壳体(图中未示出)、第一存储器501、第一中央处理器(Central Processing Unit,CPU)502(又称第一处理器,以下简称CPU)、存储在第一存储器501上并可在第一处理器502上运行的计算机程序、电路板(图中未示出)和电源电路(图中未示出)。上述电路板安置在上述壳体围成的空间内部;上述CPU502和上述第一存储器501设置在上述电路板上;上述电源电路,用于为上述终端的各个电路或器件供电;上述第一存储器501,用于存储可执行程序代码;上述CPU502通过读取上述第一存储器501中存储的可执行程序代码来运行与上述可执行程序代码对应的程序,以用于执行:FIG. 7 is a schematic structural diagram of a terminal provided by an embodiment of the present invention. As shown in FIG. 7, the terminal may include: a housing (not shown in the figure), a first memory 501, a first central processing unit (Central Processing Unit, CPU) 502 (also known as the first processor, hereinafter referred to as CPU) ), a computer program stored on the first memory 501 and operable on the first processor 502, a circuit board (not shown in the figure) and a power supply circuit (not shown in the figure). The above-mentioned circuit board is placed inside the space surrounded by the above-mentioned housing; the above-mentioned CPU502 and the above-mentioned first memory 501 are arranged on the above-mentioned circuit board; the above-mentioned power supply circuit is used to supply power to each circuit or device of the above-mentioned terminal; the above-mentioned first memory 501 , for storing executable program codes; the above-mentioned CPU 502 runs the program corresponding to the above-mentioned executable program codes by reading the executable program codes stored in the above-mentioned first memory 501, so as to perform:

充电时检测终端是否处于省电模式;Detect whether the terminal is in power saving mode when charging;

如果终端处于省电模式,则获取用户的使用频率;If the terminal is in the power saving mode, obtain the usage frequency of the user;

如果使用频率与预设频率匹配,则退出省电模式。If the frequency of use matches the preset frequency, the power saving mode will be exited.

上述终端还包括:外设接口503、RF(Radio Frequency,射频)电路505、音频电路506、扬声器511、电源管理芯片508、输入/输出(I/O)子系统509、触摸屏512、其他输入/控制设备510以及外部端口504,这些部件通过一个或多个通信总线或信号线507来通信。The terminal above also includes: peripheral interface 503, RF (Radio Frequency, radio frequency) circuit 505, audio circuit 506, speaker 511, power management chip 508, input/output (I/O) subsystem 509, touch screen 512, other input/output Control device 510 and external port 504 , these components communicate via one or more communication buses or signal lines 507 .

此外,终端还包括摄像头和RGB光线传感器。RGB光线传感器位于摄像头旁边,可以与摄像头相邻设置。摄像头可以为前置摄像头也可以为后置摄像头。RGB光线传感器还可以与摄像头分离配置,例如配置在终端侧边的窄边上等。In addition, the terminal also includes a camera and an RGB light sensor. The RGB light sensor is located next to the camera and can be set adjacent to the camera. The camera can be a front camera or a rear camera. The RGB light sensor can also be configured separately from the camera, for example, configured on a narrow side of the terminal side.

应该理解的是,图示终端500仅仅是终端的一个范例,并且终端500可以具有比图中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。It should be understood that the illustrated terminal 500 is only one example of a terminal, and that the terminal 500 may have more or fewer components than shown, may combine two or more components, or may have Different component configurations. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and/or application specific integrated circuits.

下面就本实施例提供的用于实现控制门铃的终端进行详细的描述,该终端以智能手机为例。The terminal for controlling the doorbell provided in this embodiment will be described in detail below, and the terminal takes a smart phone as an example.

第一存储器501,上述第一存储器501可以被CPU502、外设接口503等访问,上述第一存储器501可以包括高速随机存取第一存储器,还可以包括非易失性第一存储器,例如一个或多个磁盘第一存储器件、闪存器件、或其他易失性固态第一存储器件。The first memory 501, the above-mentioned first memory 501 can be accessed by the CPU 502, the peripheral interface 503, etc., the above-mentioned first memory 501 can include a high-speed random access first memory, and can also include a non-volatile first memory, such as one or A plurality of magnetic disk first storage devices, flash memory devices, or other volatile solid state first storage devices.

外设接口503,上述外设接口503可以将设备的输入和输出外设连接到CPU502和第一存储器501。Peripheral interface 503 , the above-mentioned peripheral interface 503 can connect the input and output peripherals of the device to the CPU 502 and the first memory 501 .

I/O子系统509,上述I/O子系统509可以将设备上的输入输出外设,例如触摸屏512和其他输入/控制设备510,连接到外设接口503。I/O子系统509可以包括显示控制器5091和用于控制其他输入/控制设备510的一个或多个输入控制器5092。其中,一个或多个输入控制器5092从其他输入/控制设备510接收电信号或者向其他输入/控制设备510发送电信号,其他输入/控制设备510可以包括物理按钮(按压按钮、摇臂按钮等)、拨号盘、滑动开关、操纵杆、点击滚轮。值得说明的是,输入控制器5092可以与以下任一个连接:键盘、红外端口、USB接口以及诸如鼠标的指示设备。此外,其他输入/控制设备510还可以包括摄像头、指纹传感器和陀螺仪等。The I/O subsystem 509 , the above-mentioned I/O subsystem 509 can connect input and output peripherals on the device, such as a touch screen 512 and other input/control devices 510 , to the peripheral interface 503 . I/O subsystem 509 may include a display controller 5091 and one or more input controllers 5092 for controlling other input/control devices 510 . Among them, one or more input controllers 5092 receive electrical signals from or send electrical signals to other input/control devices 510, which may include physical buttons (push buttons, rocker buttons, etc.) ), dials, slide switches, joysticks, click wheels. It should be noted that the input controller 5092 can be connected to any of the following: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse. In addition, other input/control devices 510 may also include a camera, a fingerprint sensor, a gyroscope, and the like.

其中,按照触摸屏的工作原理和传输信息的介质分类,触摸屏512可以为电阻式、电容感应式、红外线式或表面声波式。按照安装方式分类,触摸屏512可以为:外挂式、内置式或整体式。按照技术原理分类,触摸屏512可以为:矢量压力传感技术触摸屏、电阻技术触摸屏、电容技术触摸屏、红外线技术触摸屏或表面声波技术触摸屏。Wherein, according to the working principle of the touch screen and the classification of the medium for transmitting information, the touch screen 512 can be a resistive type, a capacitive sensing type, an infrared type or a surface acoustic wave type. Classified according to the installation method, the touch screen 512 can be: plug-in type, built-in type or integral type. Classified according to technical principles, the touch screen 512 may be: a touch screen with vector pressure sensing technology, a touch screen with resistive technology, a touch screen with capacitive technology, a touch screen with infrared technology or a touch screen with surface acoustic wave technology.

触摸屏512,上述触摸屏512是用户终端与用户之间的输入接口和输出接口,将可视输出显示给用户,可视输出可以包括图形、文本、图标、视频等。可选的,触摸屏512将用户在触屏幕上触发的电信号(如接触面的电信号),发送给第一处理器502。The touch screen 512, the touch screen 512 is an input interface and an output interface between the user terminal and the user, and displays visual output to the user. The visual output may include graphics, text, icons, videos, etc. Optionally, the touch screen 512 sends an electrical signal triggered by the user on the touch screen (such as an electrical signal on the contact surface) to the first processor 502 .

I/O子系统509中的显示控制器5091从触摸屏512接收电信号或者向触摸屏512发送电信号。触摸屏512检测触摸屏上的接触,显示控制器5091将检测到的接触转换为与显示在触摸屏512上的用户界面对象的交互,即实现人机交互,显示在触摸屏512上的用户界面对象可以是运行游戏的图标、联网到相应网络的图标等。值得说明的是,设备还可以包括光鼠,光鼠是不显示可视输出的触摸敏感表面,或者是由触摸屏形成的触摸敏感表面的延伸。The display controller 5091 in the I/O subsystem 509 receives electrical signals from the touch screen 512 or sends electrical signals to the touch screen 512 . The touch screen 512 detects the contact on the touch screen, and the display controller 5091 converts the detected contact into an interaction with the user interface object displayed on the touch screen 512, that is, realizes human-computer interaction, and the user interface object displayed on the touch screen 512 can be a running Icons for games, icons for networking to appropriate networks, etc. It is worth noting that the device may also include an optical mouse, which is a touch-sensitive surface that does not display visual output, or that is an extension of a touch-sensitive surface formed by a touchscreen.

RF电路505,主要用于建立智能音箱与无线网络(即网络侧)的通信,实现智能音箱与无线网络的数据接收和发送。例如收发短信息、电子邮件等。The RF circuit 505 is mainly used to establish communication between the smart speaker and the wireless network (that is, the network side), and realize data reception and transmission between the smart speaker and the wireless network. Such as sending and receiving short messages, e-mails, etc.

音频电路506,主要用于从外设接口503接收音频数据,将该音频数据转换为电信号,并且将该电信号发送给扬声器511。The audio circuit 506 is mainly used to receive audio data from the peripheral interface 503 , convert the audio data into electrical signals, and send the electrical signals to the speaker 511 .

扬声器511,用于将智能音箱通过RF电路505从无线网络接收的语音信号,还原为声音并向用户播放该声音。The speaker 511 is used to restore the voice signal received by the smart speaker from the wireless network through the RF circuit 505 into sound and play the sound to the user.

电源管理芯片508,用于为CPU502、I/O子系统及外设接口所连接的硬件进行供电及电源管理。The power management chip 508 is used for power supply and power management for the hardware connected to the CPU 502 , the I/O subsystem and the peripheral interface.

在本实施例中,中央第一处理器502用于:In this embodiment, the central first processor 502 is used to:

充电时检测终端是否处于省电模式;Detect whether the terminal is in power saving mode when charging;

如果终端处于省电模式,则获取用户的使用频率;If the terminal is in the power saving mode, obtain the usage frequency of the user;

如果使用频率与预设频率匹配,则退出省电模式。If the frequency of use matches the preset frequency, the power saving mode will be exited.

进一步的,在充电时检测终端是否处于省电模式之前,还包括:Further, before detecting whether the terminal is in the power saving mode during charging, it also includes:

当终端连接到充电设备时,获取当前充电模式,充电模式为第一充电模式或第二充电模式或第三充电模式,第一充电模式的充电电流大于第二充电模式的充电电流,第二充电模式的充电电流大于第三充电模式的充电电流;When the terminal is connected to the charging device, obtain the current charging mode, the charging mode is the first charging mode or the second charging mode or the third charging mode, the charging current of the first charging mode is greater than the charging current of the second charging mode, and the second charging mode The charging current of the mode is greater than the charging current of the third charging mode;

如果当前充电模式为第三充电模式,判断当前剩余电量是否小于预设电量;If the current charging mode is the third charging mode, it is judged whether the current remaining power is less than the preset power;

如果当前剩余电量小于预设电量,则进入省电模式。If the current remaining power is less than the preset power, enter the power saving mode.

进一步的,在如果使用频率与预设频率匹配,则退出省电模式之前,还包括:Further, before exiting the power saving mode if the usage frequency matches the preset frequency, the method further includes:

根据当前时间确定当前的日期属性,日期属性包括工作日或节假日;Determine the current date attribute according to the current time, and the date attribute includes working days or holidays;

获取日期属性对应的预设频率。Get the preset frequency corresponding to the date attribute.

进一步的,获取用户的使用频率,包括:Further, obtain the user's usage frequency, including:

判断前台运行的应用是否为预设应用,预设应用的耗电量超过预设耗电量;Determine whether the application running in the foreground is a default application, and the power consumption of the default application exceeds the preset power consumption;

如果前台运行的应用为预设应用,则获取用户在前台应用中每分钟的输入频率,将输入频率确定为使用频率。If the application running in the foreground is a preset application, the input frequency per minute of the user in the foreground application is acquired, and the input frequency is determined as the usage frequency.

进一步的,在如果使用频率与预设频率匹配,则退出省电模式之前,还包括:Further, before exiting the power saving mode if the usage frequency matches the preset frequency, the method further includes:

获取当前用户在至少两个充电时段中的使用频率;Obtain the usage frequency of the current user in at least two charging periods;

根据至少两个充电时段中的使用频率确定平均使用频率;determining an average frequency of use based on the frequency of use in at least two charging periods;

相应的,如果使用频率与预设频率匹配,则退出省电模式,包括:Correspondingly, if the frequency of use matches the preset frequency, the power saving mode will be exited, including:

如果使用频率与平均使用频率匹配,则退出省电模式。If the frequency of use matches the average frequency of use, power saving mode is exited.

进一步的,获取当前用户在至少两个充电时段中的使用频率,包括:Further, the usage frequency of the current user in at least two charging periods is obtained, including:

获取至少两天中相同的第一充电时间段对应的使用频率,第一充电时间段包含当前时间信息;或者,Acquiring the frequency of use corresponding to the same first charging time period in at least two days, the first charging time period including current time information; or,

获取一天中多个第二充电时间段对应的使用频率。The frequency of use corresponding to multiple second charging time periods in a day is acquired.

进一步的,如果使用频率与预设频率匹配,则退出省电模式,包括:Further, if the frequency of use matches the preset frequency, exit the power saving mode, including:

如果使用频率小于预设频率,则退出省电模式。If the usage frequency is less than the preset frequency, exit the power saving mode.

本发明实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时可实现如下步骤:The embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the following steps can be realized:

充电时检测终端是否处于省电模式;Detect whether the terminal is in power saving mode when charging;

如果终端处于省电模式,则获取用户的使用频率;If the terminal is in the power saving mode, obtain the usage frequency of the user;

如果使用频率与预设频率匹配,则退出省电模式。If the frequency of use matches the preset frequency, the power saving mode will be exited.

进一步的,在充电时检测终端是否处于省电模式之前,还包括:Further, before detecting whether the terminal is in the power saving mode during charging, it also includes:

当终端连接到充电设备时,获取当前充电模式,充电模式为第一充电模式或第二充电模式或第三充电模式,第一充电模式的充电电流大于第二充电模式的充电电流,第二充电模式的充电电流大于第三充电模式的充电电流;When the terminal is connected to the charging device, obtain the current charging mode, the charging mode is the first charging mode or the second charging mode or the third charging mode, the charging current of the first charging mode is greater than the charging current of the second charging mode, and the second charging mode The charging current of the mode is greater than the charging current of the third charging mode;

如果当前充电模式为第三充电模式,判断当前剩余电量是否小于预设电量;If the current charging mode is the third charging mode, it is judged whether the current remaining power is less than the preset power;

如果当前剩余电量小于预设电量,则进入省电模式。If the current remaining power is less than the preset power, enter the power saving mode.

进一步的,在如果使用频率与预设频率匹配,则退出省电模式之前,还包括:Further, before exiting the power saving mode if the usage frequency matches the preset frequency, the method further includes:

根据当前时间确定当前的日期属性,日期属性包括工作日或节假日;Determine the current date attribute according to the current time, and the date attribute includes working days or holidays;

获取日期属性对应的预设频率。Get the preset frequency corresponding to the date attribute.

进一步的,获取用户的使用频率,包括:Further, obtain the user's usage frequency, including:

判断前台运行的应用是否为预设应用,预设应用的耗电量超过预设耗电量;Determine whether the application running in the foreground is a default application, and the power consumption of the default application exceeds the preset power consumption;

如果前台运行的应用为预设应用,则获取用户在前台应用中每分钟的输入频率,将输入频率确定为使用频率。If the application running in the foreground is a preset application, the input frequency per minute of the user in the foreground application is acquired, and the input frequency is determined as the usage frequency.

进一步的,在如果使用频率与预设频率匹配,则退出省电模式之前,还包括:Further, before exiting the power saving mode if the usage frequency matches the preset frequency, the method further includes:

获取当前用户在至少两个充电时段中的使用频率;Obtain the usage frequency of the current user in at least two charging periods;

根据至少两个充电时段中的使用频率确定平均使用频率;determining an average frequency of use based on the frequency of use in at least two charging periods;

相应的,如果使用频率与预设频率匹配,则退出省电模式,包括:Correspondingly, if the frequency of use matches the preset frequency, the power saving mode will be exited, including:

如果使用频率与平均使用频率匹配,则退出省电模式。If the frequency of use matches the average frequency of use, power saving mode is exited.

进一步的,获取当前用户在至少两个充电时段中的使用频率,包括:Further, the usage frequency of the current user in at least two charging periods is obtained, including:

获取至少两天中相同的第一充电时间段对应的使用频率,第一充电时间段包含当前时间信息;或者,Acquiring the frequency of use corresponding to the same first charging time period in at least two days, the first charging time period including current time information; or,

获取一天中多个第二充电时间段对应的使用频率。The frequency of use corresponding to multiple second charging time periods in a day is acquired.

进一步的,如果使用频率与预设频率匹配,则退出省电模式,包括:Further, if the frequency of use matches the preset frequency, exit the power saving mode, including:

如果使用频率小于预设频率,则退出省电模式。If the usage frequency is less than the preset frequency, exit the power saving mode.

本发明实施例的计算机存储介质,可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。The computer storage medium in the embodiments of the present invention may use any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (non-exhaustive list) of computer readable storage media include: electrical connections with one or more leads, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), Erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。A computer readable signal medium may include a data signal carrying computer readable program code in baseband or as part of a carrier wave. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. .

计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括——但不限于无线、电线、光缆、RF等等,或者上述的任意合适的组合。Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including - but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

可以以一种或多种程序设计语言或其组合来编写用于执行本发明操作的计算机程序代码,程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如”C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for carrying out the operations of the present invention may be written in one or more programming languages, or combinations thereof, including object-oriented programming languages—such as Java, Smalltalk, C++, and conventional procedural programming languages. Programming language - such as "C" or a similar programming language. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as through an Internet service provider). Internet connection).

注意,上述仅为本发明的较佳实施例及所运用技术原理。本领域技术人员会理解,本发明不限于这里上述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本发明的保护范围。因此,虽然通过以上实施例对本发明进行了较为详细的说明,但是本发明不仅仅限于以上实施例,在不脱离本发明构思的情况下,还可以包括更多其他等效实施例,而本发明的范围由所附的权利要求范围决定。Note that the above are only preferred embodiments of the present invention and applied technical principles. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described above, and various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and can also include more other equivalent embodiments without departing from the concept of the present invention, and the present invention The scope is determined by the scope of the appended claims.

Claims (10)

1.一种模式选择方法,其特征在于,包括:1. A mode selection method, characterized in that, comprising: 充电时检测终端是否处于省电模式;Detect whether the terminal is in power saving mode when charging; 如果终端处于省电模式,则获取用户的使用频率;If the terminal is in the power saving mode, obtain the usage frequency of the user; 如果所述使用频率与预设频率匹配,则退出所述省电模式。If the usage frequency matches the preset frequency, exit the power saving mode. 2.根据权利要求1所述的模式选择方法,其特征在于,在充电时检测终端是否处于省电模式之前,还包括:2. The mode selection method according to claim 1, wherein before detecting whether the terminal is in the power saving mode during charging, further comprising: 当所述终端连接到充电设备时,获取当前充电模式,所述充电模式为第一充电模式或第二充电模式或第三充电模式,所述第一充电模式的充电电流大于所述第二充电模式的充电电流,所述第二充电模式的充电电流大于所述第三充电模式的充电电流;When the terminal is connected to the charging device, obtain the current charging mode, the charging mode is the first charging mode or the second charging mode or the third charging mode, and the charging current of the first charging mode is greater than the second charging mode mode of charging current, the charging current of the second charging mode is greater than the charging current of the third charging mode; 如果当前充电模式为第三充电模式,判断当前剩余电量是否小于预设电量;If the current charging mode is the third charging mode, it is judged whether the current remaining power is less than the preset power; 如果当前剩余电量小于预设电量,则进入省电模式。If the current remaining power is less than the preset power, enter the power saving mode. 3.根据权利要求1所述的模式选择方法,其特征在于,在如果所述使用频率与预设频率匹配,则退出所述省电模式之前,还包括:3. The mode selection method according to claim 1, further comprising: before exiting the power saving mode if the frequency of use matches a preset frequency, 根据当前时间确定当前的日期属性,所述日期属性包括工作日或节假日;Determine the current date attribute according to the current time, and the date attribute includes working days or holidays; 获取所述日期属性对应的预设频率。Get the preset frequency corresponding to the date attribute. 4.根据权利要求1所述的模式选择方法,其特征在于,所述获取用户的使用频率,包括:4. The mode selection method according to claim 1, wherein said acquisition of user frequency of use comprises: 判断前台运行的应用是否为预设应用,所述预设应用的耗电量超过预设耗电量;judging whether the application running in the foreground is a preset application, and the power consumption of the preset application exceeds the preset power consumption; 如果前台运行的应用为预设应用,则获取用户在所述前台应用中每分钟的输入频率,将所述输入频率确定为使用频率。If the application running in the foreground is a preset application, the user's input frequency per minute in the foreground application is acquired, and the input frequency is determined as the usage frequency. 5.根据权利要求1所述的模式选择方法,其特征在于,在如果所述使用频率与预设频率匹配,则退出所述省电模式之前,还包括:5. The mode selection method according to claim 1, further comprising: 获取当前用户在至少两个充电时段中的使用频率;Obtain the usage frequency of the current user in at least two charging periods; 根据所述至少两个充电时段中的使用频率确定平均使用频率;determining an average frequency of use based on the frequency of use in the at least two charging periods; 相应的,所述如果所述使用频率与预设频率匹配,则退出所述省电模式,包括:Correspondingly, if the usage frequency matches the preset frequency, exiting the power saving mode includes: 如果所述使用频率与所述平均使用频率匹配,则退出所述省电模式。If the frequency of use matches the average frequency of use, exit the power saving mode. 6.根据权利要求5所述的模式选择方法,其特征在于,所述获取当前用户在至少两个充电时段中的使用频率,包括:6. The mode selection method according to claim 5, wherein said obtaining the usage frequency of the current user in at least two charging periods comprises: 获取至少两天中相同的第一充电时间段对应的使用频率,所述第一充电时间段包含当前时间信息;或者,Acquiring the frequency of use corresponding to the same first charging time period in at least two days, the first charging time period including current time information; or, 获取一天中多个第二充电时间段对应的使用频率。The frequency of use corresponding to multiple second charging time periods in a day is acquired. 7.根据权利要求1所述的模式选择方法,其特征在于,所述如果所述使用频率与预设频率匹配,则退出所述省电模式,包括:7. The mode selection method according to claim 1, wherein if the frequency of use matches a preset frequency, exiting the power saving mode comprises: 如果所述使用频率小于预设频率,则退出所述省电模式。If the usage frequency is less than the preset frequency, exit the power saving mode. 8.一种模式选择装置,其特征在于,包括:8. A mode selection device, characterized in that it comprises: 充电模式检测模块,充电时检测终端是否处于省电模式;The charging mode detection module detects whether the terminal is in the power saving mode during charging; 使用频率获取模块,用于如果所述充电模式检测模块检测出终端处于省电模式,则获取用户的使用频率;The frequency of use acquisition module is used to obtain the frequency of use of the user if the charging mode detection module detects that the terminal is in the power saving mode; 模式控制模块,用于如果所述使用频率获取模块获取的所述使用频率与预设频率匹配,则退出所述省电模式。A mode control module, configured to exit the power saving mode if the usage frequency acquired by the usage frequency acquisition module matches a preset frequency. 9.一种终端,其特征在于,所述终端包括:9. A terminal, characterized in that the terminal comprises: 一个或多个处理器;one or more processors; 存储装置,用于存储一个或多个程序,storage means for storing one or more programs, 当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-7中任一所述的模式选择方法。When the one or more programs are executed by the one or more processors, the one or more processors are made to implement the mode selection method according to any one of claims 1-7. 10.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1-7中任一所述的模式选择方法。10. A computer-readable storage medium, on which a computer program is stored, wherein, when the program is executed by a processor, the mode selection method according to any one of claims 1-7 is implemented.
CN201710633601.XA 2017-07-28 2017-07-28 Mode selection method, apparatus, terminal, and computer-readable storage medium Active CN107291213B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710633601.XA CN107291213B (en) 2017-07-28 2017-07-28 Mode selection method, apparatus, terminal, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710633601.XA CN107291213B (en) 2017-07-28 2017-07-28 Mode selection method, apparatus, terminal, and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN107291213A true CN107291213A (en) 2017-10-24
CN107291213B CN107291213B (en) 2020-06-26

Family

ID=60102568

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710633601.XA Active CN107291213B (en) 2017-07-28 2017-07-28 Mode selection method, apparatus, terminal, and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN107291213B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108647048A (en) * 2018-05-17 2018-10-12 Oppo(重庆)智能科技有限公司 Doze mode regulating methods, device, mobile terminal and storage medium
CN110427092A (en) * 2019-08-02 2019-11-08 Oppo(重庆)智能科技有限公司 Battery switching method, device, terminal and computer readable storage medium
CN112198955A (en) * 2020-10-23 2021-01-08 Tcl通讯(宁波)有限公司 Power saving processing method and device, storage medium and mobile terminal

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101102557A (en) * 2006-07-07 2008-01-09 乐金电子(昆山)电脑有限公司 Power saving deice and its method for wireless LAN of portable information terminal
CN102156531A (en) * 2010-01-04 2011-08-17 Nec爱克赛斯科技株式会社 Device and method for managing power saving functions
CN102811289A (en) * 2012-08-15 2012-12-05 东莞宇龙通信科技有限公司 Terminal and terminal power management method
CN103491262A (en) * 2013-09-24 2014-01-01 广州市久邦数码科技有限公司 Intelligent power saving mode switching system of mobile terminal
CN104113099A (en) * 2013-04-19 2014-10-22 三星电子株式会社 An electronic apparatus and a method of controlling charge
CN105244942A (en) * 2015-09-30 2016-01-13 深圳天珑无线科技有限公司 Charging current control method and mobile terminal
CN105573461A (en) * 2014-10-16 2016-05-11 中兴通讯股份有限公司 Intelligent power-saving method and device and terminal
CN106067571A (en) * 2016-07-22 2016-11-02 北京小米移动软件有限公司 Method and electronic equipment for battery charging
CN106208212A (en) * 2016-08-05 2016-12-07 北京小米移动软件有限公司 Terminal unit charge control method, device and terminal unit
CN106329644A (en) * 2016-09-13 2017-01-11 宇龙计算机通信科技(深圳)有限公司 Fast charging method and fast charging system
CN106410896A (en) * 2016-10-08 2017-02-15 惠州Tcl移动通信有限公司 Method and system for entering power-saving mode during charging of mobile terminal

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101102557A (en) * 2006-07-07 2008-01-09 乐金电子(昆山)电脑有限公司 Power saving deice and its method for wireless LAN of portable information terminal
CN102156531A (en) * 2010-01-04 2011-08-17 Nec爱克赛斯科技株式会社 Device and method for managing power saving functions
CN102811289A (en) * 2012-08-15 2012-12-05 东莞宇龙通信科技有限公司 Terminal and terminal power management method
CN102811289B (en) * 2012-08-15 2014-12-10 东莞宇龙通信科技有限公司 Terminal and power management method of same
CN104113099A (en) * 2013-04-19 2014-10-22 三星电子株式会社 An electronic apparatus and a method of controlling charge
CN103491262A (en) * 2013-09-24 2014-01-01 广州市久邦数码科技有限公司 Intelligent power saving mode switching system of mobile terminal
CN105573461A (en) * 2014-10-16 2016-05-11 中兴通讯股份有限公司 Intelligent power-saving method and device and terminal
CN105244942A (en) * 2015-09-30 2016-01-13 深圳天珑无线科技有限公司 Charging current control method and mobile terminal
CN106067571A (en) * 2016-07-22 2016-11-02 北京小米移动软件有限公司 Method and electronic equipment for battery charging
CN106208212A (en) * 2016-08-05 2016-12-07 北京小米移动软件有限公司 Terminal unit charge control method, device and terminal unit
CN106329644A (en) * 2016-09-13 2017-01-11 宇龙计算机通信科技(深圳)有限公司 Fast charging method and fast charging system
CN106410896A (en) * 2016-10-08 2017-02-15 惠州Tcl移动通信有限公司 Method and system for entering power-saving mode during charging of mobile terminal

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108647048A (en) * 2018-05-17 2018-10-12 Oppo(重庆)智能科技有限公司 Doze mode regulating methods, device, mobile terminal and storage medium
CN110427092A (en) * 2019-08-02 2019-11-08 Oppo(重庆)智能科技有限公司 Battery switching method, device, terminal and computer readable storage medium
CN112198955A (en) * 2020-10-23 2021-01-08 Tcl通讯(宁波)有限公司 Power saving processing method and device, storage medium and mobile terminal

Also Published As

Publication number Publication date
CN107291213B (en) 2020-06-26

Similar Documents

Publication Publication Date Title
US12222794B2 (en) Management of near field communications using a low power express mode of an electronic device
CN106786962B (en) Charging control method and device and terminal
CN107734616B (en) Application program closing method and device, storage medium and electronic equipment
KR102175103B1 (en) Low power driving method and electric device performing thereof
CN110320991B (en) Power management method and device for mobile terminal
CN107484231B (en) Screen parameter adjusting method, device, terminal and computer readable storage medium
WO2019024642A1 (en) Process control method and apparatus, storage medium, and electronic device
CN105630129A (en) Power control method and apparatus for reducing power consumption
CN110716631B (en) Power supply management method, device, equipment and readable storage medium
KR102151135B1 (en) Method for managing power and electronic device thereof
CN108021219A (en) Control method of electronic device, device and electronic equipment
KR20150107448A (en) Task Migration Method and Apparatus
CN106532876B (en) Power supply control method and device and computer equipment
CN107465737A (en) Data synchronization method, device, storage medium and electronic equipment
CN107402625B (en) Touch screen scanning method and device, terminal and computer readable storage medium
CN108170361A (en) Application running state control method and mobile terminal
CN107291213B (en) Mode selection method, apparatus, terminal, and computer-readable storage medium
KR101659018B1 (en) Mobile terminal and control method thereof
CN112596598B (en) Display control method, display control device and electronic device
CN107277906B (en) Mode selection method, device, terminal and computer readable storage medium
CN107239169A (en) A kind of control method and device of touch-screen touch controllable function
WO2021017823A1 (en) Charging method, electronic device and storage medium
CN106791170B (en) Network processing method, device and terminal
CN108196664A (en) Screen display method, device, storage medium and terminal
CN110708747A (en) Data transmission rate adjusting method, system, storage medium and mobile terminal

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

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., Ltd.

GR01 Patent grant
GR01 Patent grant