[go: up one dir, main page]

CN106896896A - Electricity saving method, device and electronic equipment - Google Patents

Electricity saving method, device and electronic equipment Download PDF

Info

Publication number
CN106896896A
CN106896896A CN201710063294.6A CN201710063294A CN106896896A CN 106896896 A CN106896896 A CN 106896896A CN 201710063294 A CN201710063294 A CN 201710063294A CN 106896896 A CN106896896 A CN 106896896A
Authority
CN
China
Prior art keywords
threshold
sensor
power consumption
parameter
proximity
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
CN201710063294.6A
Other languages
Chinese (zh)
Other versions
CN106896896B (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 CN201710063294.6A priority Critical patent/CN106896896B/en
Publication of CN106896896A publication Critical patent/CN106896896A/en
Application granted granted Critical
Publication of CN106896896B publication Critical patent/CN106896896B/en
Expired - Fee Related 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/3234Power saving characterised by the action undertaken
    • G06F1/325Power saving in peripheral device

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)

Abstract

本发明涉及一种省电方法、装置及电子设备,所述方法包括:获取设备功耗参数,所述设备功耗参数是指反映设备当前功耗的参数值;检测所述设备功耗参数在指定参数范围内,则将接近传感器阀值设置为传感器固定阀值,所述接近传感器阀值是指判定物体距离远近的阀值;停止更新所述接近传感器阀值。上述省电方法、装置及电子设备,节省了大量更新传感器阀值时消耗的电量,大大地降低了设备的功耗,节省了电量。

The present invention relates to a power saving method, device and electronic equipment. The method includes: acquiring a power consumption parameter of a device, the power consumption parameter of the device refers to a parameter value reflecting the current power consumption of the device; detecting that the power consumption parameter of the device is If within the specified parameter range, the threshold of the proximity sensor is set as a fixed threshold of the sensor, and the threshold of the proximity sensor refers to the threshold for determining the distance of the object; the update of the threshold of the proximity sensor is stopped. The above power saving method, device and electronic equipment save a lot of power consumption when updating the sensor threshold, greatly reduce the power consumption of the equipment, and save power.

Description

省电方法、装置及电子设备Power saving method, device and electronic equipment

技术领域technical field

本发明涉及计算机技术领域,特别是涉及省电方法、装置及电子设备。The invention relates to the technical field of computers, in particular to a power saving method, device and electronic equipment.

背景技术Background technique

作为一种工作、学习和娱乐的工具,电子设备只有在供电的情况下才能使用。外接电源可以对电子设备进行供电,在无外接电源的情况下,也可以通过电池存储的电量进行供电。通常用户在外出的时候,无法对电子设备提供外接电源,只能通过电池进行供电。然而,电池存储的电量是有限的,这样在低电量情况下使用可能会导致电子设备的突然中断,影响用户使用。As a tool for work, study and entertainment, electronic devices can only be used when they are powered. The external power supply can supply power to the electronic device, and in the absence of an external power supply, it can also be powered by the power stored in the battery. Generally, when the user is out, the electronic device cannot be provided with an external power source, and the electronic device can only be powered by a battery. However, the power stored in the battery is limited, so using it in a low power situation may cause a sudden interruption of the electronic device and affect the use of the user.

发明内容Contents of the invention

本发明实施例提供一种省电方法、装置及电子设备,可以减低电子设备的功耗,节省电量。Embodiments of the present invention provide a power saving method, device and electronic equipment, which can reduce power consumption of the electronic equipment and save power.

一种省电方法,包括:A method of saving power comprising:

获取设备功耗参数,所述设备功耗参数是指反映设备当前功耗的参数值;Obtaining a device power consumption parameter, where the device power consumption parameter refers to a parameter value reflecting the current power consumption of the device;

检测所述设备功耗参数在指定参数范围内,则将接近传感器阀值设置为传感器固定阀值,所述接近传感器阀值是指判定物体距离远近的阀值;Detecting that the power consumption parameter of the device is within the specified parameter range, then setting the threshold of the proximity sensor as a fixed threshold of the sensor, the threshold of the proximity sensor refers to the threshold for determining the distance of the object;

停止更新所述接近传感器阀值。Stop updating the proximity sensor threshold.

一种省电装置,包括:A power saving device, comprising:

参数获取模块,用于获取设备功耗参数,所述设备功耗参数是指反映设备当前功耗的参数值;A parameter acquisition module, configured to acquire a device power consumption parameter, where the device power consumption parameter refers to a parameter value reflecting the current power consumption of the device;

阀值设置模块,用于检测所述设备功耗参数在指定参数范围内,则将接近传感器阀值设置为传感器固定阀值,所述接近传感器阀值是指判定物体距离远近的阀值;The threshold setting module is used to detect that the power consumption parameter of the device is within the specified parameter range, and then set the threshold of the proximity sensor as a fixed threshold of the sensor, and the threshold of the proximity sensor refers to the threshold for determining the distance of the object;

停止更新模块,用于停止更新所述接近传感器阀值。The stop updating module is used to stop updating the proximity sensor threshold.

一种电子设备,包括存储器,处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现以下步骤:An electronic device, comprising a memory, a processor, and a computer program stored on the memory and operable on the processor, and the processor implements the following steps when executing the program:

获取设备功耗参数,所述设备功耗参数是指反映设备当前功耗的参数值;Obtaining a device power consumption parameter, where the device power consumption parameter refers to a parameter value reflecting the current power consumption of the device;

检测所述设备功耗参数在指定参数范围内,则将接近传感器阀值设置为传感器固定阀值,所述接近传感器阀值是指判定物体距离远近的阀值;Detecting that the power consumption parameter of the device is within the specified parameter range, then setting the threshold of the proximity sensor as a fixed threshold of the sensor, the threshold of the proximity sensor refers to the threshold for determining the distance of the object;

停止更新所述接近传感器阀值。Stop updating the proximity sensor threshold.

上述实施例提供的省电方法、装置及电子设备,节省了大量更新传感器阀值时消耗的电量,大大地降低了设备的功耗,节省了电量。The power saving method, device and electronic equipment provided by the above embodiments save a lot of power consumption when updating the sensor threshold, greatly reduce the power consumption of the equipment, and save power.

附图说明Description of drawings

图1为一个实施例中终端的内部结构示意图;FIG. 1 is a schematic diagram of the internal structure of a terminal in an embodiment;

图2为一个实施例中省电方法的流程图;Fig. 2 is a flow chart of the power saving method in an embodiment;

图3为另一个实施例中省电方法的流程图;Fig. 3 is the flowchart of the power saving method in another embodiment;

图4为一个实施例中省电装置的结构示意图;FIG. 4 is a schematic structural diagram of a power saving device in an embodiment;

图5为另一个实施例中省电装置的结构示意图;FIG. 5 is a schematic structural diagram of a power saving device in another embodiment;

