[go: up one dir, main page]

CN106201285A - Prevent power key by the method and device of false touch, electronic equipment - Google Patents

Prevent power key by the method and device of false touch, electronic equipment Download PDF

Info

Publication number
CN106201285A
CN106201285A CN201610461183.6A CN201610461183A CN106201285A CN 106201285 A CN106201285 A CN 106201285A CN 201610461183 A CN201610461183 A CN 201610461183A CN 106201285 A CN106201285 A CN 106201285A
Authority
CN
China
Prior art keywords
electronic device
preset range
state
sensor
angular velocity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610461183.6A
Other languages
Chinese (zh)
Inventor
杜立超
孙信华
高原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201610461183.6A priority Critical patent/CN106201285A/en
Publication of CN106201285A publication Critical patent/CN106201285A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

本公开是关于一种防止电源键被误触的方法及装置、电子设备。所述方法包括:确定电子设备的传感器采集的数据;根据所述传感器采集的数据确定所述电子设备当前的状态;当所述电子设备当前的状态为预设状态时,如果检测到所述电子设备的电源键被触发,控制所述电子设备的系统继续运行在所述电源键未被触发时的状态。本公开技术方案可以避免电子设备执行关机、重启等误操作,确保用户能够正常使用电子设备。

The present disclosure relates to a method, a device, and an electronic device for preventing a power key from being accidentally touched. The method includes: determining the data collected by the sensor of the electronic device; determining the current state of the electronic device according to the data collected by the sensor; when the current state of the electronic device is a preset state, if the electronic device is detected The power key of the device is activated, and the system controlling the electronic device continues to run in the state when the power key is not activated. The technical solution of the present disclosure can avoid misoperations such as shutdown and restart of the electronic equipment, and ensure that the user can use the electronic equipment normally.

Description

防止电源键被误触的方法及装置、电子设备Method and device for preventing power button from being accidentally touched, and electronic device

技术领域technical field

本公开涉及电子技术领域,尤其涉及一种防止电源键被误触的方法及装置、电子设备。The present disclosure relates to the field of electronic technology, in particular to a method and device for preventing a power key from being accidentally touched, and electronic equipment.

背景技术Background technique

设置电源键手机必备的功能,在手机处于死机状态、黑屏状态时,需要通过操作电源键重启手机的系统,为了用户操作方便,电源键通常设置在手机的右侧侧壁,单手长按电源键即可重启手机的系统。然而,用户在实际使用手机的过程中,当无意误触到电源键时,会导致手机重启,给用户操作手机带来诸多麻烦与弊端。Set the necessary functions of the mobile phone with the power button. When the mobile phone is in a dead state or a black screen, you need to restart the system of the mobile phone by operating the power button. For the convenience of the user, the power button is usually set on the right side of the mobile phone. Press the power button to restart the phone's system. However, in the process of actually using the mobile phone, when the user unintentionally touches the power button by mistake, the mobile phone will be restarted, which brings many troubles and disadvantages to the user to operate the mobile phone.

发明内容Contents of the invention

为克服相关技术中存在的问题,本公开实施例提供一种防止电源键被误触的方法及装置、电子设备,用以解决相关技术中由于误操作电源键导致手机重启的技术问题。In order to overcome the problems existing in the related technology, the embodiments of the present disclosure provide a method, device and electronic equipment for preventing the power button from being accidentally touched, so as to solve the technical problem in the related technology that the mobile phone restarts due to misoperation of the power button.

根据本公开实施例的第一方面,提供一种防止电源键被误触的方法,包括:According to the first aspect of the embodiments of the present disclosure, there is provided a method for preventing the power key from being accidentally touched, including:

确定电子设备的传感器采集的数据;determine the data collected by the sensors of the electronic device;

根据所述传感器采集的数据确定所述电子设备当前的状态;determining the current state of the electronic device according to the data collected by the sensor;

当所述电子设备当前的状态为预设状态时,如果检测到所述电子设备的电源键被触发,控制所述电子设备的系统继续运行在所述电源键未被触发时的状态。When the current state of the electronic device is the preset state, if it is detected that the power key of the electronic device is triggered, the system for controlling the electronic device continues to run in the state when the power key is not triggered.

可选的,所述传感器为设置在所述电子设备上的角速度传感器,所述传感器采集的数据包括所述角速度传感器采集的所述电子设备的角速度值和所述电子设备的方位角度。Optionally, the sensor is an angular velocity sensor disposed on the electronic device, and the data collected by the sensor includes an angular velocity value of the electronic device and an azimuth angle of the electronic device collected by the angular velocity sensor.

可选的,所述根据所述传感器采集的数据确定所述电子设备当前的状态,包括:Optionally, the determining the current state of the electronic device according to the data collected by the sensor includes:

确定所述角速度传感器采集的角速度值是否在第一预设范围,以及确定所述角速度传感器采集的方位角度是否在第二预设范围;determining whether the angular velocity value collected by the angular velocity sensor is within a first preset range, and determining whether the azimuth angle collected by the angular velocity sensor is within a second preset range;

当所述角速度值在所述第一预设范围并且所述方位角度在所述第二预设范围时,确定所述电子设备当前的状态为第一预设状态。When the angular velocity value is within the first preset range and the azimuth angle is within the second preset range, it is determined that the current state of the electronic device is the first preset state.

可选的,所述方法还包括:Optionally, the method also includes:

确定所述角速度传感器采集的角速度值是否在第三预设范围,以及确定所述角速度传感器采集的方位角度是否在第四预设范围;determining whether the angular velocity value collected by the angular velocity sensor is within a third preset range, and determining whether the azimuth angle collected by the angular velocity sensor is within a fourth preset range;

当所述角速度值在所述第三预设范围并且所述方位角度在所述第四预设范围时,如果检测到所述电子设备的电源键被触发,控制所述电子设备从第一状态切换至第二状态。When the angular velocity value is in the third preset range and the azimuth angle is in the fourth preset range, if it is detected that the power button of the electronic device is triggered, control the electronic device from the first state Switch to the second state.

可选的,所述传感器为设置在所述电子设备上的加速度传感器,所述传感器采集的数据包括所述电子设备在所述加速度传感器所在的三维坐标系中的三个轴向的加速度数值。Optionally, the sensor is an acceleration sensor disposed on the electronic device, and the data collected by the sensor includes acceleration values of the electronic device in three axes in the three-dimensional coordinate system where the acceleration sensor is located.

可选的,所述根据所述传感器采集的数据确定所述电子设备当前的状态,包括:Optionally, the determining the current state of the electronic device according to the data collected by the sensor includes:

确定所述加速度传感器采集的三个轴向的加速度数值是否分别位于各自对应的第五预设范围、第六预设范围以及第七预设范围;Determining whether the acceleration values of the three axes collected by the acceleration sensor are respectively in the corresponding fifth preset range, sixth preset range and seventh preset range;

当所述加速度传感器采集的三个轴向的加速度数值均位于各自对应的第五预设范围、第六预设范围以及第七预设范围时,确定所述电子设备当前的状态为第二预设状态。When the acceleration values of the three axes collected by the acceleration sensor are all in the corresponding fifth preset range, sixth preset range and seventh preset range, it is determined that the current state of the electronic device is the second preset range. set state.

根据本公开实施例的第二方面,提供一种防止电源键被误触的装置,包括:According to the second aspect of the embodiments of the present disclosure, there is provided a device for preventing the power button from being accidentally touched, including:

数据确定模块,被配置为确定电子设备的传感器采集的数据;a data determination module configured to determine data collected by sensors of the electronic device;

状态确定模块,被配置为根据所述数据确定模块确定的所述传感器采集的数据确定所述电子设备当前的状态;A state determination module configured to determine the current state of the electronic device according to the data collected by the sensor determined by the data determination module;

