WO2017206876A1 - Sensor shutdown method and apparatus, storage medium, and electronic device - Google Patents

Sensor shutdown method and apparatus, storage medium, and electronic device Download PDF

Info

Publication number
WO2017206876A1
WO2017206876A1 PCT/CN2017/086473 CN2017086473W WO2017206876A1 WO 2017206876 A1 WO2017206876 A1 WO 2017206876A1 CN 2017086473 W CN2017086473 W CN 2017086473W WO 2017206876 A1 WO2017206876 A1 WO 2017206876A1
Authority
WO
WIPO (PCT)
Prior art keywords
pressing operation
identifier
sensor
application
preset reference
Prior art date
Application number
PCT/CN2017/086473
Other languages
French (fr)
Chinese (zh)
Inventor
黄宏用
Original Assignee
广东欧珀移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 广东欧珀移动通信有限公司 filed Critical 广东欧珀移动通信有限公司
Publication of WO2017206876A1 publication Critical patent/WO2017206876A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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

Definitions

  • the present invention relates to the field of electronic device technologies, and in particular, to a method, an apparatus, a storage medium, and an electronic device for shutting down a sensor.
  • mobile phones are the most commonly used and most important electronic devices for most users.
  • the various sensor devices in mobile phones provide a hardware foundation for application diversification functions.
  • Embodiments of the present invention provide a method, device, storage medium, and electronic device for shutting down a sensor to reduce power consumption of the sensor in the electronic device.
  • an embodiment of the present invention provides a method for shutting down a sensor, including the following steps:
  • the sensors corresponding to the respective identifiers in the third identification set are closed.
  • the present invention also provides a sensor closing device, comprising:
  • a first acquiring module configured to acquire a first identifier set of an application that is using the sensor and a second identifier set of the running sensor
  • a second acquiring module configured to: when detecting a pressing operation on the manipulation interface, acquire, from the first identifier set, an identifier of an application that will remain in normal operation according to the pressing operation;
  • a generating module configured to remove, from the second identifier set, an identifier of a sensor corresponding to the keep-alive application to generate a third identifier set
  • a closing module configured to close a sensor corresponding to each identifier in the third identifier set.
  • an embodiment of the present invention further provides a storage medium, where the storage medium stores a plurality of instructions, and the instructions are adapted to be loaded by a processor to perform a shutdown method of the foregoing sensor.
  • an embodiment of the present invention further provides an electronic device, including a processor, a memory, the processor is electrically connected to the memory, the memory is used to store instructions and data, and the processor is configured to execute The following steps:
  • the sensors corresponding to the respective identifiers in the third identification set are closed.
  • Embodiments of the present invention provide a method, device, storage medium, and electronic device for shutting down a sensor to reduce power consumption of the sensor in the electronic device.
  • FIG. 1 is a flowchart of a method for shutting down a sensor according to an embodiment of the present invention.
  • FIG. 2 is a flow chart of a step in the flow chart shown in FIG. 1.
  • FIG. 3 is another flowchart of a method for turning off a sensor according to an embodiment of the present invention.
  • FIG. 4 is a flow chart of a step in the flow chart shown in FIG.
  • FIG. 5 is a structural diagram of a sensor closing device according to an embodiment of the present invention.
  • Figure 6 is a structural diagram of a module in the structural diagram shown in Figure 5.
  • Figure 7 is a structural view of a unit in the structural diagram shown in Figure 6.
  • FIG. 8 is another structural diagram of a sensor closing device according to an embodiment of the present invention.
  • Figure 9 is a structural diagram of a module in the structural diagram shown in Figure 8.
  • FIG. 10 is a structural diagram of an electronic device according to an embodiment of the present invention.
  • FIG. 11 is another structural diagram of an electronic device according to an embodiment of the present invention.
  • Embodiments of the present invention provide a method for shutting down a sensor, including the following steps:
  • the sensors corresponding to the respective identifiers in the third identification set are closed.
  • the step of identifying the application that will remain in normal operation from the first set according to the pressing operation includes:
  • the identification of the application to be kept running is selected from the first identification set according to the second pressing operation.
  • the step of displaying the first identification set according to the first pressing operation comprises:
  • the method further includes the following steps:
  • the step of acquiring an application that will remain in normal operation from the first identification set according to the pressing operation includes:
  • the first preset reference quantity is a frequency of use of an application corresponding to each identifier in the first identifier set.
  • the first preset reference quantity is a power consumption value of an application corresponding to each identifier in the first identifier set.
  • the second preset reference amount is a duration of the pressing operation.
  • the second preset reference amount is a pressing pressure value of the pressing operation.
  • FIG. 1 is a flowchart of a method for shutting down a sensor according to an embodiment of the present invention. It is mainly used in mobile terminals, such as mobile phones, tablets and other devices.
  • the method for turning off the sensor of this embodiment includes the following steps:
  • the operation of acquiring the first identifier set and the second identifier set may be triggered.
  • the first identifier set is a name list or an icon list of an application that is using the sensor, and the like.
  • the second set of identifiers is a list of names or icons of sensors that are running.
  • the step S102 when monitoring the pressing operation on the manipulation interface, it is necessary to perform a process of troubleshooting the erroneous operation.
  • the pressure value of the pressing operation is too small or the duration of the pressing operation is too short, it is determined that the operation is wrong. Operation, directly ignore the pressing operation.
  • the step S102 can include the following sub-steps:
  • the step S1021 is specifically: acquiring a third preset reference quantity of the first pressing operation when the first pressing operation on the manipulation interface is detected; and when the third preset reference quantity is greater than the first preset value, The manipulation area displays the first identification set.
  • the third preset reference amount may be the duration of the pressing operation, or the pressing pressure value or the like.
  • the identifier of the application to be kept running is selected from the first identifier set according to the second pressing operation.
  • the second pressing operation may be a multiple pressing operation within a predetermined time period, and an identification of one application may be selected for each pressing operation. For example, when pressed to the display area of the logo of QQ, QQ is selected as the application that will remain in normal operation. When pressed to the display area of the WeChat logo, WeChat is selected as the application that will remain in normal operation.
  • the user wishes to keep the high-definition map in normal use, and the positioning sensor required to maintain the normal operation of the high-definition map is normally operated, and therefore, the positioning sensor is removed from the second identification set to generate the first Three logo collections.
  • the sensors corresponding to the respective identifiers when the sensors corresponding to the respective identifiers are turned off, all the calling functions using the sensors are also turned off, and the applications in the first identifier set that need to remain in normal operation are turned off, and other applications should be turned off to reduce power consumption. And CPU usage.
  • the embodiment obtains the first identification set of the application that is using the sensor and the second identification set of the running sensor; when the pressing operation of the manipulation interface is monitored, the first identification is performed according to the pressing operation Obtaining, in the collection, an identifier of an application that will remain in normal operation; removing an identifier of a sensor corresponding to the application that is to be in a normal operation from the second identifier set to generate a third identifier set;
  • the three identifiers identify the sensors corresponding to the respective identifiers, thereby achieving the benefit of turning off the running sensor and having the effect of reducing power consumption, and since the application that needs to run normally is filtered out before the shutdown, the application needs to be normally run.
  • the sensor removes the sensor from the second set of identifiers, so that when the sensor is turned off, the sensor that needs to be used normally is not turned off, and the control effect is accurate and the user experience is improved.
  • FIG. 2 is another flowchart of a method for turning off a sensor according to an embodiment of the present invention. It is mainly used in mobile terminals, such as mobile phones, tablets and other devices.
  • the method for turning off the sensor of the preferred embodiment includes the following steps:
  • the operation of acquiring the first identifier set and the second identifier set is triggered.
  • the first identifier set is a name list or an icon list of an application that is using the sensor, and the like.
  • the second set of identifiers is a list of names or icons of sensors that are running.
  • the first preset reference quantity may be a power consumption value of the application corresponding to the identifier in the first identifier set during normal operation, or may be corresponding to each identifier in the first identifier set.
  • the frequency of use of the app After grading, the plurality of identities are arranged in the first identification set in a low-to-high order.
  • the step S203 may include the following sub-steps:
  • S2031 When a pressing operation on the manipulation interface is detected, acquiring a second preset reference amount of the pressing operation; wherein the second preset reference amount may be a time of the pressing, a pressing pressure, or the like.
  • S2032 Select a corresponding number of identifiers from the first identifier set according to the second preset reference quantity in a priority order from high level to low level, so as to obtain an identifier of an application that will remain in normal use.
  • the second preset reference amount is the time of pressing
  • the pressing time when the pressing time is 1 second, the identifier corresponding to the application with the highest priority is selected.
  • the pressing time is 2 seconds, the identifier corresponding to the application with the highest priority and the second highest is selected.
  • the pressing time exceeds 5 seconds, the identifier corresponding to all applications is directly selected.
  • the identifier of the corresponding number of applications is also selected according to the magnitude of the pressure value, and is gradually decreased from the identifier of the highest priority application.
  • the user wants to keep the Baidu map in normal use, and keeps the positioning sensor required for the normal operation of the Baidu map to operate normally. Therefore, the positioning sensor is removed from the second identifier set to generate a third identifier. set.
  • the sensors corresponding to the respective identifiers when the sensors corresponding to the respective identifiers are turned off, all the calling functions using the sensors are also turned off, and the applications in the first identifier set that need to remain in normal operation are turned off, and other applications should be turned off to reduce power consumption. And CPU usage.
  • the first identifier set of the application that is using the sensor and the second identifier set of the running sensor are obtained; and the identifiers in the first identifier set are sorted according to the first preset reference quantity.
  • the invention also provides a sensor closing device, comprising:
  • a first acquiring module configured to acquire a first identifier set of an application that is using the sensor and a second identifier set of the running sensor
  • a second acquiring module configured to: when detecting a pressing operation on the manipulation interface, acquire, from the first identifier set, an identifier of an application that will remain in normal operation according to the pressing operation;
  • a generating module configured to remove, from the second identifier set, an identifier of a sensor corresponding to the keep-alive application to generate a third identifier set
  • a closing module configured to close a sensor corresponding to each identifier in the third identifier set.
  • the second obtaining module comprises:
  • a display unit configured to display the first identification set according to the first pressing operation when monitoring a first pressing operation on the manipulation interface
  • a selecting unit configured to: when the second pressing operation of the display area of the first identification set is monitored, select an identifier of the application to be kept running from the first identification set according to the second pressing operation.
  • the display unit comprises:
  • Obtaining a sub-unit configured to acquire a third preset reference quantity of the first pressing operation when detecting a first pressing operation on the manipulation interface;
  • the display subunit is configured to display the first identifier set in the manipulation area when the third preset reference quantity is greater than the first preset value.
  • the closing device of the sensor further includes:
  • a grading module configured to hierarchically sort each identifier in the first identifier set according to the first preset reference quantity.
  • the second obtaining module comprises:
  • a first acquiring unit configured to acquire a second preset reference quantity of the pressing operation when detecting a pressing operation on the manipulation interface
  • a second obtaining unit configured to select, according to the second preset reference quantity, a corresponding quantity of identifiers from the first identifier set according to the priority order from high level to low level, thereby acquiring an identifier of an application that will remain in normal use .
  • FIG. 5 is a structural diagram of a sensor closing device according to an embodiment of the present invention. It is mainly used in mobile terminals, such as mobile phones, tablets and other devices.
  • the shutdown device of the sensor of the preferred embodiment includes a first acquisition module 301, a second acquisition module 302, a generation module 303, and a shutdown module 304.
  • the first obtaining module 301 is configured to acquire a first identifier set of an application that is using the sensor and a second identifier set of the running sensor.
  • the second obtaining module 302 is configured to: when detecting a pressing operation on the manipulation interface, acquire an identifier of an application that will remain in normal operation from the first identifier set according to the pressing operation.
  • the second acquisition module 302 includes a display unit 3021 and a selection unit 3022 .
  • the display unit 3021 is configured to: when the first pressing operation on the manipulation interface is monitored, display the first identification set according to the first pressing operation; the selecting unit 3022 is configured to monitor the second display area of the first identification set When the pressing operation is performed, an identifier of an application to be kept running is selected from the first identification set according to the second pressing operation.
  • display unit 3021 includes an acquisition sub-unit 30211 and a display sub-unit 30212.
  • the acquiring sub-unit 30211 is configured to acquire a third preset reference quantity of the first pressing operation when the first pressing operation on the manipulation interface is monitored.
  • the display subunit 30212 is configured to display the first identifier set in the manipulation area when the third preset reference quantity is greater than the first preset value.
  • the generating module 303 is configured to remove an identifier of a sensor corresponding to the keep-alive application from the second identifier set to generate a third identifier set.
  • the shutdown module 304 is configured to close the sensors corresponding to the respective identifiers in the third identifier set.
  • the embodiment obtains the first identification set of the application that is using the sensor and the second identification set of the running sensor; when the pressing operation of the manipulation interface is monitored, the first identification is performed according to the pressing operation Obtaining, in the collection, an identifier of an application that will remain in normal operation; removing an identifier of a sensor corresponding to the application that is to be in a normal operation from the second identifier set to generate a third identifier set;
  • the three identifiers identify the sensors corresponding to the respective identifiers, thereby achieving the benefit of turning off the running sensor and having the effect of reducing power consumption, and since the application that needs to run normally is filtered out before the shutdown, the application needs to be normally run.
  • the sensor removes the sensor from the second set of identifiers, so that when the sensor is turned off, the sensor that needs to be used normally is not turned off, and the control effect is accurate and the user experience is improved.
  • FIG. 8 is another structural diagram of a sensor closing device according to an embodiment of the present invention. It is mainly used in mobile terminals, such as mobile phones, tablets and other devices.
  • the shutdown device of the sensor of the preferred embodiment includes a first acquisition module 301, a classification module 305, a second acquisition module 302, a generation module 303, and a shutdown module 304.
  • the first obtaining module 301 is configured to acquire a first identifier set of an application that is using the sensor and a second identifier set of the running sensor.
  • the grading module 305 is configured to hierarchically sort each identifier in the first identifier set according to the first preset reference quantity.
  • the second obtaining module 302 is configured to: when detecting a pressing operation on the manipulation interface, acquire an identifier of an application that will remain in normal operation from the first identifier set according to the pressing operation.
  • the second obtaining module 302 includes: a first obtaining unit 3023 and a second acquiring unit 3034.
  • the first obtaining unit 3023 is configured to acquire a second preset reference quantity of the pressing operation when the pressing operation on the manipulation interface is monitored.
  • the second obtaining unit 3024 is configured to select a corresponding number of identifiers from the first identifier set according to the second preset reference quantity in a priority order from high level to low level, thereby acquiring an identifier of an application that will remain in normal use. .
  • the generating module 303 is configured to remove an identifier of a sensor corresponding to the keep-alive application from the second identifier set to generate a third identifier set.
  • the shutdown module 304 is configured to close the sensors corresponding to the respective identifiers in the third identifier set.
  • the first identifier set of the application that is using the sensor and the second identifier set of the running sensor are obtained; and the identifiers in the first identifier set are sorted according to the first preset reference quantity.
  • the embodiment of the invention further provides an electronic device, which may be a device such as a smart phone or a tablet computer.
  • the electronic device 400 includes a processor 401 and a memory 402.
  • the processor 401 is electrically connected to the memory 402.
  • the processor 401 is a control center of the electronic device 400, which connects various parts of the entire electronic device using various interfaces and lines, executes the electronic by running or loading an application stored in the memory 402, and calling data stored in the memory 402.
  • the various functions and processing data of the device enable overall monitoring of the electronic device.
  • the processor 401 in the electronic device 400 loads the instructions corresponding to the process of one or more applications into the memory 402 according to the following steps, and is stored and stored in the memory 402 by the processor 401.
  • the application thus implementing various functions:
  • the sensors corresponding to the respective identifiers in the third identification set are closed.
  • the processor 401 when the first pressing operation on the manipulation interface is detected, the processor 401 further performs the steps of: displaying the first identification set according to the first pressing operation; monitoring the display of the first identification set In the second pressing operation of the area, the identifier of the application to be kept running is selected from the first identification set according to the second pressing operation.
  • the processor 401 when the first pressing operation on the manipulation interface is detected, the processor 401 further performs the following steps: when the first pressing operation on the manipulation interface is monitored, acquiring the third preset of the first pressing operation a reference quantity; when the third preset reference quantity is greater than the first preset value, displaying the first identification set in the manipulation area.
  • the processor 401 further performing the step of: performing the following according to the first preset reference amount Each of the identifiers in the first set of identifiers is hierarchically ordered.
  • the processor 401 further performs the following steps: when detecting a pressing operation on the manipulation interface, acquiring a second preset reference amount of the pressing operation; in order of priority from high level to low level, according to the first The second preset reference quantity selects a corresponding number of identifiers from the first identifier set, thereby obtaining an identifier of an application that will remain in normal use.
  • Memory 402 can be used to store applications and data.
  • the application stored in the memory 402 contains instructions that are executable in the processor.
  • Applications can form various functional modules.
  • the processor 401 executes various functional applications and data processing by running an application stored in the memory 402.
  • the electronic device 400 further includes a display frequency 403, a control circuit 404, a radio frequency circuit 405, an input unit 406, an audio circuit 407, a sensor 408, and a power source 409.
  • the processor 401 is electrically connected to the display frequency 403, the control circuit 404 radio frequency circuit 405, the input unit 406, the audio circuit 407, the sensor 408, and the power source 409, respectively.
  • the display screen 403 can be used to display information entered by the user or information provided to the user as well as various graphical user interfaces of the terminal, which can be composed of images, text, icons, video, and any combination thereof. In practical applications, the display screen 403 can serve as a manipulation interface in the embodiment of the present invention.
  • the control circuit 404 is electrically connected to the display screen 403 for controlling the display screen 403 to display information.
  • the radio frequency circuit 405 is configured to transmit and receive radio frequency signals to establish wireless communication with network devices or other electronic devices through wireless communication, and to transmit and receive signals with network devices or other electronic devices.
  • the input unit 406 can be configured to receive input digits, character information, or user characteristic information (eg, fingerprints), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function controls.
  • the input unit 406 can include a fingerprint identification module.
  • the audio circuit 407 can provide an audio interface between the user and the terminal through a speaker and a microphone.
  • Sensor 408 is used to collect external environmental information.
  • Sensor 408 can include ambient brightness sensors, acceleration sensors, light sensors, motion sensors, and other sensors.
  • the light sensor can include an ambient light sensor and a proximity sensor.
  • the ambient light sensor can adjust the brightness of the display panel according to the brightness of the ambient light
  • the proximity sensor can turn off the display panel and/or the backlight when the terminal moves to the ear.
  • the gravity acceleration sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity.
  • gesture of the mobile phone such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.;
  • Other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, and the like that can be configured in the terminal are not described herein.
  • Power source 409 is used to power various components of electronic device 400.
  • the power supply 409 can be logically coupled to the processor 401 through a power management system to enable functions such as managing charging, discharging, and power management through the power management system.
  • the electronic device 400 may further include a camera, a Bluetooth module, and the like, and details are not described herein.
  • An electronic device obtains a first identification set of an application that is using a sensor and a second identification set of a running sensor; and when a pressing operation on the manipulation interface is detected, according to the pressing operation, the Obtaining, in an identifier set, an identifier of an application that will remain in normal operation; removing an identifier of a sensor corresponding to the application that remains in operation from the second identifier set to generate a third identifier set; The sensors corresponding to the respective identifiers in the third identifier set are implemented, so that the running sensor is turned off and the power consumption is reduced, and since the application that needs to run normally is filtered out before the shutdown, the normal operation is obtained. Applying the required sensor and removing the sensor from the second identification set, so that the sensor that needs to be used normally is not turned off when the sensor is turned off, and the control effect is accurate and the user experience is improved.
  • the embodiment of the invention further provides a storage medium, wherein the storage medium stores a plurality of instructions, the instructions being adapted to be loaded by a processor to perform the method for shutting down the sensor according to any of the above embodiments.
  • ROM read only memory
  • RAM Random Access Memory
  • the one or more operations may constitute computer readable instructions stored on one or more computer readable media that, when executed by an electronic device, cause the computing device to perform the operations.
  • the order in which some or all of the operations are described should not be construed as implying that the operations must be sequential. Those skilled in the art will appreciate alternative rankings that have the benefit of this specification. Moreover, it should be understood that not all operations must be present in every embodiment provided herein.
  • the word "preferred” as used herein is intended to serve as an example, instance, or illustration. Any aspect or design described as “preferred” by the text is not necessarily to be construed as being more advantageous than other aspects or designs. Instead, the use of the word “preferred” is intended to present a concept in a specific manner.
  • the term “or” as used in this application is intended to mean an “or” or “an” That is, unless otherwise specified or clear from the context, "X employs A or B” means naturally including any one of the permutations. That is, if X uses A; X uses B; or X uses both A and B, then "X uses A or B" is satisfied in any of the foregoing examples.
  • Each functional unit in the embodiment of the present invention may be integrated into one processing module, or each unit may exist physically separately, or two or more units may be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
  • the integrated modules, if implemented in the form of software functional modules and sold or used as stand-alone products, may also be stored in a computer readable storage medium.
  • the above mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.