图6为与本发明实施例提供的计算机设备相关的移动终端的部分结构的框图。Fig. 6 is a block diagram of a partial structure of a mobile terminal related to a computer device provided by an embodiment of the present invention.

具体实施方式detailed description

为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the object, technical solution and advantages of the present invention clearer, 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, not to limit the present invention.

可以理解,本发明所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。举例来说,在不脱离本发明的范围的情况下,可以将第一客户端称为第二客户端,且类似地,可将第二客户端称为第一客户端。第一客户端和第二客户端两者都是客户端,但其不是同一客户端。It can be understood that the terms "first", "second" and the like used in the present invention can be used to describe various elements herein, but these elements are not limited by these terms. These terms are only used to distinguish one element from another element. For example, a first client could be termed a second client, and, similarly, a second client could be termed a first client, without departing from the scope of the present invention. Both the first client and the second client are clients, but they are not the same client.

图1为一个实施例中终端的内部结构示意图。如图1所示,该终端包括通过系统总线连接的处理器、非易失性存储介质、内存储器、网络接口、显示屏和输入装置。其中,终端的非易失性存储介质存储有操作系统,还包括一种省电装置,该省电装置用于实现一种省电方法。该处理器用于提供计算和控制能力,支撑整个终端的运行。终端中的内存储器为非易失性存储介质中的省电装置的运行提供环境,该内存储器中可储存有计算机可读指令,该计算机可读指令被所述处理器执行时,可使得所述处理器执行一种省电方法。网络接口用于与服务器进行网络通信。终端的显示屏可以是液晶显示屏或者电子墨水显示屏等,输入装置可以是显示屏上覆盖的触摸层,也可以是终端外壳上设置的按键、轨迹球或触控板,也可以是外接的键盘、触控板或鼠标等。该终端可以是手机、平板电脑、个人数字助理或穿戴式设备等。本领域技术人员可以理解,图1中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的终端的限定,具体的终端可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Fig. 1 is a schematic diagram of the internal structure of a terminal in an embodiment. As shown in FIG. 1 , the terminal includes a processor connected through a system bus, a non-volatile storage medium, an internal memory, a network interface, a display screen and an input device. Wherein, the non-volatile storage medium of the terminal stores an operating system, and also includes a power saving device, and the power saving device is used to implement a power saving method. The processor is used to provide computing and control capabilities to support the operation of the entire terminal. The internal memory in the terminal provides an environment for the operation of the power saving device in the non-volatile storage medium. Computer-readable instructions can be stored in the internal memory. When the computer-readable instructions are executed by the processor, all The processor implements a power saving method. The network interface is used for network communication with the server. The display screen of the terminal can be a liquid crystal display screen or an electronic ink display screen, etc., and the input device can be a touch layer covered on the display screen, or a button, a trackball or a touch pad set on the terminal shell, or an external Keyboard, trackpad or mouse etc. The terminal can be a mobile phone, a tablet computer, a personal digital assistant or a wearable device, etc. Those skilled in the art can understand that the structure shown in Figure 1 is only a block diagram of a partial structure related to the solution of this application, and does not constitute a limitation on the terminals to which the solution of this application is applied. Specific terminals may include More or fewer components are shown in the figures, or certain components are combined, or have different component arrangements.

图2为一个实施例中省电方法的流程图。如图2所示,该省电方法包括步骤S202至步骤206。其中:FIG. 2 is a flowchart of a power saving method in an embodiment. As shown in FIG. 2 , the power saving method includes steps S202 to S206. in:

步骤S202,获取设备功耗参数,设备功耗参数是指反映设备当前功耗的参数值。Step S202, acquiring a device power consumption parameter, which refers to a parameter value reflecting the current power consumption of the device.

在一个实施例中,设备功耗参数是指反映设备当前功耗的参数值。例如,设备功耗参数可以是设备的当前电量值、当前处理器占有率中的一种或两种。其中,设备是指安装了接近传感器的电子设备,例如设备可以是个人电脑、移动终端、个人数字助理、可穿戴电子设备等。In one embodiment, the device power consumption parameter refers to a parameter value reflecting the current power consumption of the device. For example, the device power consumption parameter may be one or both of the current power value of the device and the current processor occupancy rate. Wherein, the device refers to an electronic device installed with a proximity sensor, for example, the device may be a personal computer, a mobile terminal, a personal digital assistant, a wearable electronic device, and the like.

步骤S204,检测设备功耗参数在指定参数范围内,则将接近传感器阀值设置为传感器固定阀值。In step S204, it is detected that the power consumption parameter of the device is within the specified parameter range, and then the threshold of the proximity sensor is set as the fixed threshold of the sensor.

在一个实施例中,指定参数范围是指预先设定的设备功耗参数的参数范围,当设备功耗参数在该指定参数范围内时,认为设备处于能量趋于耗尽的状态。例如,设备功耗参数在指定参数范围内可以是设备当前电量值低于20%,或者设备当前处理器占有率高于80%。In one embodiment, the specified parameter range refers to a preset parameter range of the power consumption parameter of the device, and when the power consumption parameter of the device is within the specified parameter range, the device is considered to be in a state where energy tends to be exhausted. For example, if the power consumption parameter of the device is within the specified parameter range, the current power value of the device is lower than 20%, or the current processor occupancy rate of the device is higher than 80%.

在一个实施例中,设备通过接近传感器按照预设的周期扫描周围的物体,并确定设备与物体之间的接近值,该接近值反映了物体到设备的距离。In one embodiment, the device scans the surrounding objects according to a preset period through the proximity sensor, and determines the proximity value between the device and the object, and the proximity value reflects the distance from the object to the device.

在一个实施例中,接近传感器阀值是指判定物体距离远近的阀值,包括接近阀值和远离阀值。当接近值小于远离阀值时,判定设备处于远离物体的状态;当接近值大于接近阀值时,判定设备处于接近物体的状态。In one embodiment, the proximity sensor threshold refers to a threshold for determining the distance of an object, including a proximity threshold and a distance threshold. When the proximity value is less than the distance threshold, it is determined that the device is in a state away from the object; when the proximity value is greater than the proximity threshold, it is determined that the device is in a state of approaching the object.

在一个实施例中,传感器固定阀值是指预先设定的固定不变的接近传感器阀值,当检测到设备功耗参数在指定参数范围内时,则将接近传感器阀值设置为传感器固定阀值。In one embodiment, the fixed threshold of the sensor refers to a preset fixed threshold of the proximity sensor. When it is detected that the power consumption parameter of the device is within the specified parameter range, the threshold of the proximity sensor is set as the fixed threshold of the sensor. value.

步骤S206,停止更新接近传感器阀值。Step S206, stop updating the proximity sensor threshold.