状态控制模块,被配置为当所述状态确定模块确定所述电子设备当前的状态为预设状态时,如果检测到所述电子设备的电源键被触发,控制所述电子设备的系统继续运行在所述电源键未被触发时的状态。The state control module is configured to, when the state determination module determines that the current state of the electronic device is a preset state, if it is detected that the power button of the electronic device is triggered, the system for controlling the electronic device continues to run at The state when the power key is not triggered.

可选的,所述传感器为设置在所述电子设备上的角速度传感器,所述数据确定模块确定的所述传感器采集的数据包括所述角速度传感器采集的所述电子设备的角速度值和所述电子设备的方位角度。Optionally, the sensor is an angular velocity sensor provided on the electronic device, and the data collected by the sensor determined by the data determination module includes the angular velocity value of the electronic device collected by the angular velocity sensor and the electronic The azimuth of the device.

可选的,所述状态确定模块包括:Optionally, the state determination module includes:

第一确定子模块,被配置为确定所述角速度传感器采集的角速度值是否在第一预设范围,以及确定所述角速度传感器采集的方位角度是否在第二预设范围;The first determining submodule is configured to determine whether the angular velocity value collected by the angular velocity sensor is within a first preset range, and determine whether the azimuth angle collected by the angular velocity sensor is within a second preset range;

第二确定子模块,被配置为当所述第一确定子模块确定所述角速度值在所述第一预设范围并且所述方位角度在所述第二预设范围时,确定所述电子设备当前的状态为第一预设状态。The second determination submodule is configured to determine that the electronic device The current state is the first preset state.

可选的,所述装置还包括:Optionally, the device also includes:

第一确定模块,被配置为确定所述角速度传感器采集的角速度值是否在第三预设范围,以及确定所述角速度传感器采集的方位角度是否在第四预设范围;The first determination module is configured to determine whether the angular velocity value collected by the angular velocity sensor is within a third preset range, and determine whether the azimuth angle collected by the angular velocity sensor is within a fourth preset range;

状态切换模块,当所述第一确定模块确定所述角速度值在所述第三预设范围并且所述方位角度在所述第四预设范围时,如果检测到所述电子设备的电源键被触发,控制所述电子设备从第一状态切换至第二状态。The state switching module, when the first determination module determines that the angular velocity value is within the third preset range and the azimuth angle is within the fourth preset range, if it is detected that the power button of the electronic device is pressed triggering, controlling the electronic device to switch from the first state to the second state.

可选的,所述传感器为设置在所述电子设备上的加速度传感器,所述数据确定模块确定的所述传感器采集的数据包括所述电子设备在所述加速度传感器所在的三维坐标系中的三个轴向的加速度数值。Optionally, the sensor is an acceleration sensor provided on the electronic device, and the data collected by the sensor determined by the data determination module includes three-dimensional coordinates of the electronic device in the three-dimensional coordinate system where the acceleration sensor is located. Axial acceleration value.

可选的,所述状态确定模块包括:Optionally, the state determination module includes:

第三确定子模块,被配置为确定所述加速度传感器采集的三个轴向的加速度数值是否分别位于各自对应的第五预设范围、第六预设范围以及第七预设范围;The third determining submodule is configured to determine whether the acceleration values of the three axes collected by the acceleration sensor are respectively in the corresponding fifth preset range, sixth preset range and seventh preset range;

第四确定子模块,被配置为当所述第三确定子模块确定所述加速度传感器采集的三个轴向的加速度数值均位于各自对应的第五预设范围、第六预设范围以及第七预设范围时,确定所述电子设备当前的状态为第二预设状态。The fourth determining sub-module is configured to be configured to be configured to be configured to be configured to determine that the acceleration values of the three axes collected by the acceleration sensor are all within the corresponding fifth preset range, sixth preset range and seventh preset range when the third determining sub-module determines that In the preset range, it is determined that the current state of the electronic device is the second preset state.

根据本公开实施例的第三方面,提供一种电子设备,包括:According to a third aspect of the embodiments of the present disclosure, there is provided an electronic device, including:

处理器;processor;

用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;

其中,所述处理器被配置为:Wherein, the processor is configured as:

确定电子设备的传感器采集的数据;determine the data collected by the sensors of the electronic device;

根据所述传感器采集的数据确定所述电子设备当前的状态;determining the current state of the electronic device according to the data collected by the sensor;

当所述电子设备当前的状态为预设状态时,如果检测到所述电子设备的电源键被触发,控制所述电子设备的系统继续运行在所述电源键未被触发时的状态。When the current state of the electronic device is the preset state, if it is detected that the power key of the electronic device is triggered, the system for controlling the electronic device continues to run in the state when the power key is not triggered.

本公开的实施例提供的技术方案可以包括以下有益效果:The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:

当电子设备当前的状态为预设状态时,如果检测到电子设备的电源键被触发,控制电子设备的系统继续运行在电源键未被触发时的状态,当用户由于误触而长时间触控到电源键时,可以避免电子设备执行关机、重启等误操作,确保用户能够正常使用电子设备。When the current state of the electronic device is the preset state, if it is detected that the power button of the electronic device is triggered, the system controlling the electronic device will continue to run in the state when the power button is not triggered. When the power button is pressed, misoperations such as shutting down and restarting the electronic device can be avoided, ensuring that the user can use the electronic device normally.

应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.

附图说明Description of drawings

此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并与说明书一起用于解释本发明的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description serve to explain the principles of the invention.

图1A是根据一示例性实施例示出的防止电源键被误触的方法的流程图。Fig. 1A is a flow chart of a method for preventing a power key from being accidentally touched according to an exemplary embodiment.

图1B是根据一示例性实施例示出的电源键的示意图。Fig. 1B is a schematic diagram of a power button according to an exemplary embodiment.

图2是根据一示例性实施例一示出的防止电源键被误触的方法的流程图。Fig. 2 is a flow chart of a method for preventing a power key from being accidentally touched according to a first exemplary embodiment.

图3是根据一示例性实施例二示出的防止电源键被误触的方法的流程图。Fig. 3 is a flow chart of a method for preventing a power key from being accidentally touched according to a second exemplary embodiment.

图4是根据一示例性实施例示出的一种防止电源键被误触的装置的框图。Fig. 4 is a block diagram of a device for preventing a power key from being accidentally touched according to an exemplary embodiment.

图5是根据一示例性实施例示出的另一种防止电源键被误触的装置的框图。Fig. 5 is a block diagram of another device for preventing a power key from being accidentally touched according to an exemplary embodiment.

图6是根据一示例性实施例示出的一种适用于防止电源键被误触的装置的框图。Fig. 6 is a block diagram of a device suitable for preventing a power key from being accidentally touched according to an exemplary embodiment.

具体实施方式detailed description

这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本发明相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本发明的一些方面相一致的装置和方法的例子。Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with aspects of the invention as recited in the appended claims.

图1A是根据一示例性实施例示出的防止电源键被误触的方法的流程图,图1B是根据一示例性实施例示出的电源键的示意图;该防止电源键被误触的方法可以应用在移动设备(例如:智能手机、平板电脑)上,如图1A所示,该防止电源键被误触的方法包括以下步骤101-103:Figure 1A is a flow chart of a method for preventing the power key from being accidentally touched according to an exemplary embodiment, and Figure 1B is a schematic diagram of the power key according to an exemplary embodiment; the method for preventing the power key from being accidentally touched can be applied On a mobile device (for example: smart phone, tablet computer), as shown in Figure 1A, the method for preventing the power button from being accidentally touched includes the following steps 101-103:

在步骤101中,确定电子设备的传感器采集的数据。In step 101, data collected by a sensor of an electronic device is determined.