Abstract

A sensor shutdown method and shutdown apparatus, a storage medium, and an electronic device. The method comprises: obtaining a first identifier set of applications which are currently using sensors and a second identifier set of sensors which are currently operating (S101), obtaining from within the first identifier set identifiers of applications which are operating normally (S102), removing from within the second identifier set identifiers of sensors corresponding to the applications which are operating normally, and generating a third identifier set (S103), and shutting down the sensors corresponding to the identifiers in the third identifier set (S104).

Description

传感器的关闭方法、装置、存储介质及电子设备 Sensor closing method, device, storage medium and electronic device 技术领域Technical field
本发明涉及电子设备技术领域,特别是涉及一种传感器的关闭方法、装置、存储介质及电子设备。The present invention relates to the field of electronic device technologies, and in particular, to a method, an apparatus, a storage medium, and an electronic device for shutting down a sensor.
背景技术Background technique
目前,手机已经是目前绝大多数用户最常用最重要的电子设备,手机中各种各样的传感器设备给应用多元化功能提供了硬件基础。At present, mobile phones are the most commonly used and most important electronic devices for most users. The various sensor devices in mobile phones provide a hardware foundation for application diversification functions.
技术问题technical problem
本发明实施例提供了一种传感器的关闭方法、装置、存储介质及电子设备,以减少电子设备中传感器的功耗。Embodiments of the present invention provide a method, device, storage medium, and electronic device for shutting down a sensor to reduce power consumption of the sensor in the electronic device.
技术解决方案Technical solution
第一方面,本发明实施例提供一种传感器的关闭方法,包括以下步骤:In a first aspect, an embodiment of the present invention provides a method for shutting down a sensor, including the following steps:
获取正在使用传感器的应用的第一标识集合及正在运行的传感器的第二标识集合;Obtaining a first set of identifiers of the application that is using the sensor and a second set of identifiers of the running sensors;
监测到对操控界面的按压操作时,根据所述按压操作从所述第一标识集合中获取将保持正常运行的应用的标识;When the pressing operation of the manipulation interface is detected, obtaining an identifier of an application that will remain in normal operation from the first identification set according to the pressing operation;
将与所述保持正常运行的应用所对应的传感器的标识从所述第二标识集合中移除,以生成第三标识集合;And deleting an identifier of a sensor corresponding to the application that is to be normally operated from the second identifier set to generate a third identifier set;
关闭与所述第三标识集合中的各个标识对应的传感器。The sensors corresponding to the respective identifiers in the third identification set are closed.
第二方面,本发明还提供了一种传感器的关闭装置,包括:In a second aspect, the present invention also provides a sensor closing device, comprising:
第一获取模块,用于获取正在使用传感器的应用的第一标识集合及正在运行的传感器的第二标识集合;a first acquiring module, configured to acquire a first identifier set of an application that is using the sensor and a second identifier set of the running sensor;
第二获取模块,用于监测到对操控界面的按压操作时,根据所述按压操作从所述第一标识集合中获取将保持正常运行的应用的标识;a second acquiring module, configured to: when detecting a pressing operation on the manipulation interface, acquire, from the first identifier set, an identifier of an application that will remain in normal operation according to the pressing operation;
生成模块,用于将与所述保持正常运行的应用所对应的传感器的标识从所述第二标识集合中移除,以生成第三标识集合;a generating module, configured to remove, from the second identifier set, an identifier of a sensor corresponding to the keep-alive application to generate a third identifier set;
关闭模块,用于关闭与所述第三标识集合中的各个标识对应的传感器。And a closing module, configured to close a sensor corresponding to each identifier in the third identifier set.
第三方面,本发明实施例还提供了一种存储介质,所述存储介质中存储有多条指令,所述指令适于由处理器加载以执行上述传感器的关闭方法。In a third aspect, an embodiment of the present invention further provides a storage medium, where the storage medium stores a plurality of instructions, and the instructions are adapted to be loaded by a processor to perform a shutdown method of the foregoing sensor.
第四方面,本发明实施例还提供了一种电子设备,包括处理器、存储器,所述处理器与所述存储器电性连接,所述存储器用于存储指令和数据;所述处理器用于执行以下步骤:In a fourth aspect, an embodiment of the present invention further provides an electronic device, including a processor, a memory, the processor is electrically connected to the memory, the memory is used to store instructions and data, and the processor is configured to execute The following steps:
获取正在使用传感器的应用的第一标识集合及正在运行的传感器的第二标识集合;Obtaining a first set of identifiers of the application that is using the sensor and a second set of identifiers of the running sensors;
监测到对操控界面的按压操作时,根据所述按压操作从所述第一标识集合中获取将保持正常运行的应用的标识;When the pressing operation of the manipulation interface is detected, obtaining an identifier of an application that will remain in normal operation from the first identification set according to the pressing operation;
将与所述将保持正常运行的应用所对应的传感器的标识从所述第二标识集合中移除,以生成第三标识集合;Removing an identifier of a sensor corresponding to the application that will remain in normal operation from the second identifier set to generate a third identifier set;
关闭与所述第三标识集合中的各个标识对应的传感器。The sensors corresponding to the respective identifiers in the third identification set are closed.
有益效果 Beneficial effect
本发明实施例提供了一种传感器的关闭方法、装置、存储介质及电子设备,以减少电子设备中传感器的功耗。Embodiments of the present invention provide a method, device, storage medium, and electronic device for shutting down a sensor to reduce power consumption of the sensor in the electronic device.
附图说明DRAWINGS
图1为本发明实施例提供的传感器的关闭方法的一种流程图。FIG. 1 is a flowchart of a method for shutting down a sensor according to an embodiment of the present invention.
图2为图1所示流程图中一步骤的流程图。2 is a flow chart of a step in the flow chart shown in FIG. 1.
图3为本发明实施例提供的传感器的关闭方法的另一种流程图。FIG. 3 is another flowchart of a method for turning off a sensor according to an embodiment of the present invention.
图4为图3所示流程图中一步骤的流程图。4 is a flow chart of a step in the flow chart shown in FIG.
图5为本发明实施例提供的传感器的关闭装置的一种结构图。FIG. 5 is a structural diagram of a sensor closing device according to an embodiment of the present invention.
图6为图5所示结构图中一模块的结构图。Figure 6 is a structural diagram of a module in the structural diagram shown in Figure 5.
图7为图6所示结构图中一单元的结构图。Figure 7 is a structural view of a unit in the structural diagram shown in Figure 6.
图8为本发明实施例提供的传感器的关闭装置的另一种结构图。FIG. 8 is another structural diagram of a sensor closing device according to an embodiment of the present invention.
图9为图8所示结构图中一模块的结构图。Figure 9 is a structural diagram of a module in the structural diagram shown in Figure 8.
图10为本发明实施例提供的电子设备的一种结构图。FIG. 10 is a structural diagram of an electronic device according to an embodiment of the present invention.
图11为本发明实施例提供的电子设备的另一种结构图。FIG. 11 is another structural diagram of an electronic device according to an embodiment of the present invention.
本发明的最佳实施方式BEST MODE FOR CARRYING OUT THE INVENTION
请参照图式,其中相同的组件符号代表相同的组件,本发明的原理是以实施在一适当的运算环境中来举例说明。以下的说明是基于所例示的本发明具体实施例,其不应被视为限制本发明未在此详述的其它具体实施例。Referring to the drawings, wherein like reference numerals refer to the same components, the principles of the invention are illustrated in the context of a suitable computing environment. The following description is based on the specific embodiments of the invention, which are not to be construed as limiting the invention.
在以下的说明中,本发明的具体实施例将参考由一部或多部计算机所执行之作业的步骤及符号来说明,除非另有述明。因此,其将可了解到这些步骤及操作,其中有数次提到为由计算机执行,包括了由代表了以一结构化型式中的数据之电子信号的计算机处理单元所操纵。此操纵转换该数据或将其维持在该计算机之内存系统中的位置处,其可重新配置或另外以本领域技术人员所熟知的方式来改变该计算机之运作。该数据所维持的数据结构为该内存之实体位置,其具有由该数据格式所定义的特定特性。但是,本发明原理以上述文字来说明,其并不代表为一种限制,本领域技术人员将可了解到以下所述的多种步骤及操作亦可实施在硬件当中。In the following description, the specific embodiments of the present invention will be described with reference to the steps and symbols of the operations performed by one or more computers, unless otherwise stated. Thus, it will be appreciated that these steps and operations, several of which are referred to as being performed by a computer, include manipulation by a computer processing unit that represents an electronic signal of data in a structured version. This manipulation converts the data or maintains it at a location in the memory system of the computer, which can be reconfigured or otherwise alter the operation of the computer in a manner well known to those skilled in the art. The data structure maintained by the data is the physical location of the memory, which has specific characteristics defined by the data format. However, the principles of the present invention are described in the above text, which is not intended to be a limitation, and those skilled in the art will appreciate that the various steps and operations described below can also be implemented in hardware.
实际应用中,不规范的传感器使用方法,例如在待机期间仍持有传感器不释放,导致系统无法休眠、传感器设备持续耗电,明显增大电子设备的待机功耗。In practical applications, the use of non-standard sensors, such as holding the sensor during standby, does not release, resulting in the system not being able to sleep, the sensor device continues to consume power, significantly increasing the standby power consumption of the electronic device.
本发明实施例提供一种传感器的关闭方法,包括以下步骤:Embodiments of the present invention provide a method for shutting down a sensor, including the following steps:
获取正在使用传感器的应用的第一标识集合及正在运行的传感器的第二标识集合;Obtaining a first set of identifiers of the application that is using the sensor and a second set of identifiers of the running sensors;
监测到对操控界面的按压操作时,根据所述按压操作从所述第一标识集合中获取将保持正常运行的应用的标识;When the pressing operation of the manipulation interface is detected, obtaining an identifier of an application that will remain in normal operation from the first identification set according to the pressing operation;
将与所述保持正常运行的应用所对应的传感器的标识从所述第二标识集合中移除,以生成第三标识集合;And deleting an identifier of a sensor corresponding to the application that is to be normally operated from the second identifier set to generate a third identifier set;
关闭与所述第三标识集合中的各个标识对应的传感器。The sensors corresponding to the respective identifiers in the third identification set are closed.
一实施例中,所述监测到对操控界面的按压操作时,根据所述按压操作从所述第一集合中获取将保持正常运行的应用的标识步骤包括:In an embodiment, when the pressing operation on the manipulation interface is detected, the step of identifying the application that will remain in normal operation from the first set according to the pressing operation includes:
监测到对操控界面的第一按压操作时,根据所述第一按压操作显示所述第一标识集合;When the first pressing operation of the manipulation interface is detected, displaying the first identification set according to the first pressing operation;
监测到对第一标识集合的显示区域的第二按压操作时,根据所述第二按压操作从所述第一标识集合中选择出将保持运行的应用的标识。When the second pressing operation of the display area of the first identification set is detected, the identification of the application to be kept running is selected from the first identification set according to the second pressing operation.
一实施例中,所述监测到对操控界面的第一按压操作时,根据所述第一按压操作显示所述第一标识集合的步骤包括:In an embodiment, when the first pressing operation on the manipulation interface is detected, the step of displaying the first identification set according to the first pressing operation comprises:
监测到对操控界面的第一按压操作时,获取所述第一按压操作的第三预设参考量;Obtaining a third preset reference quantity of the first pressing operation when detecting a first pressing operation on the manipulation interface;
当所述第三预设参考量大于第一预设值时,在所述操控区域显示所述第一标识集合。When the third preset reference amount is greater than the first preset value, displaying the first identifier set in the manipulation area.
一实施例中,在所述获取正在使用传感器的应用的第一标识集合及正在运行的传感器的第二标识集合的步骤之后,还包括以下步骤:In an embodiment, after the step of acquiring the first identification set of the application that is using the sensor and the second identification set of the running sensor, the method further includes the following steps:
根据第一预设参考量对所述第一标识集合中的各个标识进行分级排序。And ranking each identifier in the first identifier set according to a first preset reference quantity.
一实施例中,所述监测到对操控界面的按压操作时,根据所述按压操作从所述第一标识集合中获取将保持正常运行的应用的步骤包括:In an embodiment, when the pressing operation on the manipulation interface is detected, the step of acquiring an application that will remain in normal operation from the first identification set according to the pressing operation includes:
监测到对操控界面的按压操作时,获取所述按压操作的第二预设参考量;Obtaining a second preset reference amount of the pressing operation when a pressing operation on the manipulation interface is detected;
以从高级到低级的优先顺序,根据所述第二预设参考量从所述第一标识集合中选择出对应数量的标识,从而获取将保持正常使用的应用的标识。And selecting, according to the second preset reference quantity, a corresponding quantity of identifiers from the first identifier set according to the priority order from the advanced level to the low level, thereby acquiring an identifier of an application that will remain in normal use.
一实施例中,所述第一预设参考量为所述第一标识集合中的各个标识所对应的应用的使用频率。In an embodiment, the first preset reference quantity is a frequency of use of an application corresponding to each identifier in the first identifier set.
一实施例中,所述第一预设参考量为分别运行所述第一标识集合中的各个标识所对应的应用的功耗值。In an embodiment, the first preset reference quantity is a power consumption value of an application corresponding to each identifier in the first identifier set.
一实施例中,所述第二预设参考量为所述按压操作的持续时间。In an embodiment, the second preset reference amount is a duration of the pressing operation.
一实施例中,所述第二预设参考量为所述按压操作的按压压力值。In an embodiment, the second preset reference amount is a pressing pressure value of the pressing operation.
在一优选实施例中,提供了一种传感器的关闭方法。请参照图1,图1为本发明实施例提供的传感器的关闭方法的一种流程图。其主要应用于移动终端,例如手机、平板电脑等设备中。本实施例的传感器的关闭方法包括以下步骤:In a preferred embodiment, a method of turning off a sensor is provided. Please refer to FIG. 1. FIG. 1 is a flowchart of a method for shutting down a sensor according to an embodiment of the present invention. It is mainly used in mobile terminals, such as mobile phones, tablets and other devices. The method for turning off the sensor of this embodiment includes the following steps:
S101,获取正在使用传感器的应用的第一标识集合及正在运行的传感器的第二标识集合。S101. Acquire a first identification set of an application that is using the sensor and a second identification set of the running sensor.
在一些实施例中,当移动终端设备检测自身的当前功耗值过高或者电量值过低或者CPU(Central Processing Unit,中央处理器)使用率过高时,可触发获取第一标识集合以及第二标识集合的操作。其中,该第一标识集合为正在使用传感器的应用的名称列表或者图标列表等。该第二标识集合为正在运行的传感器的名称列表或者图标列表。In some embodiments, when the mobile terminal device detects that its current power consumption value is too high or the power value is too low or the CPU (Central) Processing When the usage rate of the unit is too high, the operation of acquiring the first identifier set and the second identifier set may be triggered. The first identifier set is a name list or an icon list of an application that is using the sensor, and the like. The second set of identifiers is a list of names or icons of sensors that are running.
S102,监测到对操控界面的按压操作时,根据该按压操作从所述第一标识集合中获取将保持正常运行的应用的标识。S102. When the pressing operation of the manipulation interface is monitored, the identifier of the application that will remain in normal operation is acquired from the first identifier set according to the pressing operation.
在一些实施例中,在监测对操控界面的按压操作时,需要进行排查误操作的处理,当该按压操作的压力值过小或者该按压操作的持续时间过短时,判断该次操作为误操作,直接忽略该次按压操作。参考图2,在一些实施方式中,该步骤S102可以包括以下子步骤:In some embodiments, when monitoring the pressing operation on the manipulation interface, it is necessary to perform a process of troubleshooting the erroneous operation. When the pressure value of the pressing operation is too small or the duration of the pressing operation is too short, it is determined that the operation is wrong. Operation, directly ignore the pressing operation. Referring to FIG. 2, in some embodiments, the step S102 can include the following sub-steps:
S1021,监测到对操控界面的第一按压操作时,根据该第一按压操作显示所述第一标识集合。S1021: When the first pressing operation on the manipulation interface is detected, displaying the first identification set according to the first pressing operation.
该步骤S1021具体为监测到对操控界面的第一按压操作时,获取该第一按压操作的第三预设参考量;当该第三预设参考量大于第一预设值时,在所述操控区域显示所述第一标识集合。该第三预设参考量可以是该次按压操作的持续时间,或者按压压力值等。The step S1021 is specifically: acquiring a third preset reference quantity of the first pressing operation when the first pressing operation on the manipulation interface is detected; and when the third preset reference quantity is greater than the first preset value, The manipulation area displays the first identification set. The third preset reference amount may be the duration of the pressing operation, or the pressing pressure value or the like.
S1022,监测到对第一标识集合的显示区域的第二按压操作时,根据该第二按压操作从所述第一标识集合中选择出将保持运行的应用的标识。S1022. When the second pressing operation of the display area of the first identifier set is detected, the identifier of the application to be kept running is selected from the first identifier set according to the second pressing operation.
例如,该第二按压操作可以为预定时间段内的多次按压操作,每次按压操作均可以选择一个应用的标识。例如,当按压到QQ的标识的显示区域时,QQ被选择为将保持正常运行的应用。当按压到微信的标识的显示区域时,微信被选择为将保持正常运行的应用。For example, the second pressing operation may be a multiple pressing operation within a predetermined time period, and an identification of one application may be selected for each pressing operation. For example, when pressed to the display area of the logo of QQ, QQ is selected as the application that will remain in normal operation. When pressed to the display area of the WeChat logo, WeChat is selected as the application that will remain in normal operation.
S103,将与所述保持正常运行的应用所对应的传感器的标识从所述第二标识集合中移除,以生成第三标识集合。S103. Remove an identifier of a sensor corresponding to the application that is to be normally operated from the second identifier set to generate a third identifier set.
在一些实施例中,例如,用户希望保持高德地图正常使用,保持正常运行该高德地图需要的定位传感器正常运行,因此,将该定位传感器从该第二标识集合中移除,以生成第三标识集合。In some embodiments, for example, the user wishes to keep the high-definition map in normal use, and the positioning sensor required to maintain the normal operation of the high-definition map is normally operated, and therefore, the positioning sensor is removed from the second identification set to generate the first Three logo collections.
S104,关闭与所述第三标识集合中的各个标识对应的传感器。S104. Close the sensors corresponding to the respective identifiers in the third identifier set.
在一些实施例中,关闭与各个标识对应的传感器时,还要关闭所有使用该传感器的调用函数以及关闭第一标识集合中除开需要保持正常运行的应用,其它应用都应关闭,以降低功耗以及CPU使用率。In some embodiments, when the sensors corresponding to the respective identifiers are turned off, all the calling functions using the sensors are also turned off, and the applications in the first identifier set that need to remain in normal operation are turned off, and other applications should be turned off to reduce power consumption. And CPU usage.
由上可知,本实施例通过获取正在使用传感器的应用的第一标识集合及正在运行的传感器的第二标识集合;监测到对操控界面的按压操作时,根据该按压操作从所述第一标识集合中获取将保持正常运行的应用的标识;将与所述保持正常运行的应用所对应的传感器的标识从所述第二标识集合中移除,以生成第三标识集合;关闭与所述第三标识集合中的各个标识对应的传感器,从而实现将正在运行的传感器关闭并且具有降低功耗的有益效果,并且,由于关闭时预先将需要正常运行的应用筛选出,获取了正常运行该应用需要的传感器,并将该传感器从第二标识集合中移除,从而在关闭传感器时不会关闭需要正常使用的传感器,具有控制精确,提高用户体验的有益效果。As can be seen from the above, the embodiment obtains the first identification set of the application that is using the sensor and the second identification set of the running sensor; when the pressing operation of the manipulation interface is monitored, the first identification is performed according to the pressing operation Obtaining, in the collection, an identifier of an application that will remain in normal operation; removing an identifier of a sensor corresponding to the application that is to be in a normal operation from the second identifier set to generate a third identifier set; The three identifiers identify the sensors corresponding to the respective identifiers, thereby achieving the benefit of turning off the running sensor and having the effect of reducing power consumption, and since the application that needs to run normally is filtered out before the shutdown, the application needs to be normally run. The sensor removes the sensor from the second set of identifiers, so that when the sensor is turned off, the sensor that needs to be used normally is not turned off, and the control effect is accurate and the user experience is improved.
在一优选实施例中,请参照图2,图2为本发明实施例提供的传感器的关闭方法的另一种流程图。其主要应用于移动终端,例如手机、平板电脑等设备中。本优选实施例的传感器的关闭方法包括以下步骤:In a preferred embodiment, please refer to FIG. 2. FIG. 2 is another flowchart of a method for turning off a sensor according to an embodiment of the present invention. It is mainly used in mobile terminals, such as mobile phones, tablets and other devices. The method for turning off the sensor of the preferred embodiment includes the following steps:
S201,获取正在使用传感器的应用的第一标识集合及正在运行的传感器的第二标识集合。S201. Acquire a first identification set of an application that is using the sensor and a second identification set of the running sensor.
在一些实施例中,当移动终端设备检测自身的当前功耗值过高或者电量值过低或者CPU使用率过高时,触发获取第一标识集合以及第二标识集合的操作。其中,该第一标识集合为正在使用传感器的应用的名称列表或者图标列表等。该第二标识集合为正在运行的传感器的名称列表或者图标列表。In some embodiments, when the mobile terminal device detects that its current power consumption value is too high or the power value is too low or the CPU usage is too high, the operation of acquiring the first identifier set and the second identifier set is triggered. The first identifier set is a name list or an icon list of an application that is using the sensor, and the like. The second set of identifiers is a list of names or icons of sensors that are running.
S202,根据第一预设参考量对该第一标识集合中的各个标识进行分级排序。S202. Perform hierarchical ranking on each identifier in the first identifier set according to the first preset reference quantity.
在该步骤S202中,该第一预设参考量可以是与该第一标识集合中的标识对应的应用在正常运行时的功耗值,或者可以是该第一标识集合中的各个标识所对应的应用的使用频率。分级后以低级到高级的顺序在该第一标识集合中排列该多个标识。In the step S202, the first preset reference quantity may be a power consumption value of the application corresponding to the identifier in the first identifier set during normal operation, or may be corresponding to each identifier in the first identifier set. The frequency of use of the app. After grading, the plurality of identities are arranged in the first identification set in a low-to-high order.
S203,监测到对操控界面的按压操作时,根据该按压操作从所述第一标识集合中获取将保持正常运行的应用的标识。S203. When a pressing operation on the manipulation interface is detected, obtaining an identifier of an application that will remain in normal operation from the first identification set according to the pressing operation.
在一些实施例中,在监测对操控界面的按压操作时,需要进行排查误操作的处理,当该按压操作的压力值过小或者该按压操作的持续时间过短时,判断该次操作为误操作,直接忽略该次按压操作。参考图4,在一些实施方式中,该步骤S203可以包括以下子步骤:In some embodiments, when monitoring the pressing operation on the manipulation interface, it is necessary to perform a process of troubleshooting the erroneous operation. When the pressure value of the pressing operation is too small or the duration of the pressing operation is too short, it is determined that the operation is wrong. Operation, directly ignore the pressing operation. Referring to FIG. 4, in some embodiments, the step S203 may include the following sub-steps:
S2031,监测到对操控界面的按压操作时,获取该按压操作的第二预设参考量;其中,该第二预设参考量可以是该次按压的时间、按压压力等。S2031: When a pressing operation on the manipulation interface is detected, acquiring a second preset reference amount of the pressing operation; wherein the second preset reference amount may be a time of the pressing, a pressing pressure, or the like.
S2032,以从高级到低级的优先顺序,根据所述第二预设参考量从所述第一标识集合中选择出对应数量的标识,从而获取将保持正常使用的应用的标识。S2032: Select a corresponding number of identifiers from the first identifier set according to the second preset reference quantity in a priority order from high level to low level, so as to obtain an identifier of an application that will remain in normal use.
例如,当该第二预设参考量是按压的时间时,当该按压的时间为1秒时,选出优先级最高的应用所对应的标识。当该按压时间为2秒时,选出优先级最高以及第二高的应用所对应的标识。当该按压时间超过5秒时,直接选出所有应用对应的标识。For example, when the second preset reference amount is the time of pressing, when the pressing time is 1 second, the identifier corresponding to the application with the highest priority is selected. When the pressing time is 2 seconds, the identifier corresponding to the application with the highest priority and the second highest is selected. When the pressing time exceeds 5 seconds, the identifier corresponding to all applications is directly selected.
当该第二预设参考量是按压的压力值时,同样根据该压力值的大小,选择出对应数量的应用的标识,并且从优先级最高的一个应用的标识开始,逐级降低。When the second preset reference amount is the pressed pressure value, the identifier of the corresponding number of applications is also selected according to the magnitude of the pressure value, and is gradually decreased from the identifier of the highest priority application.
S204,将与所述保持正常运行的应用所对应的传感器的标识从所述第二标识集合中移除,以生成第三标识集合。S204. Remove an identifier of a sensor corresponding to the application that is to be normally operated from the second identifier set to generate a third identifier set.
在一些实施例中,例如,用户希望保持百度地图正常使用,保持正常运行该百度地图需要的定位传感器正常运行,因此,将该定位传感器从该第二标识集合中移除,以生成第三标识集合。In some embodiments, for example, the user wants to keep the Baidu map in normal use, and keeps the positioning sensor required for the normal operation of the Baidu map to operate normally. Therefore, the positioning sensor is removed from the second identifier set to generate a third identifier. set.
S205,关闭与所述第三标识集合中的各个标识对应的传感器。S205. Close the sensors corresponding to the respective identifiers in the third identifier set.
在一些实施例中,关闭与各个标识对应的传感器时,还要关闭所有使用该传感器的调用函数以及关闭第一标识集合中除开需要保持正常运行的应用,其它应用都应关闭,以降低功耗以及CPU使用率。In some embodiments, when the sensors corresponding to the respective identifiers are turned off, all the calling functions using the sensors are also turned off, and the applications in the first identifier set that need to remain in normal operation are turned off, and other applications should be turned off to reduce power consumption. And CPU usage.
由上可知,本实施例通过获取正在使用传感器的应用的第一标识集合及正在运行的传感器的第二标识集合;根据第一预设参考量对该第一标识集合中的各个标识进行分级排序;监测到对操控界面的按压操作时,根据该按压操作从所述第一标识集合中获取将保持正常运行的应用的标识;将与所述保持正常运行的应用所对应的传感器的标识从所述第二标识集合中移除,以生成第三标识集合;关闭与所述第三标识集合中的各个标识对应的传感器,从而关闭需要关闭的传感器从而实现降低功耗的效果,并且,由于对应用程序的优先级进行了排序,在选择需要保持正常运行的应用时,可以通过按压操作的参考量来从高优先级到低优先级快速选择出需要保留正常运行的应用,从而获取需要正常运行的传感器,具有操作便捷、提高用户体验的有益效果。It can be seen that, in this embodiment, the first identifier set of the application that is using the sensor and the second identifier set of the running sensor are obtained; and the identifiers in the first identifier set are sorted according to the first preset reference quantity. Obtaining an identifier of an application that will remain in normal operation from the first identification set according to the pressing operation when monitoring a pressing operation on the manipulation interface; and identifying an identifier of the sensor corresponding to the application that maintains the normal operation Removing the second identifier set to generate a third identifier set; turning off the sensors corresponding to the respective identifiers in the third identifier set, thereby turning off the sensor that needs to be turned off to achieve the effect of reducing power consumption, and The priority of the application is sorted. When selecting an application that needs to be kept running, you can quickly select the application that needs to keep running from high priority to low priority by pressing the reference amount of the operation, so that the application needs to run normally. The sensor has the beneficial effect of convenient operation and improved user experience.
本发明还提供了一种传感器的关闭装置,包括:The invention also provides a sensor closing device, comprising:
第一获取模块,用于获取正在使用传感器的应用的第一标识集合及正在运行的传感器的第二标识集合;a first acquiring module, configured to acquire a first identifier set of an application that is using the sensor and a second identifier set of the running sensor;
第二获取模块,用于监测到对操控界面的按压操作时,根据所述按压操作从所述第一标识集合中获取将保持正常运行的应用的标识;a second acquiring module, configured to: when detecting a pressing operation on the manipulation interface, acquire, from the first identifier set, an identifier of an application that will remain in normal operation according to the pressing operation;
生成模块,用于将与所述保持正常运行的应用所对应的传感器的标识从所述第二标识集合中移除,以生成第三标识集合;a generating module, configured to remove, from the second identifier set, an identifier of a sensor corresponding to the keep-alive application to generate a third identifier set;
关闭模块,用于关闭与所述第三标识集合中的各个标识对应的传感器。And a closing module, configured to close a sensor corresponding to each identifier in the third identifier set.
一实施例中,所述第二获取模块包括:In an embodiment, the second obtaining module comprises:
显示单元,用于监测到对操控界面的第一按压操作时,根据所述第一按压操作显示所述第一标识集合;a display unit, configured to display the first identification set according to the first pressing operation when monitoring a first pressing operation on the manipulation interface;
选择单元,用于监测到对第一标识集合的显示区域的第二按压操作时,根据所述第二按压操作从所述第一标识集合中选择出将保持运行的应用的标识。And a selecting unit, configured to: when the second pressing operation of the display area of the first identification set is monitored, select an identifier of the application to be kept running from the first identification set according to the second pressing operation.
一实施例中,所述显示单元包括:In an embodiment, the display unit comprises:
获取子单元,用于监测到对操控界面的第一按压操作时,获取所述第一按压操作的第三预设参考量;Obtaining a sub-unit, configured to acquire a third preset reference quantity of the first pressing operation when detecting a first pressing operation on the manipulation interface;
显示子单元,用于当所述第三预设参考量大于第一预设值时,在所述操控区域显示所述第一标识集合。The display subunit is configured to display the first identifier set in the manipulation area when the third preset reference quantity is greater than the first preset value.
一实施例中,所述传感器的关闭装置还包括:In an embodiment, the closing device of the sensor further includes:
分级模块,用于根据第一预设参考量对所述第一标识集合中的各个标识进行分级排序。And a grading module, configured to hierarchically sort each identifier in the first identifier set according to the first preset reference quantity.
一实施例中,所述第二获取模块包括:In an embodiment, the second obtaining module comprises:
第一获取单元,用于监测到对操控界面的按压操作时,获取所述按压操作的第二预设参考量;a first acquiring unit, configured to acquire a second preset reference quantity of the pressing operation when detecting a pressing operation on the manipulation interface;
第二获取单元,用于以从高级到低级的优先顺序,根据所述第二预设参考量从所述第一标识集合中选择出对应数量的标识,从而获取将保持正常使用的应用的标识。a second obtaining unit, configured to select, according to the second preset reference quantity, a corresponding quantity of identifiers from the first identifier set according to the priority order from high level to low level, thereby acquiring an identifier of an application that will remain in normal use .
在一优选实施例中,提供了一种传感器的关闭装置。请参照图5,图5为本发明实施例提供的传感器的关闭装置的一种结构图。其主要应用于移动终端,例如手机、平板电脑等设备中。本优选实施例的传感器的关闭装置包括:第一获取模块301、第二获取模块302、生成模块303以及关闭模块304。In a preferred embodiment, a closure for a sensor is provided. Please refer to FIG. 5. FIG. 5 is a structural diagram of a sensor closing device according to an embodiment of the present invention. It is mainly used in mobile terminals, such as mobile phones, tablets and other devices. The shutdown device of the sensor of the preferred embodiment includes a first acquisition module 301, a second acquisition module 302, a generation module 303, and a shutdown module 304.
其中,该第一获取模块301用于获取正在使用传感器的应用的第一标识集合及正在运行的传感器的第二标识集合。The first obtaining module 301 is configured to acquire a first identifier set of an application that is using the sensor and a second identifier set of the running sensor.
该第二获取模块302用于监测到对操控界面的按压操作时,根据该按压操作从所述第一标识集合中获取将保持正常运行的应用的标识。The second obtaining module 302 is configured to: when detecting a pressing operation on the manipulation interface, acquire an identifier of an application that will remain in normal operation from the first identifier set according to the pressing operation.
参考图6,在一些实施例中,第二获取模块302包括:显示单元3021以及选择单元3022。该显示单元3021用于监测到对操控界面的第一按压操作时,根据该第一按压操作显示所述第一标识集合;选择单元3022用于监测到对第一标识集合的显示区域的第二按压操作时,根据该第二按压操作从所述第一标识集合中选择出将保持运行的应用的标识。Referring to FIG. 6 , in some embodiments, the second acquisition module 302 includes a display unit 3021 and a selection unit 3022 . The display unit 3021 is configured to: when the first pressing operation on the manipulation interface is monitored, display the first identification set according to the first pressing operation; the selecting unit 3022 is configured to monitor the second display area of the first identification set When the pressing operation is performed, an identifier of an application to be kept running is selected from the first identification set according to the second pressing operation.
参考图7,在一些实施例中,显示单元3021包括获取子单元30211以及显示子单元30212。该获取子单元30211用于监测到对操控界面的第一按压操作时,获取该第一按压操作的第三预设参考量。显示子单元30212用于当该第三预设参考量大于第一预设值时,在所述操控区域显示所述第一标识集合。Referring to FIG. 7, in some embodiments, display unit 3021 includes an acquisition sub-unit 30211 and a display sub-unit 30212. The acquiring sub-unit 30211 is configured to acquire a third preset reference quantity of the first pressing operation when the first pressing operation on the manipulation interface is monitored. The display subunit 30212 is configured to display the first identifier set in the manipulation area when the third preset reference quantity is greater than the first preset value.
该生成模块303用于将与所述保持正常运行的应用所对应的传感器的标识从所述第二标识集合中移除,以生成第三标识集合。The generating module 303 is configured to remove an identifier of a sensor corresponding to the keep-alive application from the second identifier set to generate a third identifier set.
该关闭模块304用于关闭与所述第三标识集合中的各个标识对应的传感器。The shutdown module 304 is configured to close the sensors corresponding to the respective identifiers in the third identifier set.
由上可知,本实施例通过获取正在使用传感器的应用的第一标识集合及正在运行的传感器的第二标识集合;监测到对操控界面的按压操作时,根据该按压操作从所述第一标识集合中获取将保持正常运行的应用的标识;将与所述保持正常运行的应用所对应的传感器的标识从所述第二标识集合中移除,以生成第三标识集合;关闭与所述第三标识集合中的各个标识对应的传感器,从而实现将正在运行的传感器关闭并且具有降低功耗的有益效果,并且,由于关闭时预先将需要正常运行的应用筛选出,获取了正常运行该应用需要的传感器,并将该传感器从第二标识集合中移除,从而在关闭传感器时不会关闭需要正常使用的传感器,具有控制精确,提高用户体验的有益效果。As can be seen from the above, the embodiment obtains the first identification set of the application that is using the sensor and the second identification set of the running sensor; when the pressing operation of the manipulation interface is monitored, the first identification is performed according to the pressing operation Obtaining, in the collection, an identifier of an application that will remain in normal operation; removing an identifier of a sensor corresponding to the application that is to be in a normal operation from the second identifier set to generate a third identifier set; The three identifiers identify the sensors corresponding to the respective identifiers, thereby achieving the benefit of turning off the running sensor and having the effect of reducing power consumption, and since the application that needs to run normally is filtered out before the shutdown, the application needs to be normally run. The sensor removes the sensor from the second set of identifiers, so that when the sensor is turned off, the sensor that needs to be used normally is not turned off, and the control effect is accurate and the user experience is improved.
在一优选实施例中,请参照图8,图8为本发明实施例提供的传感器的关闭装置的另一种结构图。其主要应用于移动终端,例如手机、平板电脑等设备中。本优选实施例的传感器的关闭装置包括:第一获取模块301、分级模块305、第二获取模块302、生成模块303以及关闭模块304。In a preferred embodiment, please refer to FIG. 8. FIG. 8 is another structural diagram of a sensor closing device according to an embodiment of the present invention. It is mainly used in mobile terminals, such as mobile phones, tablets and other devices. The shutdown device of the sensor of the preferred embodiment includes a first acquisition module 301, a classification module 305, a second acquisition module 302, a generation module 303, and a shutdown module 304.
其中,该第一获取模块301用于获取正在使用传感器的应用的第一标识集合及正在运行的传感器的第二标识集合。The first obtaining module 301 is configured to acquire a first identifier set of an application that is using the sensor and a second identifier set of the running sensor.
分级模块305用于根据第一预设参考量对该第一标识集合中的各个标识进行分级排序。The grading module 305 is configured to hierarchically sort each identifier in the first identifier set according to the first preset reference quantity.
该第二获取模块302用于监测到对操控界面的按压操作时,根据该按压操作从所述第一标识集合中获取将保持正常运行的应用的标识。参考图9,在一些实施例中,第二获取模块302包括:第一获取单元3023以及第二获取单元3034。其中,第一获取单元3023用于监测到对操控界面的按压操作时,获取该按压操作的第二预设参考量。第二获取单元3024用于以从高级到低级的优先顺序,根据所述第二预设参考量从所述第一标识集合中选择出对应数量的标识,从而获取将保持正常使用的应用的标识。The second obtaining module 302 is configured to: when detecting a pressing operation on the manipulation interface, acquire an identifier of an application that will remain in normal operation from the first identifier set according to the pressing operation. Referring to FIG. 9 , in some embodiments, the second obtaining module 302 includes: a first obtaining unit 3023 and a second acquiring unit 3034. The first obtaining unit 3023 is configured to acquire a second preset reference quantity of the pressing operation when the pressing operation on the manipulation interface is monitored. The second obtaining unit 3024 is configured to select a corresponding number of identifiers from the first identifier set according to the second preset reference quantity in a priority order from high level to low level, thereby acquiring an identifier of an application that will remain in normal use. .
该生成模块303用于将与所述保持正常运行的应用所对应的传感器的标识从所述第二标识集合中移除,以生成第三标识集合。The generating module 303 is configured to remove an identifier of a sensor corresponding to the keep-alive application from the second identifier set to generate a third identifier set.
该关闭模块304用于关闭与所述第三标识集合中的各个标识对应的传感器。The shutdown module 304 is configured to close the sensors corresponding to the respective identifiers in the third identifier set.
由上可知,本实施例通过获取正在使用传感器的应用的第一标识集合及正在运行的传感器的第二标识集合;根据第一预设参考量对该第一标识集合中的各个标识进行分级排序;监测到对操控界面的按压操作时,根据该按压操作从所述第一标识集合中获取将保持正常运行的应用的标识;将与所述保持正常运行的应用所对应的传感器的标识从所述第二标识集合中移除,以生成第三标识集合;关闭与所述第三标识集合中的各个标识对应的传感器,从而关闭需要关闭的传感器从而实现降低功耗的效果,并且,由于对应用程序的优先级进行了排序,在选择需要保持正常运行的应用时,可以通过按压操作的参考量来从高优先级到低优先级快速选择出需要保留正常运行的应用,从而获取需要正常运行的传感器,具有操作便捷、提高用户体验的有益效果。It can be seen that, in this embodiment, the first identifier set of the application that is using the sensor and the second identifier set of the running sensor are obtained; and the identifiers in the first identifier set are sorted according to the first preset reference quantity. Obtaining an identifier of an application that will remain in normal operation from the first identification set according to the pressing operation when monitoring a pressing operation on the manipulation interface; and identifying an identifier of the sensor corresponding to the application that maintains the normal operation Removing the second identifier set to generate a third identifier set; turning off the sensors corresponding to the respective identifiers in the third identifier set, thereby turning off the sensor that needs to be turned off to achieve the effect of reducing power consumption, and The priority of the application is sorted. When selecting an application that needs to be kept running, you can quickly select the application that needs to keep running from high priority to low priority by pressing the reference amount of the operation, so that the application needs to run normally. The sensor has the beneficial effect of convenient operation and improved user experience.
本发明实施例还提供一种电子设备,该电子设备可以是智能手机、平板电脑等设备。如图10所示,电子设备400包括处理器401、存储器402。其中,处理器401与存储器402电性连接。The embodiment of the invention further provides an electronic device, which may be a device such as a smart phone or a tablet computer. As shown in FIG. 10, the electronic device 400 includes a processor 401 and a memory 402. The processor 401 is electrically connected to the memory 402.
处理器401是电子设备400的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或加载存储在存储器402内的应用程序,以及调用存储在存储器402内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。The processor 401 is a control center of the electronic device 400, which connects various parts of the entire electronic device using various interfaces and lines, executes the electronic by running or loading an application stored in the memory 402, and calling data stored in the memory 402. The various functions and processing data of the device enable overall monitoring of the electronic device.
在本实施例中,电子设备400中的处理器401会按照如下的步骤,将一个或一个以上的应用程序的进程对应的指令加载到存储器402中,并由处理器401来运行存储在存储器402中的应用程序,从而实现各种功能:In this embodiment, the processor 401 in the electronic device 400 loads the instructions corresponding to the process of one or more applications into the memory 402 according to the following steps, and is stored and stored in the memory 402 by the processor 401. In the application, thus implementing various functions:
获取正在使用传感器的应用的第一标识集合及正在运行的传感器的第二标识集合;Obtaining a first set of identifiers of the application that is using the sensor and a second set of identifiers of the running sensors;
监测到对操控界面的按压操作时,根据所述按压操作从所述第一标识集合中获取将保持正常运行的应用的标识;When the pressing operation of the manipulation interface is detected, obtaining an identifier of an application that will remain in normal operation from the first identification set according to the pressing operation;
将与所述将保持正常运行的应用所对应的传感器的标识从所述第二标识集合中移除,以生成第三标识集合;Removing an identifier of a sensor corresponding to the application that will remain in normal operation from the second identifier set to generate a third identifier set;
关闭与所述第三标识集合中的各个标识对应的传感器。The sensors corresponding to the respective identifiers in the third identification set are closed.
在一些实施例中,监测到对操控界面的第一按压操作时,处理器401还执行以下步骤:根据所述第一按压操作显示所述第一标识集合;监测到对第一标识集合的显示区域的第二按压操作时,根据所述第二按压操作从所述第一标识集合中选择出将保持运行的应用的标识。In some embodiments, when the first pressing operation on the manipulation interface is detected, the processor 401 further performs the steps of: displaying the first identification set according to the first pressing operation; monitoring the display of the first identification set In the second pressing operation of the area, the identifier of the application to be kept running is selected from the first identification set according to the second pressing operation.
在一些实施例中,监测到对操控界面的第一按压操作时,处理器401还执行以下步骤:监测到对操控界面的第一按压操作时,获取所述第一按压操作的第三预设参考量;当所述第三预设参考量大于第一预设值时,在所述操控区域显示所述第一标识集合。In some embodiments, when the first pressing operation on the manipulation interface is detected, the processor 401 further performs the following steps: when the first pressing operation on the manipulation interface is monitored, acquiring the third preset of the first pressing operation a reference quantity; when the third preset reference quantity is greater than the first preset value, displaying the first identification set in the manipulation area.
在一些实施例中,在所述获取正在使用传感器的应用的第一标识集合及正在运行的传感器的第二标识集合后,处理器401还执行以下步骤:根据第一预设参考量对所述第一标识集合中的各个标识进行分级排序。In some embodiments, after the obtaining the first identification set of the application that is using the sensor and the second identification set of the running sensor, the processor 401 further performing the step of: performing the following according to the first preset reference amount Each of the identifiers in the first set of identifiers is hierarchically ordered.
在一些实施例中,处理器401还执行以下步骤:监测到对操控界面的按压操作时,获取所述按压操作的第二预设参考量;以从高级到低级的优先顺序,根据所述第二预设参考量从所述第一标识集合中选择出对应数量的标识,从而获取将保持正常使用的应用的标识。In some embodiments, the processor 401 further performs the following steps: when detecting a pressing operation on the manipulation interface, acquiring a second preset reference amount of the pressing operation; in order of priority from high level to low level, according to the first The second preset reference quantity selects a corresponding number of identifiers from the first identifier set, thereby obtaining an identifier of an application that will remain in normal use.
存储器402可用于存储应用程序和数据。存储器402存储的应用程序中包含有可在处理器中执行的指令。应用程序可以组成各种功能模块。处理器401通过运行存储在存储器402的应用程序,从而执行各种功能应用以及数据处理。Memory 402 can be used to store applications and data. The application stored in the memory 402 contains instructions that are executable in the processor. Applications can form various functional modules. The processor 401 executes various functional applications and data processing by running an application stored in the memory 402.
在一些实施例中,如图11所示,电子设备400还包括:显示频403、控制电路404、射频电路405、输入单元406、音频电路407、传感器408以及电源409。其中,处理器401分别与显示频403、控制电路404射频电路405、输入单元406、音频电路407、传感器408以及电源409电性连接。In some embodiments, as shown in FIG. 11, the electronic device 400 further includes a display frequency 403, a control circuit 404, a radio frequency circuit 405, an input unit 406, an audio circuit 407, a sensor 408, and a power source 409. The processor 401 is electrically connected to the display frequency 403, the control circuit 404 radio frequency circuit 405, the input unit 406, the audio circuit 407, the sensor 408, and the power source 409, respectively.
显示屏403可用于显示由用户输入的信息或提供给用户的信息以及终端的各种图形用户接口,这些图形用户接口可以由图像、文本、图标、视频和其任意组合来构成。实际应用中,显示屏403可以作为本发明实施例中的操控界面。The display screen 403 can be used to display information entered by the user or information provided to the user as well as various graphical user interfaces of the terminal, which can be composed of images, text, icons, video, and any combination thereof. In practical applications, the display screen 403 can serve as a manipulation interface in the embodiment of the present invention.
控制电路404与显示屏403电性连接,用于控制显示屏403显示信息。The control circuit 404 is electrically connected to the display screen 403 for controlling the display screen 403 to display information.
射频电路405用于收发射频信号,以通过无线通信与网络设备或其他电子设备建立无线通讯,与网络设备或其他电子设备之间收发信号。The radio frequency circuit 405 is configured to transmit and receive radio frequency signals to establish wireless communication with network devices or other electronic devices through wireless communication, and to transmit and receive signals with network devices or other electronic devices.
输入单元406可用于接收输入的数字、字符信息或用户特征信息(例如指纹),以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。其中,输入单元406可以包括指纹识别模组。The input unit 406 can be configured to receive input digits, character information, or user characteristic information (eg, fingerprints), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function controls. The input unit 406 can include a fingerprint identification module.
音频电路407可通过扬声器、传声器提供用户与终端之间的音频接口。The audio circuit 407 can provide an audio interface between the user and the terminal through a speaker and a microphone.
传感器408用于采集外部环境信息。传感器408可以包括环境亮度传感器、加速度传感器、光传感器、运动传感器、以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器。比如,环境光传感器可根据环境光线的明暗来调节显示面板的亮度,接近传感器可在终端移动到耳边时,关闭显示面板和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等; 至于终端还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。Sensor 408 is used to collect external environmental information. Sensor 408 can include ambient brightness sensors, acceleration sensors, light sensors, motion sensors, and other sensors. In particular, the light sensor can include an ambient light sensor and a proximity sensor. For example, the ambient light sensor can adjust the brightness of the display panel according to the brightness of the ambient light, and the proximity sensor can turn off the display panel and/or the backlight when the terminal moves to the ear. As a kind of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity. It can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; Other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, and the like that can be configured in the terminal are not described herein.
电源409用于给电子设备400的各个部件供电。在一些实施例中,电源409可以通过电源管理系统与处理器401逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。Power source 409 is used to power various components of electronic device 400. In some embodiments, the power supply 409 can be logically coupled to the processor 401 through a power management system to enable functions such as managing charging, discharging, and power management through the power management system.
尽管图11中未示出,电子设备400还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown in FIG. 11, the electronic device 400 may further include a camera, a Bluetooth module, and the like, and details are not described herein.
本发明实施例提供的电子设备,通过获取正在使用传感器的应用的第一标识集合及正在运行的传感器的第二标识集合;监测到对操控界面的按压操作时,根据该按压操作从所述第一标识集合中获取将保持正常运行的应用的标识;将与所述保持正常运行的应用所对应的传感器的标识从所述第二标识集合中移除,以生成第三标识集合;关闭与所述第三标识集合中的各个标识对应的传感器,从而实现将正在运行的传感器关闭并且具有降低功耗的有益效果,并且,由于关闭时预先将需要正常运行的应用筛选出,获取了正常运行该应用需要的传感器,并将该传感器从第二标识集合中移除,从而在关闭传感器时不会关闭需要正常使用的传感器,具有控制精确、提高用户体验的有益效果。An electronic device according to an embodiment of the present invention obtains a first identification set of an application that is using a sensor and a second identification set of a running sensor; and when a pressing operation on the manipulation interface is detected, according to the pressing operation, the Obtaining, in an identifier set, an identifier of an application that will remain in normal operation; removing an identifier of a sensor corresponding to the application that remains in operation from the second identifier set to generate a third identifier set; The sensors corresponding to the respective identifiers in the third identifier set are implemented, so that the running sensor is turned off and the power consumption is reduced, and since the application that needs to run normally is filtered out before the shutdown, the normal operation is obtained. Applying the required sensor and removing the sensor from the second identification set, so that the sensor that needs to be used normally is not turned off when the sensor is turned off, and the control effect is accurate and the user experience is improved.
本发明实施例还提供一种存储介质,所述存储介质中存储有多条指令,所述指令适于由处理器加载以执行上述任一实施例所述的传感器的关闭方法。The embodiment of the invention further provides a storage medium, wherein the storage medium stores a plurality of instructions, the instructions being adapted to be loaded by a processor to perform the method for shutting down the sensor according to any of the above embodiments.
需要说明的是,本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于计算机可读存储介质中,如存储在终端的存储器中,并被该终端内的至少一个处理器执行,在执行过程中可包括如信息发布方法的实施例的流程。其中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。It should be noted that those skilled in the art can understand that all or part of the steps of the foregoing embodiments can be completed by a program to instruct related hardware, and the program can be stored in a computer readable storage medium, such as It is stored in the memory of the terminal and executed by at least one processor within the terminal, and may include a flow of an embodiment of the information distribution method during execution. The storage medium may include: a read only memory (ROM, Read) Only Memory), Random Access Memory (RAM), disk or CD.
本文提供了实施例的各种操作。在一个实施例中,所述的一个或多个操作可以构成一个或多个计算机可读介质上存储的计算机可读指令,其在被电子设备执行时将使得计算设备执行所述操作。描述一些或所有操作的顺序不应当被解释为暗示这些操作必需是顺序相关的。本领域技术人员将理解具有本说明书的益处的可替代的排序。而且,应当理解,不是所有操作必需在本文所提供的每个实施例中存在。Various operations of the embodiments are provided herein. In one embodiment, the one or more operations may constitute computer readable instructions stored on one or more computer readable media that, when executed by an electronic device, cause the computing device to perform the operations. The order in which some or all of the operations are described should not be construed as implying that the operations must be sequential. Those skilled in the art will appreciate alternative rankings that have the benefit of this specification. Moreover, it should be understood that not all operations must be present in every embodiment provided herein.
而且,本文所使用的词语“优选的”意指用作实例、示例或例证。奉文描述为“优选的”任意方面或设计不必被解释为比其他方面或设计更有利。相反,词语“优选的”的使用旨在以具体方式提出概念。如本申请中所使用的术语“或”旨在意指包含的“或”而非排除的“或”。即,除非另外指定或从上下文中清楚,“X使用A或B”意指自然包括排列的任意一个。即,如果X使用A;X使用B;或X使用A和B二者,则“X使用A或B”在前述任一示例中得到满足。Moreover, the word "preferred" as used herein is intended to serve as an example, instance, or illustration. Any aspect or design described as "preferred" by the text is not necessarily to be construed as being more advantageous than other aspects or designs. Instead, the use of the word "preferred" is intended to present a concept in a specific manner. The term "or" as used in this application is intended to mean an "or" or "an" That is, unless otherwise specified or clear from the context, "X employs A or B" means naturally including any one of the permutations. That is, if X uses A; X uses B; or X uses both A and B, then "X uses A or B" is satisfied in any of the foregoing examples.
而且,尽管已经相对于一个或多个实现方式示出并描述了本公开,但是本领域技术人员基于对本说明书和附图的阅读和理解将会想到等价变型和修改。本公开包括所有这样的修改和变型,并且仅由所附权利要求的范围限制。特别地关于由上述组件(例如元件、资源等)执行的各种功能,用于描述这样的组件的术语旨在对应于执行所述组件的指定功能(例如其在功能上是等价的)的任意组件(除非另外指示),即使在结构上与执行本文所示的本公开的示范性实现方式中的功能的公开结构不等同。此外,尽管本公开的特定特征已经相对于若干实现方式中的仅一个被公开,但是这种特征可以与如可以对给定或特定应用而言是期望和有利的其他实现方式的一个或多个其他特征组合。而且,就术语“包括”、“具有”、“含有”或其变形被用在具体实施方式或权利要求中而言,这样的术语旨在以与术语“包含”相似的方式包括。Rather, the present invention has been shown and described with respect to the embodiments of the present invention. The present disclosure includes all such modifications and variations, and is only limited by the scope of the appended claims. With particular regard to various functions performed by the above-described components (e.g., elements, resources, etc.), the terms used to describe such components are intended to correspond to performing the specified functions of the components (e.g., they are functionally equivalent). Any component (unless otherwise indicated) is not equivalent in structure to the disclosed structure for performing the functions in the exemplary implementations of the present disclosure as shown herein. Moreover, although certain features of the present disclosure have been disclosed with respect to only one of several implementations, such features may be combined with one or more other implementations as may be desired and advantageous for a given or particular application. Other feature combinations. Furthermore, the terms "comprising," "having," "having," or "include" or "comprising" are used in the particular embodiments or claims, and such terms are intended to be encompassed in a manner similar to the term "comprising."
本发明实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。上述提到的存储介质可以是只读存储器,磁盘或光盘等。上述的各装置或系统,可以执行相应方法实施例中的方法。Each functional unit in the embodiment of the present invention may be integrated into one processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. The integrated modules, if implemented in the form of software functional modules and sold or used as stand-alone products, may also be stored in a computer readable storage medium. The above mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like. Each of the above described devices or systems can perform the methods of the corresponding method embodiments.
综上所述,虽然本发明已以优选实施例揭露如上,但上述优选实施例并非用以限制本发明,本领域的普通技术人员,在不脱离本发明的精神和范围内,均可作各种更动与润饰,因此本发明的保护范围以权利要求界定的范围为准。In the above, the present invention has been disclosed in the above preferred embodiments, but the preferred embodiments are not intended to limit the present invention, and those skilled in the art can make various modifications without departing from the spirit and scope of the invention. The invention is modified and retouched, and the scope of the invention is defined by the scope defined by the claims.