在一个实施例中,设备周期性地检测与周围物体的接近值,并根据每次采集的接近值动态的更新接近传感器阀值,当前采集到的接近值与上一次更新的接近传感器阀值进行比较,从而判断当前物体的远近状态。当检测设备功耗参数在指定参数范围内时,那么认为设备当前处于能量趋于耗尽的状态,则停止动态地更新接近传感器阀值,而将接近传感器阀值设置为传感器固定阀值。In one embodiment, the device periodically detects the proximity value to the surrounding objects, and dynamically updates the proximity sensor threshold value according to each collected proximity value, and the currently collected proximity value is compared with the last updated proximity sensor threshold value. Compare to judge the far and near state of the current object. When the power consumption parameter of the detection device is within the specified parameter range, it is considered that the device is currently in a state where energy tends to be exhausted, and the dynamic update of the threshold of the proximity sensor is stopped, and the threshold of the proximity sensor is set as the fixed threshold of the sensor.

本发明实施例提供的省电方法,将接近传感器阀值设置为传感器固定阀值,不再更新接近传感器阀值,节省了大量更新传感器阀值时消耗的电量,大大地降低了设备的功耗,节省了电量。In the power saving method provided by the embodiment of the present invention, the threshold value of the proximity sensor is set as the fixed threshold value of the sensor, and the threshold value of the proximity sensor is no longer updated, which saves a lot of power consumption when updating the threshold value of the sensor, and greatly reduces the power consumption of the device , saving power.

图3为另一个实施例中省电方法的流程图。如图3所示,该省电方法包括步骤S302至步骤310。其中:FIG. 3 is a flowchart of a power saving method in another embodiment. As shown in FIG. 3 , the power saving method includes step S302 to step 310 . in:

步骤S302,获取设备功耗参数,设备功耗参数是指反映设备当前功耗的参数值。Step S302, acquiring a device power consumption parameter, where the device power consumption parameter refers to a parameter value reflecting the current power consumption of the device.

在一个实施例中,设备功耗参数是指反映设备当前功耗的参数值。例如,设备功耗参数可以是设备的当前电量值、当前处理器占有率中的一种或两种。其中,设备是指安装了接近传感器的电子设备,例如设备可以是个人电脑、移动终端、个人数字助理、可穿戴电子设备等。In one embodiment, the device power consumption parameter refers to a parameter value reflecting the current power consumption of the device. For example, the device power consumption parameter may be one or both of the current power value of the device and the current processor occupancy rate. Wherein, the device refers to an electronic device installed with a proximity sensor, for example, the device may be a personal computer, a mobile terminal, a personal digital assistant, a wearable electronic device, and the like.

可以理解的是,设备的当前电量值是指反映设备当前电量的值,设备的当前处理器占有率是指反映设备当前运行的程序在处理器中的资源使用率的值。当前电量值越低、当前处理器占有率越高,则设备当前功率消耗越高。It can be understood that the current power value of the device refers to a value that reflects the current power of the device, and the current processor occupancy rate of the device refers to a value that reflects the resource usage rate of the program currently running on the device in the processor. The lower the current power value and the higher the current processor occupancy rate, the higher the current power consumption of the device.

步骤S304,检测设备功耗参数超出指定参数范围,则获取接近传感器采集的接近值。Step S304, detecting that the power consumption parameter of the device exceeds the specified parameter range, and obtaining the proximity value collected by the proximity sensor.

在一个实施例中,指定参数范围是指预先设定的设备功耗参数的参数范围,当设备功耗参数在该指定参数范围内时,则认为设备处于能量趋于耗尽的状态;当设备功耗参数超出该指定参数范围时,则认为设备处于能量充足的状态。In one embodiment, the specified parameter range refers to the parameter range of a preset device power consumption parameter. When the device power consumption parameter is within the specified parameter range, the device is considered to be in a state where energy tends to be exhausted; when the device When the power consumption parameter exceeds the specified parameter range, the device is considered to be in a state of sufficient energy.

在一个实施例中,设备通过接近传感器按照预设的周期扫描周围的物体,并确定设备与物体之间的接近值,该接近值反映了物体到设备的距离。接近传感器阀值是指判定物体距离远近状态的阀值,包括接近阀值和远离阀值。当接近值小于远离阀值时,判定设备处于远离物体的状态;当接近值大于接近阀值时,判定设备处于接近物体的状态。In one embodiment, the device scans the surrounding objects according to a preset period through the proximity sensor, and determines the proximity value between the device and the object, and the proximity value reflects the distance from the object to the device. The proximity sensor threshold refers to the threshold for judging the distance of an object, including the proximity threshold and the distance threshold. When the proximity value is less than the distance threshold, it is determined that the device is in a state away from the object; when the proximity value is greater than the proximity threshold, it is determined that the device is in a state of approaching the object.

步骤S306,根据接近值确定传感器动态阀值,并根据传感器动态阀值获取传感器固定阀值。Step S306, determining the dynamic threshold of the sensor according to the proximity value, and obtaining the fixed threshold of the sensor according to the dynamic threshold of the sensor.

在一个实施例中,设备周期性地检测与周围物体的接近值,当检测设备功耗参数超出指定参数范围时,认为设备处于能量充足的状态。根据每次采集的接近值动态地更新接近传感器阀值,该更新的接近传感器阀值即为传感器动态阀值,同时记录每次更新的传感器动态阀值。将当前采集到的接近值与上一次更新的传感器动态阀值进行比较,从而判断当前物体的远近状态。In one embodiment, the device periodically detects the proximity value to surrounding objects, and when the detected device power consumption parameter exceeds a specified parameter range, the device is considered to be in a state of sufficient energy. The threshold value of the proximity sensor is dynamically updated according to the proximity value collected each time, the updated threshold value of the proximity sensor is the dynamic threshold value of the sensor, and the dynamic threshold value of the sensor updated each time is recorded. Compare the currently collected proximity value with the last updated sensor dynamic threshold to determine the current state of the object.

在一个实施例中,传感器固定阀值是指预先设定的固定不变的接近传感器阀值。根据传感器动态阀值获取指定传感器动态阀值,并根据该指定传感器动态阀值和限制阀值获取传感器固定阀值。其中,指定传感器动态阀值是指在记录的每次更新的传感器动态阀值中预先指定的传感器动态阀值。例如,指定传感器动态阀值可以是最大传感器动态阀值、最小传感器动态阀值或平均传感器动态阀值等。限制阀值是指限制传感器固定阀值需要满足的条件阀值,例如限制传感器固定阀值不能大于限制阀值或者不能小于限制阀值。In one embodiment, the sensor fixed threshold refers to a preset fixed threshold of the proximity sensor. A specified sensor dynamic threshold is obtained according to the sensor dynamic threshold, and a sensor fixed threshold is obtained according to the specified sensor dynamic threshold and the limit threshold. Wherein, the specified sensor dynamic threshold refers to the pre-specified sensor dynamic threshold in the recorded sensor dynamic threshold updated each time. For example, the specified sensor dynamic threshold may be a maximum sensor dynamic threshold, a minimum sensor dynamic threshold, or an average sensor dynamic threshold. The limit threshold refers to the condition threshold that needs to be satisfied by the limit sensor fixed threshold, for example, the limit sensor fixed threshold cannot be greater than the limit threshold or cannot be smaller than the limit threshold.