在一实施例中,传感器可以为电子设备的角速度传感器,也可以为电子设备的加速度传感器,相应地,传感器采集的数据既可以为角速度传感器采集的角速度值和方位角度,也可以为加速度传感器采集的三维坐标系中的三个轴向的加速度数值。In one embodiment, the sensor can be an angular velocity sensor of an electronic device, or an acceleration sensor of an electronic device. Correspondingly, the data collected by the sensor can be the angular velocity value and azimuth angle collected by the angular velocity sensor, or can be collected by the acceleration sensor. The acceleration values of the three axes in the three-dimensional coordinate system.

在步骤102中,根据传感器采集的数据确定电子设备当前的状态。In step 102, the current state of the electronic device is determined according to the data collected by the sensor.

在一实施例中,电子设备当前的状态可以随着用户使用电子状态的场景而不同,例如,电子设备被用户持握并且处于行走时的状态、电子设备被放置在包中并且处于行走的状态、电子设备处于通话中的状态、电子设备由于用户平躺在床上而保持一定倾斜角度的状态、电子设备由于用户静坐在椅子上而保持一定倾斜角度的状态,等等。In an embodiment, the current state of the electronic device may be different according to the scene in which the user uses the electronic state. For example, the electronic device is held by the user and is in a walking state, and the electronic device is placed in a bag and is in a walking state. , The electronic device is in the state of talking, the electronic device is kept at a certain tilt angle because the user is lying flat on the bed, the electronic device is kept at a certain tilt angle because the user is sitting quietly on the chair, and so on.

在步骤103中,当电子设备当前的状态为预设状态时,如果检测到电子设备的电源键被触发,控制电子设备的系统继续运行在电源键未被触发时的状态。In step 103, when the current state of the electronic device is the preset state, if it is detected that the power key of the electronic device is triggered, the system for controlling the electronic device continues to run in the state when the power key is not triggered.

在一实施例中,预设状态可以由用户防止误触电源键的场合来设置,例如,用户在手持电子设备容易误触电源键,则可以将电子设备被用户持握并且处于行走时的状态设置为预设状态,用户手持电子设备拨打电话时容易误触电源键,则可以将电子设备处于通话中的状态设置为预设状态。In an embodiment, the preset state can be set by the user to prevent accidental touch of the power button. For example, if the user easily touches the power button by mistake while holding the electronic device, the electronic device can be held by the user and in the state of walking. If it is set to the preset state, and the user easily touches the power button by mistake when making a call with the electronic device in hand, the state of the electronic device being in a call can be set as the preset state.

在一示例性场景中,如图1B所示,当电子设备10被用户持握在手中,边走路边摆动手机的过程中,如果无意识地触控到电源键11并长时间按压,在此情形下,用户并未通过电源键11对电子设备10实现关机操作,通过本公开实施例,当识别到电子设备10当前的状态为被用户持握并且处于行走时的状态时,电子设备10的系统可以控制电子设备10继续运行在电源键11未被触发时的状态,例如,电子设备10在触发电源键11时处于开机状态,则电子设备10的系统可以控制电子设备10继续保持开机状态,电子设备10在触发电源键11时处于关机状态,则电子设备10的系统可以控制电子设备10继续保持关机状态。In an exemplary scenario, as shown in FIG. 1B , when the user holds the electronic device 10 in his hand and swings the mobile phone while walking, if the power button 11 is unconsciously touched and pressed for a long time, in this case Under the circumstances, the user does not turn off the electronic device 10 through the power button 11. According to the embodiment of the present disclosure, when it is recognized that the current state of the electronic device 10 is held by the user and is in the state of walking, the system of the electronic device 10 The electronic device 10 can be controlled to continue running in the state when the power key 11 is not triggered. For example, the electronic device 10 is in the power-on state when the power key 11 is triggered, and the system of the electronic device 10 can control the electronic device 10 to continue to keep the power-on state. The device 10 is in the power-off state when the power button 11 is activated, and the system of the electronic device 10 can control the electronic device 10 to keep the power-off state.

本实施例中,当电子设备当前的状态为预设状态时,如果检测到电子设备的电源键被触发,控制电子设备的系统继续运行在电源键未被触发时的状态,当用户由于误触而长时间触控到电源键时,可以避免电子设备执行关机、重启等误操作,确保用户能够正常使用电子设备。In this embodiment, when the current state of the electronic device is the preset state, if it is detected that the power button of the electronic device is triggered, the system for controlling the electronic device continues to run in the state when the power button is not triggered. And when the power button is touched for a long time, it can avoid misoperations such as shutting down and restarting the electronic device, and ensure that the user can use the electronic device normally.

可选的,传感器为设置在电子设备上的角速度传感器,传感器采集的数据包括角速度传感器采集的电子设备的角速度值和电子设备的方位角度。Optionally, the sensor is an angular velocity sensor arranged on the electronic device, and the data collected by the sensor includes an angular velocity value of the electronic device and an azimuth angle of the electronic device collected by the angular velocity sensor.

可选的,根据传感器采集的数据确定电子设备当前的状态,包括:Optionally, the current state of the electronic device is determined according to the data collected by the sensor, including:

确定角速度传感器采集的角速度值是否在第一预设范围,以及确定角速度传感器采集的方位角度是否在第二预设范围;Determine whether the angular velocity value collected by the angular velocity sensor is within a first preset range, and determine whether the azimuth angle collected by the angular velocity sensor is within a second preset range;

当角速度值在第一预设范围并且方位角度在第二预设范围时,确定电子设备当前的状态为第一预设状态。When the angular velocity value is within the first preset range and the azimuth angle is within the second preset range, it is determined that the current state of the electronic device is the first preset state.

可选的,方法还包括:Optionally, the method also includes:

确定角速度传感器采集的角速度值是否在第三预设范围,以及确定角速度传感器采集的方位角度是否在第四预设范围;Determine whether the angular velocity value collected by the angular velocity sensor is within a third preset range, and determine whether the azimuth angle collected by the angular velocity sensor is within a fourth preset range;

当角速度值在第三预设范围并且方位角度在第四预设范围时,如果检测到电子设备的电源键被触发,控制电子设备从第一状态切换至第二状态。When the angular velocity value is in the third preset range and the azimuth angle is in the fourth preset range, if it is detected that the power key of the electronic device is triggered, the electronic device is controlled to switch from the first state to the second state.

可选的,传感器为设置在电子设备上的加速度传感器,传感器采集的数据包括电子设备在加速度传感器所在的三维坐标系中的三个轴向的加速度数值。Optionally, the sensor is an acceleration sensor disposed on the electronic device, and the data collected by the sensor includes acceleration values of the electronic device in three axes in the three-dimensional coordinate system where the acceleration sensor is located.

可选的,根据传感器采集的数据确定电子设备当前的状态,包括:Optionally, the current state of the electronic device is determined according to the data collected by the sensor, including:

确定加速度传感器采集的三个轴向的加速度数值是否分别位于各自对应的第五预设范围、第六预设范围以及第七预设范围;Determine whether the acceleration values of the three axes collected by the acceleration sensor are respectively located in the corresponding fifth preset range, sixth preset range, and seventh preset range;

当加速度传感器采集的三个轴向的加速度数值均位于各自对应的第五预设范围、第六预设范围以及第七预设范围时,确定电子设备当前的状态为第二预设状态。When the acceleration values of the three axes collected by the acceleration sensor are all within the corresponding fifth preset range, sixth preset range and seventh preset range, it is determined that the current state of the electronic device is the second preset state.

具体如何防止电源键被误触的,请参考后续实施例。For how to prevent the power key from being accidentally touched, please refer to the subsequent embodiments.

至此,本公开实施例提供的上述方法,可以避免电子设备执行关机、重启等误操作,确保用户能够正常使用电子设备。So far, the above-mentioned method provided by the embodiments of the present disclosure can avoid misoperations such as shutting down and restarting the electronic device, and ensure that the user can use the electronic device normally.