Claims (20)

  1. 一种传感器的关闭方法,其中,包括以下步骤:A method for shutting down a sensor, comprising the steps of:
    获取正在使用传感器的应用的第一标识集合及正在运行的传感器的第二标识集合;Obtaining a first set of identifiers of the application that is using the sensor and a second set of identifiers of the running sensors;
    监测到对操控界面的按压操作时,根据所述按压操作从所述第一标识集合中获取将保持正常运行的应用的标识;When the pressing operation of the manipulation interface is detected, obtaining an identifier of an application that will remain in normal operation from the first identification set according to the pressing operation;
    将与所述将保持正常运行的应用所对应的传感器的标识从所述第二标识集合中移除,以生成第三标识集合;Removing an identifier of a sensor corresponding to the application that will remain in normal operation from the second identifier set to generate a third identifier set;
    关闭与所述第三标识集合中的各个标识对应的传感器。The sensors corresponding to the respective identifiers in the third identification set are closed.
  2. 根据权利要求1所述的传感器的关闭方法,其中,所述监测到对操控界面的按压操作时,根据所述按压操作从所述第一集合中获取将保持正常运行的应用的标识步骤包括:The method for shutting down a sensor according to claim 1, wherein when the pressing operation on the manipulation interface is detected, the step of identifying an application that will remain in normal operation from the first set according to the pressing operation comprises:
    监测到对操控界面的第一按压操作时,根据所述第一按压操作显示所述第一标识集合;When the first pressing operation of the manipulation interface is detected, displaying the first identification set according to the first pressing operation;
    监测到对第一标识集合的显示区域的第二按压操作时,根据所述第二按压操作从所述第一标识集合中选择出将保持运行的应用的标识。When the second pressing operation of the display area of the first identification set is detected, the identification of the application to be kept running is selected from the first identification set according to the second pressing operation.
  3. 根据权利要求2所述的传感器的关闭方法,其中,所述监测到对操控界面的第一按压操作时,根据所述第一按压操作显示所述第一标识集合的步骤包括:The method of closing a sensor according to claim 2, wherein the step of displaying the first identification set according to the first pressing operation when the first pressing operation on the manipulation interface is detected comprises:
    监测到对操控界面的第一按压操作时,获取所述第一按压操作的第三预设参考量;Obtaining a third preset reference quantity of the first pressing operation when detecting a first pressing operation on the manipulation interface;
    当所述第三预设参考量大于第一预设值时,在所述操控区域显示所述第一标识集合。When the third preset reference amount is greater than the first preset value, displaying the first identifier set in the manipulation area.
  4. 根据权利要求1所述的传感器的关闭方法,其中,在所述获取正在使用传感器的应用的第一标识集合及正在运行的传感器的第二标识集合的步骤之后,还包括以下步骤:The method of shutting down a sensor according to claim 1, wherein after the step of acquiring the first identification set of the application that is using the sensor and the second identification set of the running sensor, the method further comprises the steps of:
    根据第一预设参考量对所述第一标识集合中的各个标识进行分级排序。And ranking each identifier in the first identifier set according to a first preset reference quantity.
  5. 如权利要求4所述的传感器的关闭方法,其中,所述监测到对操控界面的按压操作时,根据所述按压操作从所述第一标识集合中获取将保持正常运行的应用的步骤包括:The method for shutting down a sensor according to claim 4, wherein when the pressing operation on the manipulation interface is detected, the step of acquiring an application that will remain in normal operation from the first identification set according to the pressing operation comprises:
    监测到对操控界面的按压操作时,获取所述按压操作的第二预设参考量;Obtaining a second preset reference amount of the pressing operation when a pressing operation on the manipulation interface is detected;
    以从高级到低级的优先顺序,根据所述第二预设参考量从所述第一标识集合中选择出对应数量的标识,从而获取将保持正常使用的应用的标识。And selecting, according to the second preset reference quantity, a corresponding quantity of identifiers from the first identifier set according to the priority order from the advanced level to the low level, thereby acquiring an identifier of an application that will remain in normal use.
  6. 根据权利要求4所述的传感器的关闭方法,其中,所述第一预设参考量为所述第一标识集合中的各个标识所对应的应用的使用频率。The method for shutting down a sensor according to claim 4, wherein the first preset reference quantity is a frequency of use of an application corresponding to each identifier in the first identifier set.
  7. 根据权利要求4所述的传感器的关闭方法,其中,所述第一预设参考量为分别运行所述第一标识集合中的各个标识所对应的应用的功耗值。The method for shutting down a sensor according to claim 4, wherein the first preset reference quantity is a power consumption value of an application corresponding to each identifier in the first identifier set.
  8. 根据权利要求5所述的传感器的关闭方法,其中,所述第二预设参考量为所述按压操作的持续时间。The method of turning off a sensor according to claim 5, wherein the second preset reference amount is a duration of the pressing operation.
  9. 根据权利要求5所述的传感器的关闭方法,其中,所述第二预设参考量为所述按压操作的按压压力值。The method of turning off a sensor according to claim 5, wherein the second preset reference amount is a pressing pressure value of the pressing operation.
  10. 一种传感器的关闭装置,其中,包括:A sensor closing device, comprising:
    第一获取模块,用于获取正在使用传感器的应用的第一标识集合及正在运行的传感器的第二标识集合;a first acquiring module, configured to acquire a first identifier set of an application that is using the sensor and a second identifier set of the running sensor;
    第二获取模块,用于监测到对操控界面的按压操作时,根据所述按压操作从所述第一标识集合中获取将保持正常运行的应用的标识;a second acquiring module, configured to: when detecting a pressing operation on the manipulation interface, acquire, from the first identifier set, an identifier of an application that will remain in normal operation according to the pressing operation;
    生成模块,用于将与所述保持正常运行的应用所对应的传感器的标识从所述第二标识集合中移除,以生成第三标识集合;a generating module, configured to remove, from the second identifier set, an identifier of a sensor corresponding to the keep-alive application to generate a third identifier set;
    关闭模块,用于关闭与所述第三标识集合中的各个标识对应的传感器。And a closing module, configured to close a sensor corresponding to each identifier in the third identifier set.
  11. 根据权利要求10所述的传感器的关闭装置,其中,所述第二获取模块包括:The device for shutting down a sensor according to claim 10, wherein the second acquisition module comprises:
    显示单元,用于监测到对操控界面的第一按压操作时,根据所述第一按压操作显示所述第一标识集合;a display unit, configured to display the first identification set according to the first pressing operation when monitoring a first pressing operation on the manipulation interface;
    选择单元,用于监测到对第一标识集合的显示区域的第二按压操作时,根据所述第二按压操作从所述第一标识集合中选择出将保持运行的应用的标识。And a selecting unit, configured to: when the second pressing operation of the display area of the first identification set is monitored, select an identifier of the application to be kept running from the first identification set according to the second pressing operation.
  12. 根据权利要求11所述的传感器的关闭装置,其中,所述显示单元包括:The device for shutting down a sensor according to claim 11, wherein the display unit comprises:
    获取子单元,用于监测到对操控界面的第一按压操作时,获取所述第一按压操作的第三预设参考量;Obtaining a sub-unit, configured to acquire a third preset reference quantity of the first pressing operation when detecting a first pressing operation on the manipulation interface;
    显示子单元,用于当所述第三预设参考量大于第一预设值时,在所述操控区域显示所述第一标识集合。The display subunit is configured to display the first identifier set in the manipulation area when the third preset reference quantity is greater than the first preset value.
  13. 根据权利要求10所述传感器的关闭装置,其中,还包括:The device for shutting down the sensor according to claim 10, further comprising:
    分级模块,用于根据第一预设参考量对所述第一标识集合中的各个标识进行分级排序。And a grading module, configured to hierarchically sort each identifier in the first identifier set according to the first preset reference quantity.
  14. 如权利要求10所述传感器的关闭装置,其中,所述第二获取模块包括:The device for shutting down the sensor of claim 10, wherein the second acquisition module comprises:
    第一获取单元,用于监测到对操控界面的按压操作时,获取所述按压操作的第二预设参考量;a first acquiring unit, configured to acquire a second preset reference quantity of the pressing operation when detecting a pressing operation on the manipulation interface;
    第二获取单元,用于以从高级到低级的优先顺序,根据所述第二预设参考量从所述第一标识集合中选择出对应数量的标识,从而获取将保持正常使用的应用的标识。a second obtaining unit, configured to select, according to the second preset reference quantity, a corresponding quantity of identifiers from the first identifier set according to the priority order from high level to low level, thereby acquiring an identifier of an application that will remain in normal use .
  15. 一种存储介质,其中,所述存储介质中存储有多条指令,所述指令适于由处理器加载以执行如权利要求1-9中任一项所述的传感器的关闭方法。A storage medium, wherein the storage medium stores a plurality of instructions adapted to be loaded by a processor to perform the method of turning off the sensor of any one of claims 1-9.
  16. 一种电子设备,其中,包括处理器、存储器,所述处理器与所述存储器电性连接,所述存储器用于存储指令和数据;所述处理器用于执行以下步骤:An electronic device, comprising a processor, a memory, the processor is electrically connected to the memory, the memory is used for storing instructions and data; and the processor is configured to perform the following steps:
    获取正在使用传感器的应用的第一标识集合及正在运行的传感器的第二标识集合;Obtaining a first set of identifiers of the application that is using the sensor and a second set of identifiers of the running sensors;
    监测到对操控界面的按压操作时,根据所述按压操作从所述第一标识集合中获取将保持正常运行的应用的标识;When the pressing operation of the manipulation interface is detected, obtaining an identifier of an application that will remain in normal operation from the first identification set according to the pressing operation;
    将与所述将保持正常运行的应用所对应的传感器的标识从所述第二标识集合中移除,以生成第三标识集合;Removing an identifier of a sensor corresponding to the application that will remain in normal operation from the second identifier set to generate a third identifier set;
    关闭与所述第三标识集合中的各个标识对应的传感器。The sensors corresponding to the respective identifiers in the third identification set are closed.
  17. 根据权利要求16所述的电子设备,其中,所述监测到对操控界面的按压操作时,根据所述按压操作从所述第一集合中获取将保持正常运行的应用的标识步骤包括:The electronic device according to claim 16, wherein, when the pressing operation on the manipulation interface is detected, the step of identifying the application that will remain in normal operation from the first set according to the pressing operation comprises:
    监测到对操控界面的第一按压操作时,根据所述第一按压操作显示所述第一标识集合;When the first pressing operation of the manipulation interface is detected, displaying the first identification set according to the first pressing operation;
    监测到对第一标识集合的显示区域的第二按压操作时,根据所述第二按压操作从所述第一标识集合中选择出将保持运行的应用的标识。When the second pressing operation of the display area of the first identification set is detected, the identification of the application to be kept running is selected from the first identification set according to the second pressing operation.
  18. 根据权利要求17所述的电子设备,其中,所述监测到对操控界面的第一按压操作时,根据所述第一按压操作显示所述第一标识集合的步骤包括:The electronic device according to claim 17, wherein the step of displaying the first identification set according to the first pressing operation when the first pressing operation on the manipulation interface is detected comprises:
    监测到对操控界面的第一按压操作时,获取所述第一按压操作的第三预设参考量;Obtaining a third preset reference quantity of the first pressing operation when detecting a first pressing operation on the manipulation interface;
    当所述第三预设参考量大于第一预设值时,在所述操控区域显示所述第一标识集合。When the third preset reference amount is greater than the first preset value, displaying the first identifier set in the manipulation area.
  19. 根据权利要求16所述的电子设备,其中,在所述获取正在使用传感器的应用的第一标识集合及正在运行的传感器的第二标识集合的步骤之后,还包括以下步骤:The electronic device according to claim 16, wherein after the step of acquiring the first identification set of the application that is using the sensor and the second identification set of the running sensor, the method further comprises the steps of:
    根据第一预设参考量对所述第一标识集合中的各个标识进行分级排序。And ranking each identifier in the first identifier set according to a first preset reference quantity.
  20. 根据权利要求19所述的电子设备,其中,所述监测到对操控界面的按压操作时,根据所述按压操作从所述第一标识集合中获取将保持正常运行的应用的步骤包括:The electronic device according to claim 19, wherein, when the pressing operation on the manipulation interface is detected, the step of acquiring an application that will remain in normal operation from the first identification set according to the pressing operation comprises:
    监测到对操控界面的按压操作时,获取所述按压操作的第二预设参考量;Obtaining a second preset reference amount of the pressing operation when a pressing operation on the manipulation interface is detected;
    以从高级到低级的优先顺序,根据所述第二预设参考量从所述第一标识集合中选择出对应数量的标识,从而获取将保持正常使用的应用的标识。And selecting, according to the second preset reference quantity, a corresponding quantity of identifiers from the first identifier set according to the priority order from the advanced level to the low level, thereby acquiring an identifier of an application that will remain in normal use.