在一个实施例中,获取设备在远离状态下,并在预设时间段内差值小于预设差值的若干组传感器动态阀值,并从该若干组传感器动态阀值中取最大值作为指定传感器动态阀值。In one embodiment, several groups of sensor dynamic thresholds whose difference is less than the preset difference within the preset time period when the device is in the remote state are obtained, and the maximum value is taken from the several groups of sensor dynamic thresholds as the specified Sensor dynamic threshold.

在一个实施例中,获取传感器动态阀值中的最大传感器动态阀值,检测所述最大传感器动态阀值小于限制阀值,则将最大传感器动态阀值作为传感器固定阀值,否则将限制阀值作为传感器固定阀值。In one embodiment, the maximum sensor dynamic threshold among the sensor dynamic thresholds is obtained, and it is detected that the maximum sensor dynamic threshold is less than the limit threshold, then the maximum sensor dynamic threshold is used as the sensor fixed threshold, otherwise the limit threshold As a sensor fixed threshold.

在一个实施例中,也可以是获取传感器动态阀值中的最小传感器动态阀值,检测所述最大传感器动态阀值大于限制阀值,则将最小传感器动态阀值作为传感器固定阀值,否则将限制阀值作为传感器固定阀值。In one embodiment, it is also possible to obtain the minimum sensor dynamic threshold value among the sensor dynamic threshold values, and detect that the maximum sensor dynamic threshold value is greater than the limit threshold value, then use the minimum sensor dynamic threshold value as the sensor fixed threshold value, otherwise set The limiting threshold acts as a sensor fixed threshold.

步骤S308,检测设备功耗参数在指定参数范围内,则将接近传感器阀值设置为传感器固定阀值。In step S308, it is detected that the power consumption parameter of the device is within the specified parameter range, and then the threshold of the proximity sensor is set as the fixed threshold of the sensor.

在一个实施例中,检测设备功耗参数在指定参数范围内,则认为设备处于能量趋于耗尽的状态。则将接近传感器阀值设置为传感器固定阀值。该传感器固定阀值即为步骤S306中获取的传感器固定阀值。In one embodiment, if the power consumption parameter of the detected device is within a specified parameter range, it is considered that the device is in a state where energy tends to be exhausted. Then set the threshold of the proximity sensor as the fixed threshold of the sensor. The sensor fixed threshold is the sensor fixed threshold acquired in step S306.

步骤S310,停止更新接近传感器阀值。Step S310, stop updating the proximity sensor threshold.

在一个实施例中,当设备功耗参数在指定参数范围内时,认为设备当前处于能量趋于耗尽的状态,设备停止动态地更新接近传感器阀值,而采用传感器固定阀值。当再次检测到设备功耗参数超出指定参数范围时,可以重新进行动态地更新接近传感器阀值。In one embodiment, when the power consumption parameter of the device is within the specified parameter range, it is considered that the device is currently in a state where energy tends to be exhausted, and the device stops dynamically updating the threshold of the proximity sensor, and uses a fixed threshold of the sensor. When it is detected again that the power consumption parameter of the device exceeds the specified parameter range, the threshold value of the proximity sensor can be dynamically updated again.

本发明实施例提供的省电方法,在检测到设备功耗参数在指定参数范围内时,判定该设备处于能量趋于耗尽的状态,将接近传感器阀值设置为传感器固定阀值,不再更新接近传感器阀值。节省了大量更新传感器阀值时消耗的电量,大大地降低了设备的功耗,节省了电量,延长了电量的使用时间。In the power saving method provided by the embodiment of the present invention, when it is detected that the power consumption parameter of the device is within the specified parameter range, it is determined that the device is in a state where the energy tends to be exhausted, and the threshold value of the proximity sensor is set as the fixed threshold value of the sensor, and no longer Update the proximity sensor threshold. It saves a lot of power consumption when updating the sensor threshold, greatly reduces the power consumption of the device, saves power, and prolongs the use time of power.

图4为一个实施例中省电装置的结构示意图。如图4所示,该省电装置包括参数获取模块402、阀值设置模块404和停止更新模块406。其中:FIG. 4 is a schematic structural diagram of a power saving device in an embodiment. As shown in FIG. 4 , the power saving device includes a parameter acquisition module 402 , a threshold value setting module 404 and a stop updating module 406 . in:

参数获取模块402,用于获取设备功耗参数,所述设备功耗参数是指反映设备当前功耗的参数值。The parameter acquiring module 402 is configured to acquire a device power consumption parameter, where the device power consumption parameter refers to a parameter value reflecting the current power consumption of the device.

阀值设置模块404,用于检测所述设备功耗参数在指定参数范围内,则将接近传感器阀值设置为传感器固定阀值,所述接近传感器阀值是指判定物体距离远近的阀值。The threshold setting module 404 is used to detect that the power consumption parameter of the device is within the specified parameter range, and then set the threshold of the proximity sensor as a fixed threshold of the sensor. The threshold of the proximity sensor refers to the threshold for determining the distance of an object.

停止更新模块406,用于停止更新所述接近传感器阀值。Stop updating module 406, configured to stop updating the proximity sensor threshold.

图5为另一个实施例中省电装置的结构示意图。如图5所示,该省电装置包括参数获取模块502、接近值采集模块504、阀值获取模块506、阀值设置模块508和停止更新模块510。其中:FIG. 5 is a schematic structural diagram of a power saving device in another embodiment. As shown in FIG. 5 , the power saving device includes a parameter acquisition module 502 , a proximity value acquisition module 504 , a threshold acquisition module 506 , a threshold setting module 508 and a stop update module 510 . in:

参数获取模块502,用于获取设备功耗参数,所述设备功耗参数是指反映设备当前功耗的参数值。The parameter acquiring module 502 is configured to acquire a device power consumption parameter, where the device power consumption parameter refers to a parameter value reflecting the current power consumption of the device.

接近值采集模块504,用于检测所述设备功耗参数超出指定参数范围,则获取所述接近传感器采集的接近值。The proximity value collection module 504 is configured to detect that the power consumption parameter of the device exceeds a specified parameter range, and obtain the proximity value collected by the proximity sensor.