下面以具体实施例来说明本公开实施例提供的技术方案。The technical solutions provided by the embodiments of the present disclosure are described below with specific embodiments.

图2是根据一示例性实施例一示出的防止电源键被误触的方法的流程图;本实施例利用本公开实施例提供的上述方法,以传感器为设置在电子设备上的角速度传感器以及传感器采集的数据包括角速度传感器采集的电子设备的角速度值和电子设备的方位角度为例进行示例性说明,如图2所示,包括如下步骤:Fig. 2 is a flow chart of a method for preventing the power key from being accidentally touched according to an exemplary embodiment 1; this embodiment utilizes the above-mentioned method provided by the embodiment of the present disclosure, and uses the sensor as an angular velocity sensor disposed on an electronic device and The data collected by the sensor includes the angular velocity value of the electronic device collected by the angular velocity sensor and the azimuth angle of the electronic device as an example for illustration, as shown in Figure 2, including the following steps:

在步骤201中,确定电子设备的角速度传感器采集的角速度值和方位角度。In step 201, an angular velocity value and an azimuth angle collected by an angular velocity sensor of an electronic device are determined.

角速度传感器采集电子设备的角速度值和方位角度的描述可以参见相关技术,本公开在此不做详细描述。For the description of the angular velocity sensor collecting the angular velocity value and the azimuth angle of the electronic device, reference may be made to related technologies, which will not be described in detail in this disclosure.

在步骤202中,确定角速度值是否在第一预设范围,以及确定方位角度是否在第二预设范围,当角速度值在第一预设范围并且方位角度在第二预设范围时,执行步骤203,当角速度值不在第一预设范围并且方位角度不在第二预设范围时,执行步骤205。In step 202, determine whether the angular velocity value is in the first preset range, and determine whether the azimuth angle is in the second preset range, when the angular velocity value is in the first preset range and the azimuth angle is in the second preset range, perform the step 203. When the angular velocity value is not in the first preset range and the azimuth angle is not in the second preset range, perform step 205.

在步骤203中,当角速度值在第一预设范围并且方位角度在第二预设范围时,确定电子设备当前的状态为第一预设状态。In step 203, when the angular velocity value is within the first preset range and the azimuth angle is within the second preset range, it is determined that the current state of the electronic device is the first preset state.

在一实施例中,第一预设范围和第二预设范围均可以根据电子设备所处的状态来设置,例如,电子设备处于通话状态时,根据用户在拨打电话时的使用习惯,电子设备的加速度值接近0,并且电子设备的方位角度通常在一个角度范围内,因此当角速度传感器采集到的角速度值和方位角度分别位于上述范围内,可视为电子设备正处于拨打电话的第一预设状态。本领域技术人员可以理解的是,上述第一预设范围与第二预设范围可以根据用户使用电子设备的习惯来设置,本公开对第一预设范围和第二预设范围的具体范围不做限制。In an embodiment, both the first preset range and the second preset range can be set according to the state of the electronic device. For example, when the electronic device is in a call state, according to the user's usage habits when making a call, the electronic device The acceleration value of the electronic device is close to 0, and the azimuth angle of the electronic device is usually within an angular range. Therefore, when the angular velocity value and azimuth angle collected by the angular velocity sensor are respectively within the above range, it can be considered that the electronic device is in the first preparatory period for making a call. set state. Those skilled in the art can understand that the above-mentioned first preset range and second preset range can be set according to the user's habit of using electronic devices, and the present disclosure does not make specific reference to the first preset range and the second preset range. Do limit.

在步骤204中,当电子设备当前的状态为第一预设状态时,如果检测到所述电子设备的电源键被触发,控制电子设备的系统继续运行在电源键未被触发时的状态。In step 204, when the current state of the electronic device is the first preset state, if it is detected that the power key of the electronic device is triggered, the system for controlling the electronic device continues to run in the state when the power key is not triggered.

例如,第一预设状态为电子设备处于拨打电话的状态,当拨打电话的期间,如果用户无意中碰触到电源键,则可以控制电子设备的系统继续运行在拨打电话的状态,从而避免用户由于误触电源键导致电子设备关机而中断通话。For example, the first preset state is that the electronic device is in the state of making a call. When making a call, if the user accidentally touches the power button, the system of the electronic device can be controlled to continue running in the state of making a call, thereby preventing the user from The call is interrupted due to the shutdown of the electronic device due to a mistaken touch of the power button.

在步骤205中,当角速度值不在第一预设范围并且方位角度不在第二预设范围时,确定角速度值是否在第三预设范围,以及确定方位角度是否在第四预设范围。In step 205, when the angular velocity value is not in the first preset range and the azimuth angle is not in the second preset range, it is determined whether the angular velocity value is in a third preset range, and whether the azimuth angle is in a fourth preset range.

在步骤206中,当角速度值在第三预设范围并且方位角度在第四预设范围时,如果检测到电子设备的电源键被触发,控制电子设备从电源键未被触发时的状态切换至电源键被触发后对应的状态。In step 206, when the angular velocity value is in the third preset range and the azimuth angle is in the fourth preset range, if it is detected that the power key of the electronic device is triggered, the electronic device is controlled to switch from the state when the power key is not triggered to The corresponding state after the power button is triggered.

在一实施例中,第三预设范围和第四预设范围的设置方式可以根据用户需要对电子设备关机时的姿态来设置,具体设置方式可以参考第一预设范围和第二预设范围的设置方式,本公开对第三预设范围和第四预设范围的具体范围不做限制。通过第三预设范围和第四预设范围可以限定电子设备需要关机时用户持握电子设备的状态,例如,电子设备关机时用户持握电子设备保持一定倾斜角度的状态。In an embodiment, the setting method of the third preset range and the fourth preset range can be set according to the posture of the user when the electronic device is turned off, and the specific setting method can refer to the first preset range and the second preset range The present disclosure does not limit the specific ranges of the third preset range and the fourth preset range. The state of the user holding the electronic device when the electronic device needs to be turned off can be limited by the third preset range and the fourth preset range, for example, when the electronic device is turned off, the user holds the electronic device at a certain tilt angle.

例如,当角速度值在第三预设范围并且方位角度在第四预设范围时,可以确定用户此时需要关机,为了确保电子设备在触发电源键时能够正常关机,在识别到角速度值在第三预设范围并且方位角度在第四预设范围时,如果电源键被触发,则可以控制电子设备从开机状态切换到关机状态,或者,当用户需要采用一定姿势触发电源键开机时,可以在电源键被触发后,控制电子设备从关机状态切换为开启状态。For example, when the angular velocity value is in the third preset range and the azimuth angle is in the fourth preset range, it can be determined that the user needs to shut down the device at this time. When the three preset ranges and the azimuth angle are in the fourth preset range, if the power button is triggered, the electronic device can be controlled to switch from the power-on state to the power-off state, or, when the user needs to use a certain gesture to trigger the power After the power key is triggered, the control electronic device switches from the off state to the on state.

本实施例中,当角速度值在第一预设范围并且方位角度在第二预设范围时,确定电子设备当前的状态为第一预设状态,在第一预设状态可控制电子设备的系统继续运行在电源键未被触发时的状态,从而实现电子设备在第一预设状态实现电源键的防误触;当角速度值在第三预设范围并且方位角度在第四预设范围时,如果检测到电子设备的电源键被触发,控制电子设备从电源键未被触发时的状态切换至电源键被触发后对应的状态,从而可以确保电源键能够正常实现关机或者开机操作,确保电源键的功能能够正常使用。In this embodiment, when the angular velocity value is in the first preset range and the azimuth angle is in the second preset range, it is determined that the current state of the electronic device is the first preset state, and the system of the electronic device can be controlled in the first preset state Continue to run in the state when the power key is not triggered, so as to realize the anti-mistouch of the power key in the first preset state of the electronic device; when the angular velocity value is in the third preset range and the azimuth angle is in the fourth preset range, If it is detected that the power button of the electronic device is triggered, the electronic device is controlled to switch from the state when the power button is not triggered to the corresponding state after the power button is triggered, so as to ensure that the power button can normally achieve shutdown or startup operations, ensuring that the power button function can be used normally.