PCT/CN2017/086473 2016-05-31 2017-05-29 Sensor shutdown method and apparatus, storage medium, and electronic device WO2017206876A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610379853.XA CN106095050B (en) 2016-05-31 2016-05-31 The method for closing and device of sensor
CN201610379853.X 2016-05-31

Publications (1)

Publication Number Publication Date
WO2017206876A1 true WO2017206876A1 (en) 2017-12-07

Family

ID=57230626

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/086473 WO2017206876A1 (en) 2016-05-31 2017-05-29 Sensor shutdown method and apparatus, storage medium, and electronic device

Country Status (2)

Country Link
CN (1) CN106095050B (en)
WO (1) WO2017206876A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106095050B (en) * 2016-05-31 2019-02-01 Oppo广东移动通信有限公司 The method for closing and device of sensor

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070038414A1 (en) * 2005-05-02 2007-02-15 American Power Conversion Corporation Methods and systems for managing facility power and cooling
CN103179650A (en) * 2011-12-23 2013-06-26 国际商业机器公司 System and method for high-efficiency service-instance-oriented energy management in internet of things
CN105302274A (en) * 2015-09-22 2016-02-03 广东欧珀移动通信有限公司 Sensor control method and apparatus
CN105744644A (en) * 2014-12-24 2016-07-06 联发科技股份有限公司 Portable device and associated method for accessing network in electronic system
CN106095050A (en) * 2016-05-31 2016-11-09 广东欧珀移动通信有限公司 The method for closing of sensor and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105278370B (en) * 2015-09-30 2018-03-20 小米科技有限责任公司 Energy-saving mode open method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070038414A1 (en) * 2005-05-02 2007-02-15 American Power Conversion Corporation Methods and systems for managing facility power and cooling
CN103179650A (en) * 2011-12-23 2013-06-26 国际商业机器公司 System and method for high-efficiency service-instance-oriented energy management in internet of things
CN105744644A (en) * 2014-12-24 2016-07-06 联发科技股份有限公司 Portable device and associated method for accessing network in electronic system
CN105302274A (en) * 2015-09-22 2016-02-03 广东欧珀移动通信有限公司 Sensor control method and apparatus
CN106095050A (en) * 2016-05-31 2016-11-09 广东欧珀移动通信有限公司 The method for closing of sensor and device