阀值获取模块506,用于根据所述接近值确定传感器动态阀值,并根据所述传感器动态阀值获取传感器固定阀值。A threshold acquisition module 506, configured to determine a dynamic threshold of the sensor according to the proximity value, and acquire a fixed threshold of the sensor according to the dynamic threshold of the sensor.

阀值设置模块508,用于检测所述设备功耗参数在指定参数范围内,则将接近传感器阀值设置为传感器固定阀值,所述接近传感器阀值是指判定物体距离远近的阀值。The threshold setting module 508 is used to detect that the power consumption parameter of the device is within the specified parameter range, and then set the threshold of the proximity sensor as a fixed threshold of the sensor. The threshold of the proximity sensor refers to the threshold for determining the distance of an object.

停止更新模块510,用于停止更新所述接近传感器阀值。Stop updating module 510, configured to stop updating the proximity sensor threshold.

本发明实施例提供的省电装置,将接近传感器阀值设置为传感器固定阀值,不再更新接近传感器阀值,节省了大量更新传感器阀值时消耗的电量,大大地降低了设备的功耗,节省了电量。In the power saving device provided by the embodiment of the present invention, the threshold of the proximity sensor is set as a fixed threshold of the sensor, and the threshold of the proximity sensor is no longer updated, which saves a lot of power consumption when updating the threshold of the sensor, and greatly reduces the power consumption of the device , saving power.

参数获取模块502还用于获取当前电量值;以及获取当前处理器占有率中的一种或两种。The parameter acquiring module 502 is also used to acquire the current power value; and acquire one or both of the current processor occupancy.

阀值获取模块506还用于根据所述传感器动态阀值获取指定传感器动态阀值,并根据所述指定传感器动态阀值和限制阀值获取传感器固定阀值。The threshold acquiring module 506 is further configured to acquire a specified sensor dynamic threshold according to the sensor dynamic threshold, and acquire a sensor fixed threshold according to the specified sensor dynamic threshold and the limiting threshold.

阀值获取模块506还用于获取所述传感器动态阀值中的最大传感器动态阀值,检测所述最大传感器动态阀值小于限制阀值,则将所述最大传感器动态阀值作为传感器固定阀值。The threshold acquisition module 506 is also used to acquire the maximum sensor dynamic threshold among the sensor dynamic thresholds, and if it detects that the maximum sensor dynamic threshold is less than the limit threshold, then use the maximum sensor dynamic threshold as the sensor fixed threshold .

上述省电装置中各个模块的划分仅用于举例说明,在其他实施例中,可将省电装置按照需要划分为不同的模块,以完成上述省电装置的全部或部分功能。The division of each module in the above-mentioned power saving device is only for illustration. In other embodiments, the power saving device can be divided into different modules according to needs, so as to complete all or part of the functions of the above power saving device.

一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现以下步骤:A computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the following steps are implemented:

获取设备功耗参数,所述设备功耗参数是指反映设备当前功耗的参数值;Obtaining a device power consumption parameter, where the device power consumption parameter refers to a parameter value reflecting the current power consumption of the device;

检测所述设备功耗参数在指定参数范围内,则将接近传感器阀值设置为传感器固定阀值,所述接近传感器阀值是指判定物体距离远近的阀值;Detecting that the power consumption parameter of the device is within the specified parameter range, then setting the threshold of the proximity sensor as a fixed threshold of the sensor, the threshold of the proximity sensor refers to the threshold for determining the distance of the object;

停止更新所述接近传感器阀值。Stop updating the proximity sensor threshold.

一种电子设备,包括存储器,处理器及存储在存储器上并可在处理器上运行的计算机程序(指令),所述处理器执行所述程序时实现以下步骤:An electronic device, comprising a memory, a processor, and a computer program (instruction) stored on the memory and operable on the processor, the processor implements the following steps when executing the program:

获取设备功耗参数,所述设备功耗参数是指反映设备当前功耗的参数值;Obtaining a device power consumption parameter, where the device power consumption parameter refers to a parameter value reflecting the current power consumption of the device;

检测所述设备功耗参数在指定参数范围内,则将接近传感器阀值设置为传感器固定阀值,所述接近传感器阀值是指判定物体距离远近的阀值;Detecting that the power consumption parameter of the device is within the specified parameter range, then setting the threshold of the proximity sensor as a fixed threshold of the sensor, the threshold of the proximity sensor refers to the threshold for determining the distance of the object;

停止更新所述接近传感器阀值。Stop updating the proximity sensor threshold.

本发明实施例还提供了一种计算机设备。如图6所示,为了便于说明,仅示出了与本发明实施例相关的部分,具体技术细节未揭示的,请参照本发明实施例方法部分。该计算机设备可以为包括移动终端、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、POS(Point of Sales,销售终端)、车载电脑、穿戴式设备等任意终端设备,以计算机设备为移动终端为例:The embodiment of the invention also provides a computer device. As shown in FIG. 6 , for ease of description, only the parts related to the embodiment of the present invention are shown, and for specific technical details not disclosed, please refer to the method part of the embodiment of the present invention. The computer device can be any terminal device including mobile terminal, tablet computer, PDA (Personal Digital Assistant, personal digital assistant), POS (Point of Sales, sales terminal), vehicle-mounted computer, wearable device, etc., with the computer device as the mobile terminal For example:

图6为与本发明实施例提供的计算机设备相关的移动终端的部分结构的框图。参考图6,移动终端600包括:射频(Radio Frequency,RF)电路610、存储器620、输入单元630、显示单元640、传感器650、音频电路660、无线保真(wireless fidelity,WiFi)模块670、处理器680、以及电源690等部件。本领域技术人员可以理解,图6所示的移动终端结构并不构成对移动终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Fig. 6 is a block diagram of a partial structure of a mobile terminal related to a computer device provided by an embodiment of the present invention. 6, the mobile terminal 600 includes: a radio frequency (Radio Frequency, RF) circuit 610, a memory 620, an input unit 630, a display unit 640, a sensor 650, an audio circuit 660, a wireless fidelity (wireless fidelity, WiFi) module 670, a processing device 680, and power supply 690 and other components. Those skilled in the art can understand that the structure of the mobile terminal shown in FIG. 6 is not limited to the mobile terminal, and may include more or less components than those shown in the figure, or combine some components, or arrange different components.