图3是根据一示例性实施例二示出的防止电源键被误触的方法的流程图;本实施例利用本公开实施例提供的上述方法,以传感器为设置在电子设备上的加速度传感器以及传感器采集的数据包括电子设备在加速度传感器所在的三维坐标系中的三个轴向的加速度数值为例进行示例性说明,如图3所示,包括如下步骤:Fig. 3 is a flow chart of a method for preventing the power key from being accidentally touched according to a second exemplary embodiment; this embodiment utilizes the above-mentioned method provided by the embodiment of the present disclosure, and uses the sensor as an acceleration sensor disposed on an electronic device and The data collected by the sensor includes the acceleration values of the three axes of the electronic device in the three-dimensional coordinate system where the acceleration sensor is located as an example, as shown in Figure 3, including the following steps:

在步骤301中,确定电子设备的加速度传感器采集的三个轴向的加速度数值。In step 301, the acceleration values of the three axes collected by the acceleration sensor of the electronic device are determined.

加速度传感器采集电子设备的三个轴向的加速度数值的描述可以参见相关技术,本公开在此不做详细描述。For the description of the acceleration sensor collecting the acceleration values of the three axes of the electronic device, reference may be made to related technologies, and the present disclosure does not describe in detail here.

在步骤302中,确定加速度传感器采集的三个轴向的加速度数值是否分别位于各自对应的第五预设范围、第六预设范围以及第七预设范围,当加速度传感器采集的三个轴向的加速度数值均位于各自对应的第五预设范围、第六预设范围以及第七预设范围时,执行步骤S303,当加速度传感器采集的三个轴向的加速度数值有任意一个轴向的加速度值不在对应的预设范围时,可按照上述图2所示的方法流程确定角加速度传感器采集的数据来确定电子设备的状态,本实施例不再详述。In step 302, it is determined whether the acceleration values of the three axes collected by the acceleration sensor are respectively in the corresponding fifth preset range, the sixth preset range and the seventh preset range, when the three axial acceleration values collected by the acceleration sensor When the acceleration values of the three axes are all in the corresponding fifth preset range, the sixth preset range and the seventh preset range, step S303 is executed. When the acceleration values of the three axes collected by the acceleration sensor have any axial acceleration When the value is not within the corresponding preset range, the data collected by the angular acceleration sensor can be determined according to the method flow shown in FIG. 2 to determine the state of the electronic device, which will not be described in detail in this embodiment.

在一实施例中,第五预设范围、第六预设范围以及第七预设范围均可以根据电子设备所处的状态来设置,例如,电子设备被用户持握并且处于行走时的状态时,根据用户在行走时的习惯,电子设备在三个轴向的加速度数值处于一个固定的数值范围之内,因此当加速度传感器采集的三个轴向的加速度数值分别位于上述第五预设范围、第六预设范围以及第七预设范围内时,可视为电子设备正处于被用户持握并且处于行走时的状态。本领域技术人员可以理解的是,上述第五预设范围、第六预设范围以及第七预设范围可以根据用户行走时的习惯来设置,本公开对第五预设范围、第六预设范围以及第七预设范围的具体范围不做限制。In an embodiment, the fifth preset range, the sixth preset range and the seventh preset range can all be set according to the state of the electronic device, for example, when the electronic device is held by the user and is in the state of walking , according to the habit of the user when walking, the acceleration values of the electronic device in the three axes are within a fixed value range, so when the acceleration values of the three axes collected by the acceleration sensor are respectively in the fifth preset range, When within the sixth preset range and the seventh preset range, it can be considered that the electronic device is being held by the user and walking. Those skilled in the art can understand that the fifth preset range, the sixth preset range and the seventh preset range can be set according to the user's walking habits. The range and the specific range of the seventh preset range are not limited.

在步骤303中,当加速度传感器采集的三个轴向的加速度数值均位于各自对应的第五预设范围、第六预设范围以及第七预设范围时,确定电子设备当前的状态为第二预设状态。In step 303, when the acceleration values of the three axes collected by the acceleration sensor are all within the corresponding fifth preset range, sixth preset range and seventh preset range, it is determined that the current state of the electronic device is the second default state.

在步骤304中,当电子设备当前的状态为第二预设状态时,如果检测到电子设备的电源键被触发,控制电子设备的系统继续运行在电源键未被触发时的状态。In step 304, when the current state of the electronic device is the second preset state, if it is detected that the power key of the electronic device is triggered, the system for controlling the electronic device continues to run in the state when the power key is not triggered.

例如,第二预设状态为电子设备处于被用户持握并且处于行走时的状态,当用户行走的期间,如果用户无意中碰触到电源键,则可以控制电子设备的系统继续运行在拨打电话的状态,从而避免用户由于误触电源键导致电子设备关机或者重启。For example, the second preset state is that the electronic device is held by the user and is walking. When the user is walking, if the user accidentally touches the power button, the system that can control the electronic device continues to run while making a call. state, so as to prevent the user from shutting down or restarting the electronic device due to accidentally touching the power button.

本实施例中,当电子设备当前的状态为第二预设状态,在第二预设状态可控制电子设备的系统继续运行在电源键未被触发时的状态,从而实现电子设备在第二预设状态实现电源键的防误触。In this embodiment, when the current state of the electronic device is the second preset state, the system that can control the electronic device in the second preset state continues to run in the state when the power button is not triggered, so that the electronic device can Set the state to realize the anti-mistouch of the power button.

本领域技术人员可以理解的是,可以通过上述图2与图3的结合识别电子设备的更多状态,从而可以在电子设备处于不同的预设状态下均可以实现防误触。Those skilled in the art can understand that more states of the electronic device can be identified through the combination of the above-mentioned FIG. 2 and FIG. 3 , so that false touch prevention can be realized when the electronic device is in different preset states.

图4是根据一示例性实施例示出的一种防止电源键被误触的装置的框图,如图4所示,该防止电源键被误触的装置包括:Fig. 4 is a block diagram of a device for preventing a power key from being accidentally touched according to an exemplary embodiment. As shown in Fig. 4 , the device for preventing a power key from being accidentally touched includes:

数据确定模块41,被配置为确定电子设备的传感器采集的数据;A data determining module 41 configured to determine the data collected by the sensor of the electronic device;

状态确定模块42,被配置为根据数据确定模块41确定的传感器采集的数据确定电子设备当前的状态;The state determination module 42 is configured to determine the current state of the electronic device according to the data collected by the sensor determined by the data determination module 41;

状态控制模块43,被配置为当状态确定模块42确定电子设备当前的状态为预设状态时,如果检测到电子设备的电源键被触发,控制电子设备的系统继续运行在电源键未被触发时的状态。The state control module 43 is configured to, when the state determining module 42 determines that the current state of the electronic device is a preset state, if it is detected that the power key of the electronic device is triggered, the system for controlling the electronic device continues to run when the power key is not triggered status.

图5是根据一示例性实施例示出的另一种防止电源键被误触的装置的框图,如图5所示,在上述图4所示实施例的基础上,传感器为设置在电子设备上的角速度传感器,数据确定模块41确定的传感器采集的数据包括角速度传感器采集的电子设备的角速度值和电子设备的方位角度。Fig. 5 is a block diagram of another device for preventing the power key from being accidentally touched according to an exemplary embodiment. As shown in Fig. 5, on the basis of the embodiment shown in Fig. 4 above, the sensor is set on the electronic For the angular velocity sensor, the data collected by the sensor determined by the data determination module 41 includes the angular velocity value of the electronic device and the azimuth angle of the electronic device collected by the angular velocity sensor.