Also Published As

Publication number Publication date
CN106095050A (en) 2016-11-09
CN106095050B (en) 2019-02-01

Similar Documents

Publication Publication Date Title
WO2018129977A1 (en) Charging control method and apparatus, storage medium, and computer device
WO2018151505A1 (en) Electronic device and method for displaying screen thereof
WO2019160345A1 (en) Method for providing function or content associated with application, and electronic device for carrying out same
WO2018018772A1 (en) Background process management method and terminal device
WO2017206862A1 (en) Bright screen lock-based processing method and apparatus, storage medium, and electronic device
WO2016080747A1 (en) User terminal and method for controlling display apparatus
WO2018076819A1 (en) Data upload method, apparatus, storage medium, electronic device and system
WO2016184330A1 (en) Screen unlocking method and device, and storage medium
WO2017206886A1 (en) Wakeup lock releasing method and apparatus, storage medium, and electronic device
WO2018171534A1 (en) Mobile terminal-based dual camera power supply control method, system and mobile terminal
WO2017206879A1 (en) Mobile terminal application program processing method and apparatus, storage medium, and electronic device
WO2017206870A1 (en) Sensor shutdown method and apparatus, storage medium, and electronic device
WO2016188285A1 (en) Process management method and device of terminal application
WO2018161601A1 (en) Screen backlight adjusting method, device, storage medium and electronic device
WO2018076879A1 (en) Data backup method and apparatus, storage medium, and terminal
WO2017032061A1 (en) Application starting method, smart watch, and storage medium
WO2017206890A1 (en) Wakeup lock-based processing method and apparatus, storage medium, and electronic device
WO2017206885A1 (en) Application program shutdown method and apparatus, storage medium, and electronic device
WO2018145597A1 (en) Mobile terminal-based screen light-supplementing photographing method and system, and mobile terminal
WO2018076880A1 (en) Data backup method, apparatus, storage medium, and terminal
WO2018076881A1 (en) Data synchronization method and device, storage medium and server
WO2017206892A1 (en) Sensor processing method and apparatus of mobile terminal, storage medium, and electronic device
WO2017206867A1 (en) Sensor shutdown method and apparatus, storage medium, and electronic device
WO2014142382A1 (en) Display device and method for controlling the same
WO2017206881A1 (en) Method and apparatus for processing associated applications, storage medium, and electronic device

Legal Events

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

Ref document number: 17805821

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17805821

Country of ref document: EP

Kind code of ref document: A1