其中,RF电路610可用于收发信息或通话过程中,信号的接收和发送,可将基站的下行信息接收后,给处理器680处理;也可以将上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路610还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System ofMobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband CodeDivision Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE))、电子邮件、短消息服务(Short Messaging Service,SMS)等。Among them, the RF circuit 610 can be used for sending and receiving information or receiving and sending signals during a call. After receiving the downlink information from the base station, it can be processed by the processor 680; it can also send uplink data to the base station. Generally, an RF circuit includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, and the like. In addition, RF circuitry 610 may also communicate with networks and other devices via wireless communications. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile Communication (Global System of Mobile communication, GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access, CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.

存储器620可用于存储软件程序以及模块,处理器680通过运行存储在存储器620的软件程序以及模块,从而执行移动终端的各种功能应用以及数据处理。存储器620可主要包括程序存储区和数据存储区,其中,程序存储区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能的应用程序、图像播放功能的应用程序等)等;数据存储区可存储根据移动终端的使用所创建的数据(比如音频数据、通讯录等)等。此外,存储器620可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 620 can be used to store software programs and modules, and the processor 680 executes various functional applications and data processing of the mobile terminal by running the software programs and modules stored in the memory 620 . The memory 620 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as an application program for a sound playback function, an application program for an image playback function, etc.); The data storage area may store data (such as audio data, contacts, etc.) created according to the use of the mobile terminal, and the like. In addition, the memory 620 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.

输入单元630可用于接收输入的数字或字符信息,以及产生与移动终端600的用户设置以及功能控制有关的键信号输入。具体地,输入单元630可包括触控面板631以及其他输入设备632。触控面板631,也可称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板631上或在触控面板631附近的操作),并根据预先设定的程式驱动相应的连接装置。在一个实施例中,触控面板631可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器680,并能接收处理器680发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板631。除了触控面板631,输入单元630还可以包括其他输入设备632。具体地,其他输入设备632可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)等中的一种或多种。The input unit 630 may be used to receive input number or character information, and generate key signal input related to user settings and function control of the mobile terminal 600 . Specifically, the input unit 630 may include a touch panel 631 and other input devices 632 . The touch panel 631, also referred to as a touch screen, can collect touch operations of the user on or near it (for example, the user uses any suitable object or accessory such as a finger, a stylus, etc. on the touch panel 631 or near the touch panel 631 operation), and drive the corresponding connection device according to the preset program. In one embodiment, the touch panel 631 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and sends it to the to the processor 680, and can receive and execute commands sent by the processor 680. In addition, the touch panel 631 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 631 , the input unit 630 may also include other input devices 632 . Specifically, other input devices 632 may include, but are not limited to, one or more of physical keyboards, function keys (such as volume control keys, switch keys, etc.), and the like.

显示单元640可用于显示由用户输入的信息或提供给用户的信息以及移动终端的各种菜单。显示单元640可包括显示面板641。在一个实施例中,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板641。在一个实施例中,触控面板631可覆盖显示面板641,当触控面板631检测到在其上或附近的触摸操作后,传送给处理器680以确定触摸事件的类型,随后处理器680根据触摸事件的类型在显示面板641上提供相应的视觉输出。虽然在图6中,触控面板631与显示面板641是作为两个独立的部件来实现移动终端的输入和输入功能,但是在某些实施例中,可以将触控面板631与显示面板641集成而实现移动终端的输入和输出功能。The display unit 640 may be used to display information input by or provided to the user and various menus of the mobile terminal. The display unit 640 may include a display panel 641 . In one embodiment, the display panel 641 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an organic light-emitting diode (Organic Light-Emitting Diode, OLED), or the like. In one embodiment, the touch panel 631 can cover the display panel 641. When the touch panel 631 detects a touch operation on or near it, it transmits to the processor 680 to determine the type of the touch event, and then the processor 680 according to the The type of touch event provides a corresponding visual output on the display panel 641 . Although in FIG. 6, the touch panel 631 and the display panel 641 are used as two independent components to realize the input and input functions of the mobile terminal, in some embodiments, the touch panel 631 and the display panel 641 can be integrated. And realize the input and output functions of the mobile terminal.

移动终端600还可包括至少一种传感器650,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板641的亮度,接近传感器可在移动终端移动到耳边时,关闭显示面板641和/或背光。运动传感器可包括加速度传感器,通过加速度传感器可检测各个方向上加速度的大小,静止时可检测出重力的大小及方向,可用于识别移动终端姿态的应用(比如横竖屏切换)、振动识别相关功能(比如计步器、敲击)等;此外,移动终端还可配置陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器等。The mobile terminal 600 may also include at least one sensor 650, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 641 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 641 and the display panel 641 when the mobile terminal moves to the ear. / or backlighting. The motion sensor can include an acceleration sensor, through which the magnitude of acceleration in various directions can be detected, and the magnitude and direction of gravity can be detected when stationary, and can be used for applications that identify the posture of a mobile terminal (such as switching between horizontal and vertical screens), vibration recognition related functions ( Such as pedometer, knocking), etc.; in addition, the mobile terminal can also be equipped with other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc.

音频电路660、扬声器661和传声器662可提供用户与移动终端之间的音频接口。音频电路660可将接收到的音频数据转换后的电信号,传输到扬声器661,由扬声器661转换为声音信号输出;另一方面,传声器662将收集的声音信号转换为电信号,由音频电路660接收后转换为音频数据,再将音频数据输出处理器680处理后,经RF电路610可以发送给另一移动终端,或者将音频数据输出至存储器620以便后续处理。Audio circuitry 660, speaker 661 and microphone 662 may provide an audio interface between the user and the mobile terminal. The audio circuit 660 can transmit the electrical signal converted from the received audio data to the loudspeaker 661, and the loudspeaker 661 converts it into an audio signal output; After being received, it is converted into audio data, and after being processed by the output processor 680, the audio data can be sent to another mobile terminal through the RF circuit 610, or the audio data can be output to the memory 620 for subsequent processing.

WiFi属于短距离无线传输技术,移动终端通过WiFi模块670可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图6示出了WiFi模块670,但是可以理解的是,其并不属于移动终端600的必须构成,可以根据需要而省略。WiFi is a short-distance wireless transmission technology. The mobile terminal can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 670, which provides users with wireless broadband Internet access. Although FIG. 6 shows a WiFi module 670, it can be understood that it is not an essential component of the mobile terminal 600 and can be omitted as required.

处理器680是移动终端的控制中心,利用各种接口和线路连接整个移动终端的各个部分,通过运行或执行存储在存储器620内的软件程序和/或模块,以及调用存储在存储器620内的数据,执行移动终端的各种功能和处理数据,从而对移动终端进行整体监控。在一个实施例中,处理器680可包括一个或多个处理单元。在一个实施例中,处理器680可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等;调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器680中。The processor 680 is the control center of the mobile terminal, and uses various interfaces and lines to connect various parts of the entire mobile terminal, by running or executing software programs and/or modules stored in the memory 620, and calling data stored in the memory 620 , execute various functions of the mobile terminal and process data, so as to monitor the mobile terminal as a whole. In one embodiment, processor 680 may include one or more processing units. In one embodiment, the processor 680 may integrate an application processor and a modem processor, wherein the application processor mainly processes operating systems, user interfaces, and application programs, etc.; the modem processor mainly processes wireless communications. It can be understood that the foregoing modem processor may not be integrated into the processor 680 .