可选的,状态确定模块42包括:Optionally, the status determination module 42 includes:

第一确定子模块421,被配置为确定角速度传感器采集的角速度值是否在第一预设范围,以及确定角速度传感器采集的方位角度是否在第二预设范围;The first determination sub-module 421 is configured to determine whether the angular velocity value collected by the angular velocity sensor is within a first preset range, and determine whether the azimuth angle collected by the angular velocity sensor is within a second preset range;

第二确定子模块422,被配置为当第一确定子模块421确定角速度值在第一预设范围并且方位角度在第二预设范围时,确定电子设备当前的状态为第一预设状态。The second determining submodule 422 is configured to determine that the current state of the electronic device is the first preset state when the first determining submodule 421 determines that the angular velocity value is within the first preset range and the azimuth angle is within the second preset range.

可选的,装置还包括:Optionally, the device also includes:

第一确定模块44,被配置为确定角速度传感器采集的角速度值是否在第三预设范围,以及确定角速度传感器采集的方位角度是否在第四预设范围;The first determination module 44 is configured to determine whether the angular velocity value collected by the angular velocity sensor is within a third preset range, and determine whether the azimuth angle collected by the angular velocity sensor is within a fourth preset range;

状态切换模块45,当第一确定模块44确定角速度值在第三预设范围并且方位角度在第四预设范围时,如果检测到电子设备的电源键被触发,控制电子设备从第一状态切换至第二状态。The state switching module 45, when the first determination module 44 determines that the angular velocity value is within the third preset range and the azimuth angle is within the fourth preset range, if it is detected that the power button of the electronic device is triggered, the electronic device is controlled to switch from the first state to the second state.

可选的,传感器为设置在电子设备上的加速度传感器,数据确定模块41确定的传感器采集的数据包括电子设备在加速度传感器所在的三维坐标系中的三个轴向的加速度数值。Optionally, the sensor is an acceleration sensor disposed on the electronic device, and the data collected by the sensor determined by the data determination module 41 includes acceleration values of the electronic device in three axes in the three-dimensional coordinate system where the acceleration sensor is located.

可选的,状态确定模块42包括:Optionally, the status determination module 42 includes:

第三确定子模块423,被配置为确定加速度传感器采集的三个轴向的加速度数值是否分别位于各自对应的第五预设范围、第六预设范围以及第七预设范围;The third determination sub-module 423 is configured to determine whether the acceleration values of the three axes collected by the acceleration sensor are respectively in the corresponding fifth preset range, sixth preset range and seventh preset range;

第四确定子模块424,被配置为当第三确定子模块423确定加速度传感器采集的三个轴向的加速度数值均位于各自对应的第五预设范围、第六预设范围以及第七预设范围时,确定电子设备当前的状态为第二预设状态。The fourth determination sub-module 424 is configured to determine that the acceleration values of the three axes collected by the acceleration sensor are all within the corresponding fifth preset range, sixth preset range and seventh preset range when the third determination sub-module 423 determines When within the range, determine that the current state of the electronic device is the second preset state.

关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the foregoing embodiments, the specific manner in which each module executes operations has been described in detail in the embodiments related to the method, and will not be described in detail here.

图6是根据一示例性实施例示出的一种适用于防止电源键被误触的装置的框图。例如,装置600可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。Fig. 6 is a block diagram of a device suitable for preventing a power key from being accidentally touched according to an exemplary embodiment. For example, the apparatus 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.

参照图6,装置600可以包括以下一个或多个组件:处理组件602,存储器604,电源组件606,多媒体组件608,音频组件610,输入/输出(I/O)的接口612,传感器组件614,以及通信组件616。6, device 600 may include one or more of the following components: processing component 602, memory 604, power supply component 606, multimedia component 608, audio component 610, input/output (I/O) interface 612, sensor component 614, and communication component 616 .

处理组件602通常控制装置600的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理元件602可以包括一个或多个处理器620来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件602可以包括一个或多个模块,便于处理组件602和其他组件之间的交互。例如,处理部件602可以包括多媒体模块,以方便多媒体组件608和处理组件602之间的交互。The processing component 602 generally controls the overall operations of the device 600, such as those associated with display, telephone calls, data communications, camera operations, and recording operations. The processing element 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above method. Additionally, processing component 602 may include one or more modules that facilitate interaction between processing component 602 and other components. For example, processing component 602 may include a multimedia module to facilitate interaction between multimedia component 608 and processing component 602 .

存储器604被配置为存储各种类型的数据以支持在设备600的操作。这些数据的示例包括用于在装置600上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器604可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。The memory 604 is configured to store various types of data to support operations at the device 600 . Examples of such data include instructions for any application or method operating on device 600, contact data, phonebook data, messages, pictures, videos, and the like. The memory 604 can be implemented by any type of volatile or non-volatile storage device or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.

电力组件606为装置600的各种组件提供电力。电力组件606可以包括电源管理系统,一个或多个电源,及其他与为装置600生成、管理和分配电力相关联的组件。Power component 606 provides power to various components of device 600 . Power components 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for device 600 .

多媒体组件608包括在所述装置600和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件608包括一个前置摄像头和/或后置摄像头。当设备600处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。The multimedia component 608 includes a screen that provides an output interface between the device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may not only sense a boundary of a touch or swipe action, but also detect duration and pressure associated with the touch or swipe action. In some embodiments, the multimedia component 608 includes a front camera and/or a rear camera. When the device 600 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capability.

音频组件610被配置为输出和/或输入音频信号。例如,音频组件610包括一个麦克风(MIC),当装置600处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器604或经由通信组件616发送。在一些实施例中,音频组件610还包括一个扬声器,用于输出音频信号。The audio component 610 is configured to output and/or input audio signals. For example, the audio component 610 includes a microphone (MIC) configured to receive external audio signals when the device 600 is in operation modes, such as call mode, recording mode and voice recognition mode. Received audio signals may be further stored in memory 604 or sent via communication component 616 . In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.

I/O接口612为处理组件602和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 612 provides an interface between the processing component 602 and a peripheral interface module. The peripheral interface module may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: a home button, volume buttons, start button, and lock button.

传感器组件614包括一个或多个传感器,用于为装置600提供各个方面的状态评估。例如,传感器组件614可以检测到设备600的打开/关闭状态,组件的相对定位,例如所述组件为装置600的显示器和小键盘,传感器组件614还可以检测装置600或装置600一个组件的位置改变,用户与装置600接触的存在或不存在,装置600方位或加速/减速和装置600的温度变化。传感器组件614可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件614还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件614还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。Sensor assembly 614 includes one or more sensors for providing status assessments of various aspects of device 600 . For example, the sensor component 614 can detect the open/closed state of the device 600, the relative positioning of components, such as the display and keypad of the device 600, and the sensor component 614 can also detect a change in the position of the device 600 or a component of the device 600 , the presence or absence of user contact with the device 600 , the device 600 orientation or acceleration/deceleration and the temperature change of the device 600 . The sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. Sensor assembly 614 may also include optical sensors, such as CMOS or CCD image sensors, for use in imaging applications. In some embodiments, the sensor component 614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.

通信组件616被配置为便于装置600和其他设备之间有线或无线方式的通信。装置600可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信部件616经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信部件616还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。The communication component 616 is configured to facilitate wired or wireless communication between the apparatus 600 and other devices. The device 600 can access wireless networks based on communication standards, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology and other technologies.

在示例性实施例中,装置600可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, apparatus 600 may be programmed by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation for performing the methods described above.

在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器604,上述指令可由装置600的处理器620执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium including instructions, such as the memory 604 including instructions, which can be executed by the processor 620 of the device 600 to implement the above method. For example, the non-transitory computer readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.