移动终端600还包括给各个部件供电的电池690,优选的,电池可以通过电池管理系统与处理器680逻辑相连,从而通过电池管理系统实现管理充电、放电、以及功耗管理等功能。The mobile terminal 600 also includes a battery 690 for supplying power to various components. Preferably, the battery can be logically connected to the processor 680 through a battery management system, so that functions such as charging, discharging, and power consumption management can be implemented through the battery management system.

在一个实施例中,移动终端600还可以包括摄像头、蓝牙模块等。In an embodiment, the mobile terminal 600 may further include a camera, a Bluetooth module, and the like.

在本发明实施例中,该移动终端600所包括的处理器680还具有以下功能:In the embodiment of the present invention, the processor 680 included in the mobile terminal 600 also has the following functions:

获取设备功耗参数,所述设备功耗参数是指反映设备当前功耗的参数值;Obtaining a device power consumption parameter, where the device power consumption parameter refers to a parameter value reflecting the current power consumption of the device;

检测所述设备功耗参数在指定参数范围内,则将接近传感器阀值设置为传感器固定阀值,所述接近传感器阀值是指判定物体距离远近的阀值;Detecting that the power consumption parameter of the device is within the specified parameter range, then setting the threshold of the proximity sensor as a fixed threshold of the sensor, the threshold of the proximity sensor refers to the threshold for determining the distance of the object;

停止更新所述接近传感器阀值。Stop updating the proximity sensor threshold.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一非易失性计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be realized through computer programs to instruct related hardware, and the programs can be stored in a non-volatile computer-readable storage medium When the program is executed, it may include the processes of the embodiments of the above-mentioned methods. Wherein, the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM) and the like.

以上所述实施例仅表达了本发明的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation modes of the present invention, and the description thereof is relatively specific and detailed, but should not be construed as limiting the patent scope of the present invention. It should be pointed out that those skilled in the art can make several modifications and improvements without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent for the present invention should be based on the appended claims.

Claims (11)

1.一种省电方法,其特征在于,包括:1. A power saving method, characterized in that, comprising: 获取设备功耗参数,所述设备功耗参数是指反映设备当前功耗的参数值;Obtaining a device power consumption parameter, where the device power consumption parameter refers to a parameter value reflecting the current power consumption of the device; 检测所述设备功耗参数在指定参数范围内,则将接近传感器阀值设置为传感器固定阀值,所述接近传感器阀值是指判定物体距离远近的阀值;Detecting that the power consumption parameter of the device is within the specified parameter range, then setting the threshold of the proximity sensor as a fixed threshold of the sensor, the threshold of the proximity sensor refers to the threshold for determining the distance of the object; 停止更新所述接近传感器阀值。Stop updating the proximity sensor threshold. 2.根据权利要求1所述的省电方法,其特征在于,在所述获取设备功耗参数步骤之后,所述检测所述设备功耗参数在指定参数范围内步骤之前还包括:2. The power saving method according to claim 1, wherein after the step of obtaining the device power consumption parameter, before the step of detecting that the device power consumption parameter is within a specified parameter range, the step further includes: 检测所述设备功耗参数超出指定参数范围,则获取所述接近传感器采集的接近值;Detecting that the power consumption parameter of the device exceeds a specified parameter range, obtaining the proximity value collected by the proximity sensor; 根据所述接近值确定传感器动态阀值,并根据所述传感器动态阀值获取传感器固定阀值。A sensor dynamic threshold is determined according to the proximity value, and a sensor fixed threshold is obtained according to the sensor dynamic threshold. 3.根据权利要求2所述的省电方法,其特征在于,所述根据所述传感器动态阀值获取传感器固定阀值包括:3. The power saving method according to claim 2, wherein said acquiring a fixed sensor threshold according to said sensor dynamic threshold comprises: 根据所述传感器动态阀值获取指定传感器动态阀值,并根据所述指定传感器动态阀值和限制阀值获取传感器固定阀值。A specified sensor dynamic threshold is obtained according to the sensor dynamic threshold, and a sensor fixed threshold is obtained according to the specified sensor dynamic threshold and the limit threshold. 4.根据权利要求3所述的省电方法,其特征在于,所述根据所述传感器动态阀值获取传感器固定阀值包括:4. The power saving method according to claim 3, wherein said acquiring a fixed sensor threshold according to said sensor dynamic threshold comprises: 获取所述传感器动态阀值中的最大传感器动态阀值,检测所述最大传感器动态阀值小于限制阀值,则将所述最大传感器动态阀值作为传感器固定阀值。Obtaining the maximum sensor dynamic threshold among the sensor dynamic thresholds, and detecting that the maximum sensor dynamic threshold is smaller than the limit threshold, then using the maximum sensor dynamic threshold as the sensor fixed threshold. 5.根据权利要求1至4中任意一项所述的省电方法,其特征在于,所述获取设备功耗参数步骤包括:5. The power saving method according to any one of claims 1 to 4, wherein the step of obtaining device power consumption parameters comprises: 获取当前电量值;以及Get the current power value; and 获取当前处理器占有率中的一种或两种。Get one or both of the current processor occupancy. 6.一种省电装置,其特征在于,包括:6. A power saving device, characterized in that it comprises: 参数获取模块,用于获取设备功耗参数,所述设备功耗参数是指反映设备当前功耗的参数值;A parameter acquisition module, configured to acquire a device power consumption parameter, where the device power consumption parameter refers to a parameter value reflecting the current power consumption of the device; 阀值设置模块,用于检测所述设备功耗参数在指定参数范围内,则将接近传感器阀值设置为传感器固定阀值,所述接近传感器阀值是指判定物体距离远近的阀值;The threshold setting module is used to detect that the power consumption parameter of the device is within the specified parameter range, and then set the threshold of the proximity sensor as a fixed threshold of the sensor, and the threshold of the proximity sensor refers to the threshold for determining the distance of the object; 停止更新模块,用于停止更新所述接近传感器阀值。The stop updating module is used to stop updating the proximity sensor threshold. 7.根据权利要求6所述的省电装置,其特征在于,所述装置还包括:7. The power saving device according to claim 6, further comprising: 接近值采集模块,用于检测所述设备功耗参数超出指定参数范围,则获取所述接近传感器采集的接近值;A proximity value acquisition module, configured to detect that the power consumption parameter of the device exceeds a specified parameter range, and obtain the proximity value collected by the proximity sensor; 阀值获取模块,用于根据所述接近值确定传感器动态阀值,并根据所述传感器动态阀值获取传感器固定阀值。A threshold acquiring module, configured to determine a dynamic threshold of the sensor according to the proximity value, and acquire a fixed threshold of the sensor according to the dynamic threshold of the sensor. 8.根据权利要求7所述的省电装置,其特征在于,所述阀值获取模块还用于根据所述传感器动态阀值获取指定传感器动态阀值,并根据所述指定传感器动态阀值和限制阀值获取传感器固定阀值。8. The power saving device according to claim 7, wherein the threshold acquiring module is further configured to acquire a designated sensor dynamic threshold according to the sensor dynamic threshold, and obtain a specified sensor dynamic threshold according to the specified sensor dynamic threshold and Limit Threshold Gets the fixed threshold of the sensor. 9.根据权利要求8所述的省电装置,其特征在于,所述阀值获取模块还用于获取所述传感器动态阀值中的最大传感器动态阀值,检测所述最大传感器动态阀值小于限制阀值,则将所述最大传感器动态阀值作为传感器固定阀值。9. The power saving device according to claim 8, wherein the threshold acquiring module is further configured to acquire a maximum sensor dynamic threshold among the sensor dynamic thresholds, and detect that the maximum sensor dynamic threshold is less than If the threshold is limited, the maximum sensor dynamic threshold is used as the sensor fixed threshold. 10.根据权利要求6至9中任意一项所述的省电装置,其特征在于,所述参数获取模块还用于获取当前电量值;以及获取当前处理器占有率中的一种或两种。10. The power saving device according to any one of claims 6 to 9, wherein the parameter acquiring module is also used to acquire the current power value; and acquire one or both of the current processor occupancy . 11.一种电子设备,包括存储器,处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现以下步骤:11. An electronic device, comprising a memory, a processor and a computer program stored on the memory and operable on the processor, and the processor implements the following steps when executing the program: 获取设备功耗参数,所述设备功耗参数是指反映设备当前功耗的参数值;Obtaining a device power consumption parameter, where the device power consumption parameter refers to a parameter value reflecting the current power consumption of the device; 检测所述设备功耗参数在指定参数范围内,则将接近传感器阀值设置为传感器固定阀值,所述接近传感器阀值是指判定物体距离远近的阀值;Detecting that the power consumption parameter of the device is within the specified parameter range, then setting the threshold of the proximity sensor as a fixed threshold of the sensor, the threshold of the proximity sensor refers to the threshold for determining the distance of the object; 停止更新所述接近传感器阀值。Stop updating the proximity sensor threshold.
CN201710063294.6A 2017-02-03 2017-02-03 Power saving method, device and electronic device Expired - Fee Related CN106896896B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710063294.6A CN106896896B (en) 2017-02-03 2017-02-03 Power saving method, device and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710063294.6A CN106896896B (en) 2017-02-03 2017-02-03 Power saving method, device and electronic device