本领域技术人员在考虑说明书及实践这里公开的公开后,将容易想到本公开的其它实施方案。本公开旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the disclosure will be readily apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. The present disclosure is intended to cover any modification, use or adaptation of the present disclosure. These modifications, uses or adaptations follow the general principles of the present disclosure and include common knowledge or conventional technical means in the technical field not disclosed in the present disclosure. . The specification and examples are to be considered exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It should be understood that the present disclosure is not limited to the precise constructions which have been described above and shown in the drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (13)

1.一种防止电源键被误触的方法,其特征在于,所述方法包括:1. A method for preventing the power button from being accidentally touched, characterized in that the method comprises: 确定电子设备的传感器采集的数据;determine the data collected by the sensors of the electronic device; 根据所述传感器采集的数据确定所述电子设备当前的状态;determining the current state of the electronic device according to the data collected by the sensor; 当所述电子设备当前的状态为预设状态时,如果检测到所述电子设备的电源键被触发,控制所述电子设备的系统继续运行在所述电源键未被触发时的状态。When the current state of the electronic device is the preset state, if it is detected that the power key of the electronic device is triggered, the system for controlling the electronic device continues to run in the state when the power key is not triggered. 2.根据权利要求1所述的方法,其特征在于,所述传感器为设置在所述电子设备上的角速度传感器,所述传感器采集的数据包括所述角速度传感器采集的所述电子设备的角速度值和所述电子设备的方位角度。2. The method according to claim 1, wherein the sensor is an angular velocity sensor arranged on the electronic device, and the data collected by the sensor includes the angular velocity value of the electronic device collected by the angular velocity sensor and the azimuth angle of the electronic device. 3.根据权利要求2所述的方法,其特征在于,所述根据所述传感器采集的数据确定所述电子设备当前的状态,包括:3. The method according to claim 2, wherein the determining the current state of the electronic device according to the data collected by the sensor comprises: 确定所述角速度传感器采集的角速度值是否在第一预设范围,以及确定所述角速度传感器采集的方位角度是否在第二预设范围;determining whether the angular velocity value collected by the angular velocity sensor is within a first preset range, and determining whether the azimuth angle collected by the angular velocity sensor is within a second preset range; 当所述角速度值在所述第一预设范围并且所述方位角度在所述第二预设范围时,确定所述电子设备当前的状态为第一预设状态。When the angular velocity value is within the first preset range and the azimuth angle is within the second preset range, it is determined that the current state of the electronic device is the first preset state. 4.根据权利要求2所述的方法,其特征在于,所述方法还包括:4. The method according to claim 2, characterized in that the method further comprises: 确定所述角速度传感器采集的角速度值是否在第三预设范围,以及确定所述角速度传感器采集的方位角度是否在第四预设范围;determining whether the angular velocity value collected by the angular velocity sensor is within a third preset range, and determining whether the azimuth angle collected by the angular velocity sensor is within a fourth preset range; 当所述角速度值在所述第三预设范围并且所述方位角度在所述第四预设范围时,如果检测到所述电子设备的电源键被触发,控制所述电子设备从第一状态切换至第二状态。When the angular velocity value is in the third preset range and the azimuth angle is in the fourth preset range, if it is detected that the power button of the electronic device is triggered, control the electronic device from the first state Switch to the second state. 5.根据权利要求1所述的方法,其特征在于,所述传感器为设置在所述电子设备上的加速度传感器,所述传感器采集的数据包括所述电子设备在所述加速度传感器所在的三维坐标系中的三个轴向的加速度数值。5. The method according to claim 1, wherein the sensor is an acceleration sensor arranged on the electronic device, and the data collected by the sensor includes the three-dimensional coordinates of the electronic device where the acceleration sensor is located The acceleration values of the three axes in the system. 6.根据权利要求5所述的方法,其特征在于,所述根据所述传感器采集的数据确定所述电子设备当前的状态,包括:6. The method according to claim 5, wherein the determining the current state of the electronic device according to the data collected by the sensor comprises: 确定所述加速度传感器采集的三个轴向的加速度数值是否分别位于各自对应的第五预设范围、第六预设范围以及第七预设范围;Determining whether the acceleration values of the three axes collected by the acceleration sensor are respectively in the corresponding fifth preset range, sixth preset range and seventh preset range; 当所述加速度传感器采集的三个轴向的加速度数值均位于各自对应的第五预设范围、第六预设范围以及第七预设范围时,确定所述电子设备当前的状态为第二预设状态。When the acceleration values of the three axes collected by the acceleration sensor are all in the corresponding fifth preset range, sixth preset range and seventh preset range, it is determined that the current state of the electronic device is the second preset range. set state. 7.一种防止电源键被误触的装置,其特征在于,所述装置包括:7. A device for preventing the power button from being accidentally touched, characterized in that the device includes: 数据确定模块,被配置为确定电子设备的传感器采集的数据;a data determination module configured to determine data collected by sensors of the electronic device; 状态确定模块,被配置为根据所述数据确定模块确定的所述传感器采集的数据确定所述电子设备当前的状态;A state determination module configured to determine the current state of the electronic device according to the data collected by the sensor determined by the data determination module; 状态控制模块,被配置为当所述状态确定模块确定所述电子设备当前的状态为预设状态时,如果检测到所述电子设备的电源键被触发,控制所述电子设备的系统继续运行在所述电源键未被触发时的状态。The state control module is configured to, when the state determination module determines that the current state of the electronic device is a preset state, if it is detected that the power button of the electronic device is triggered, the system for controlling the electronic device continues to run at The state when the power key is not triggered. 8.根据权利要求7所述的装置,其特征在于,所述传感器为设置在所述电子设备上的角速度传感器,所述数据确定模块确定的所述传感器采集的数据包括所述角速度传感器采集的所述电子设备的角速度值和所述电子设备的方位角度。8. The device according to claim 7, wherein the sensor is an angular velocity sensor arranged on the electronic device, and the data collected by the sensor determined by the data determination module includes the angular velocity sensor collected by the angular velocity sensor. The angular velocity value of the electronic device and the azimuth angle of the electronic device. 9.根据权利要求8所述的装置,其特征在于,所述状态确定模块包括:9. The device according to claim 8, wherein the state determining module comprises: 第一确定子模块,被配置为确定所述角速度传感器采集的角速度值是否在第一预设范围,以及确定所述角速度传感器采集的方位角度是否在第二预设范围;The first determining submodule is configured to determine whether the angular velocity value collected by the angular velocity sensor is within a first preset range, and determine whether the azimuth angle collected by the angular velocity sensor is within a second preset range; 第二确定子模块,被配置为当所述第一确定子模块确定所述角速度值在所述第一预设范围并且所述方位角度在所述第二预设范围时,确定所述电子设备当前的状态为第一预设状态。The second determination submodule is configured to determine that the electronic device The current state is the first preset state. 10.根据权利要求8所述的装置,其特征在于,所述装置还包括:10. The device according to claim 8, further comprising: 第一确定模块,被配置为确定所述角速度传感器采集的角速度值是否在第三预设范围,以及确定所述角速度传感器采集的方位角度是否在第四预设范围;The first determination module is configured to determine whether the angular velocity value collected by the angular velocity sensor is within a third preset range, and determine whether the azimuth angle collected by the angular velocity sensor is within a fourth preset range; 状态切换模块,当所述第一确定模块确定所述角速度值在所述第三预设范围并且所述方位角度在所述第四预设范围时,如果检测到所述电子设备的电源键被触发,控制所述电子设备从第一状态切换至第二状态。The state switching module, when the first determination module determines that the angular velocity value is within the third preset range and the azimuth angle is within the fourth preset range, if it is detected that the power button of the electronic device is pressed triggering, controlling the electronic device to switch from the first state to the second state. 11.根据权利要求7所述的装置,其特征在于,所述传感器为设置在所述电子设备上的加速度传感器,所述数据确定模块确定的所述传感器采集的数据包括所述电子设备在所述加速度传感器所在的三维坐标系中的三个轴向的加速度数值。11. The device according to claim 7, wherein the sensor is an acceleration sensor arranged on the electronic device, and the data collected by the sensor determined by the data determination module includes The acceleration values of the three axes in the three-dimensional coordinate system where the acceleration sensor is located. 12.根据权利要求11所述的装置,其特征在于,所述状态确定模块包括:12. The device according to claim 11, wherein the state determining module comprises: 第三确定子模块,被配置为确定所述加速度传感器采集的三个轴向的加速度数值是否分别位于各自对应的第五预设范围、第六预设范围以及第七预设范围;The third determining submodule is configured to determine whether the acceleration values of the three axes collected by the acceleration sensor are respectively in the corresponding fifth preset range, sixth preset range and seventh preset range; 第四确定子模块,被配置为当所述第三确定子模块确定所述加速度传感器采集的三个轴向的加速度数值均位于各自对应的第五预设范围、第六预设范围以及第七预设范围时,确定所述电子设备当前的状态为第二预设状态。The fourth determining sub-module is configured to be configured to be configured to be configured to be configured to determine that the acceleration values of the three axes collected by the acceleration sensor are all within the corresponding fifth preset range, sixth preset range and seventh preset range when the third determining sub-module determines that In the preset range, it is determined that the current state of the electronic device is the second preset state. 13.一种电子设备,其特征在于,所述电子设备包括:13. An electronic device, characterized in that the electronic device comprises: 处理器;processor; 用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions; 其中,所述处理器被配置为:Wherein, the processor is configured as: 确定电子设备的传感器采集的数据;determine the data collected by the sensors of the electronic device; 根据所述传感器采集的数据确定所述电子设备当前的状态;determining the current state of the electronic device according to the data collected by the sensor; 当所述电子设备当前的状态为预设状态时,如果检测到所述电子设备的电源键被触发,控制所述电子设备的系统继续运行在所述电源键未被触发时的状态。When the current state of the electronic device is the preset state, if it is detected that the power key of the electronic device is triggered, the system for controlling the electronic device continues to run in the state when the power key is not triggered.
CN201610461183.6A 2016-06-22 2016-06-22 Prevent power key by the method and device of false touch, electronic equipment Pending CN106201285A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610461183.6A CN106201285A (en) 2016-06-22 2016-06-22 Prevent power key by the method and device of false touch, electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610461183.6A CN106201285A (en) 2016-06-22 2016-06-22 Prevent power key by the method and device of false touch, electronic equipment