Publications (2)

Publication Number Publication Date
CN106896896A true CN106896896A (en) 2017-06-27
CN106896896B CN106896896B (en) 2019-10-25

Family

ID=59198486

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710063294.6A Expired - Fee Related CN106896896B (en) 2017-02-03 2017-02-03 Power saving method, device and electronic device

Country Status (1)

Country Link
CN (1) CN106896896B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI739338B (en) * 2020-03-11 2021-09-11 崑山科技大學 Environment-aware wisdom triggers power-saving methods

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103902010A (en) * 2012-12-26 2014-07-02 联想(北京)有限公司 Method for reducing power consumption and electronic equipment
CN104570144A (en) * 2013-10-24 2015-04-29 展讯通信(上海)有限公司 Self-adaptive induction threshold adjusting system and method for proximity sensor
CN104683598A (en) * 2015-03-25 2015-06-03 深圳市欧珀通信软件有限公司 Proximity sensor threshold adjustment method, device and intelligent device
CN105629184A (en) * 2014-11-20 2016-06-01 苹果公司 Electronic device and mixed magnetometer sensor suite used for same
CN106055076A (en) * 2016-05-31 2016-10-26 广东欧珀移动通信有限公司 Method and device for closing sensors
CN106095078A (en) * 2016-05-31 2016-11-09 广东欧珀移动通信有限公司 A sensor threshold setting method and mobile terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103902010A (en) * 2012-12-26 2014-07-02 联想(北京)有限公司 Method for reducing power consumption and electronic equipment
CN104570144A (en) * 2013-10-24 2015-04-29 展讯通信(上海)有限公司 Self-adaptive induction threshold adjusting system and method for proximity sensor
CN105629184A (en) * 2014-11-20 2016-06-01 苹果公司 Electronic device and mixed magnetometer sensor suite used for same
CN104683598A (en) * 2015-03-25 2015-06-03 深圳市欧珀通信软件有限公司 Proximity sensor threshold adjustment method, device and intelligent device
CN106055076A (en) * 2016-05-31 2016-10-26 广东欧珀移动通信有限公司 Method and device for closing sensors
CN106095078A (en) * 2016-05-31 2016-11-09 广东欧珀移动通信有限公司 A sensor threshold setting method and mobile terminal

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI739338B (en) * 2020-03-11 2021-09-11 崑山科技大學 Environment-aware wisdom triggers power-saving methods

Also Published As

Publication number Publication date
CN106896896B (en) 2019-10-25

Similar Documents

Publication Publication Date Title
CN106331359B (en) A kind of speech signal collection method, device and terminal
US20200241925A1 (en) Method for automatically releasing resource occupied by process in background of terminal, storage medium, and terminal
CN106453597B (en) Method, device and system for adjusting data synchronization period
CN106936516B (en) Display state control method, storage medium and terminal
CN107219951B (en) Touch screen control method and device, storage medium and terminal equipment
CN107172671A (en) A kind of channel switching method, device, storage medium and terminal
CN106101776B (en) Volume adjusting method, intelligent device and sound box
CN106603740A (en) Network connection abnormality processing method and terminal equipment
CN106453840A (en) Performance adjustment method of mobile terminal and mobile terminal
CN106714279A (en) A hotspot network switching method and terminal equipment
CN107528958A (en) Method for controlling mobile terminal, device, readable storage medium storing program for executing and mobile terminal
CN106254673A (en) Terminal fall detection method and device
CN106227337A (en) Method, device and terminal for adjusting screen brightness
CN106648205B (en) Sleep control method, device and terminal
CN105635379B (en) Noise suppression method and device
CN110022600B (en) Driving current adjusting method and device, storage medium and mobile terminal
CN106454953A (en) Flow control method, device and terminal
CN110891262A (en) Bluetooth pairing method, system and terminal equipment
CN106658615B (en) Method and device for switching communication network
CN112114988A (en) Client startup method, device, terminal and storage medium
CN112261634B (en) Bluetooth transmission control method and device, terminal equipment and storage medium
CN106896896B (en) Power saving method, device and electronic device
CN112416479B (en) Window display switching method, device, terminal and computer-readable storage medium
CN106487649A (en) Group message prompt control method and terminal device
CN106445841B (en) Data transmission control method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20191025