Publications (1)

Publication Number Publication Date
CN106201285A true CN106201285A (en) 2016-12-07

Family

ID=57461139

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610461183.6A Pending CN106201285A (en) 2016-06-22 2016-06-22 Prevent power key by the method and device of false touch, electronic equipment

Country Status (1)

Country Link
CN (1) CN106201285A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106843568A (en) * 2016-12-30 2017-06-13 珠海市魅族科技有限公司 A kind of terminal installation of false-touch prevention method and false-touch prevention
CN106874015A (en) * 2017-03-06 2017-06-20 郑州云海信息技术有限公司 A kind of method and system for realizing that PowerButton is invalid
CN107390996A (en) * 2017-08-02 2017-11-24 维沃移动通信有限公司 A kind of processing method and mobile terminal of power key false touch
CN108415548A (en) * 2018-03-19 2018-08-17 联想(北京)有限公司 The control method and electronic equipment of a kind of electronic equipment
CN108762981A (en) * 2018-04-27 2018-11-06 Oppo广东移动通信有限公司 Black screen processing method and related device
CN109393565A (en) * 2017-08-17 2019-03-01 常州市派腾电子技术服务有限公司 Electronic cigarette control method, device and electronic cigarette

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073281A (en) * 2009-11-23 2011-05-25 英业达股份有限公司 Method and device for avoiding accidental touch of power switch
CN102377871A (en) * 2010-08-24 2012-03-14 联想(北京)有限公司 Information processing equipment and control method thereof
CN103019124A (en) * 2012-12-27 2013-04-03 中兴通讯股份有限公司 Device and method for preventing mis-trigger of switch
CN103581407A (en) * 2012-07-23 2014-02-12 深圳市经纬科技有限公司 Method and system for protecting screen against spurious triggering in conversation process
EP2759922A2 (en) * 2013-01-29 2014-07-30 Samsung Electronics Co., Ltd Method of performing a function of a device based on motion of the device and device for performing the method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073281A (en) * 2009-11-23 2011-05-25 英业达股份有限公司 Method and device for avoiding accidental touch of power switch
CN102377871A (en) * 2010-08-24 2012-03-14 联想(北京)有限公司 Information processing equipment and control method thereof
CN103581407A (en) * 2012-07-23 2014-02-12 深圳市经纬科技有限公司 Method and system for protecting screen against spurious triggering in conversation process
CN103019124A (en) * 2012-12-27 2013-04-03 中兴通讯股份有限公司 Device and method for preventing mis-trigger of switch
EP2759922A2 (en) * 2013-01-29 2014-07-30 Samsung Electronics Co., Ltd Method of performing a function of a device based on motion of the device and device for performing the method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106843568A (en) * 2016-12-30 2017-06-13 珠海市魅族科技有限公司 A kind of terminal installation of false-touch prevention method and false-touch prevention
CN106874015A (en) * 2017-03-06 2017-06-20 郑州云海信息技术有限公司 A kind of method and system for realizing that PowerButton is invalid
CN107390996A (en) * 2017-08-02 2017-11-24 维沃移动通信有限公司 A kind of processing method and mobile terminal of power key false touch
CN107390996B (en) * 2017-08-02 2019-11-22 维沃移动通信有限公司 Handling method and mobile terminal for false touch of power button
CN109393565A (en) * 2017-08-17 2019-03-01 常州市派腾电子技术服务有限公司 Electronic cigarette control method, device and electronic cigarette
CN108415548A (en) * 2018-03-19 2018-08-17 联想(北京)有限公司 The control method and electronic equipment of a kind of electronic equipment
CN108762981A (en) * 2018-04-27 2018-11-06 Oppo广东移动通信有限公司 Black screen processing method and related device

Similar Documents

Publication Publication Date Title
JP6199510B2 (en) Method and apparatus for switching display modes
CN106445238B (en) Edge touch-control suppressing method and device
US20170060320A1 (en) Method for controlling a mobile terminal using a side touch panel
CN106873834B (en) Method and device for identifying triggering of key and mobile terminal
CN105657173A (en) Volume adjustment method and device and terminal
CN106201285A (en) Prevent power key by the method and device of false touch, electronic equipment
CN106547663A (en) Button management method and device
CN107193553A (en) Key control method and device
CN106055144B (en) Control method and device, the electronic equipment of touch screen state
CN107580129A (en) Terminal state control method and device
CN106790955A (en) Terminal control method and device
CN107390977A (en) Button operation method, device and storage medium
CN106055145A (en) Operating mode determination method and apparatus of terminal
CN107402676A (en) Trigger action processing method, device and computer-readable recording medium
CN105739760A (en) Control method and device for anti-false touch mode
CN105979066A (en) Screen lighting-up method and screen lighting-up device
CN107885418A (en) Terminal, multi-screen display method and device
CN106547462B (en) Photographing control method and device and mobile terminal
CN111104001B (en) A method, device, mobile terminal and storage medium for preventing accidental touch of screen
CN108932116A (en) The adjusting method and device of volume
CN106775228A (en) The operating method and device of icon
CN106484296A (en) Mobile terminal prevents processing method, device and the equipment of false touch
CN107566626A (en) Terminal state control method and device
CN108766427B (en) Voice control method and device
CN107197107A (en) Enabled instruction processing method and processing device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20161207