CN103885588B - Method and apparatus for automatic switching - Google Patents

Method and apparatus for automatic switching Download PDF

Info

Publication number
CN103885588B
CN103885588B CN201410078725.2A CN201410078725A CN103885588B CN 103885588 B CN103885588 B CN 103885588B CN 201410078725 A CN201410078725 A CN 201410078725A CN 103885588 B CN103885588 B CN 103885588B
Authority
CN
China
Prior art keywords
light intensity
change
distance
time domain
value
Prior art date
Application number
CN201410078725.2A
Other languages
Chinese (zh)
Other versions
CN103885588A (en
Inventor
周学文
张国全
郭旸
Original Assignee
小米科技有限责任公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 小米科技有限责任公司 filed Critical 小米科技有限责任公司
Priority to CN201410078725.2A priority Critical patent/CN103885588B/en
Publication of CN103885588A publication Critical patent/CN103885588A/en
Application granted granted Critical
Publication of CN103885588B publication Critical patent/CN103885588B/en

Links

Abstract

本公开示出了一种自动切换方法及装置,属于互联网终端领域。 The present disclosure shows a method and apparatus for automatically switching, belonging to the field of the Internet terminal. 所述方法包括:获取电子设备的屏幕前方在不同时刻的距离值和光强值;检测距离值在时域上的变化是否符合预设的距离变化条件且光强值在时域上的变化是否符合预设的光强变化条件;如果距离值在时域上的变化符合距离变化条件且光强值在时域上的变化符合光强变化条件,则进行自动休眠或者自动唤醒。 The method comprising: acquiring an electronic apparatus in front of the screen and the distance values ​​of light intensity values ​​at different times; detecting a change in the time domain distance value meets the conditions change and the predetermined distance changes in light intensity values ​​on the time domain are comply with the preset light intensity changing conditions; if the variation in the time domain distance value meets the conditions change in the distance and the light intensity value variation in the time domain in line with the varying conditions of light intensity, the automatic or automatic sleep wakeup. 本公开解决了相关技术在实现Smart? The present disclosure addresses the related technologies in the realization of Smart? cover的自动休眠或自动唤醒时必须依赖电子设备上的磁力传感器的问题;达到了并未设置磁力传感器的电子设备也能够实现Smart? cover automatic or automatic sleep problems must rely on magnetic sensors on the electronic device wake-up; it has not reached the set magnetic sensor electronics can be achieved Smart? cover的自动休眠或自动唤醒,只需要该电子设备上设置有常见的距离传感器和光强传感器即可的效果。 automatic or automatic cover dormancy wakeup, provided only common distance sensor and the optical sensor to the effect on the electronic device.

Description

自动切换方法及装置 Method and apparatus for automatic switching

技术领域 FIELD

[0001] 本公开涉及互联网终端领域,特别涉及一种自动切换方法及装置。 [0001] The present disclosure relates to Internet terminals, and more particularly, to a method and apparatus for automatic switching.

背景技术 Background technique

[0002] Smart cover(智能保护壳)是平板电脑和智能手机等电子设备上常见的配件。 [0002] Smart cover (Intelligent Protection shell) is on tablets and smart phones and other common electronic devices and accessories. 它可以在用户盖上保护壳时使电子设备自动休眠,还可以在用户翻开保护壳时使电子设备自动唤醒。 It can make the electronic device when a user automatic sleep protective shell cover, the electronic device also allows the user to open automatically wake protective casing.

[0003] 相关技术中,Smart cover实现上述功能的原理如下:在Smart cover的预定位置处设置有一块小磁铁,而在电子设备的相应位置处设置有一个磁力传感器。 [0003] In the related art, the principles of Smart cover achieve the above functions as follows: a small magnet is provided at a predetermined position Smart cover, and a magnetic sensor is provided at a position corresponding to the electronic device. 当用户盖上保护壳时,电子设备上的磁力传感器感应到磁力,触发电子设备自动休眠。 When a user to attach the protective shell, a magnetic sensor on the electronic device to the magnetic sensor, the electronic device automatically trigger sleep. 当用户翻开保护壳时,电子设备上的磁力传感器感应到磁力消失,触发电子设备自动唤醒。 When the user open the protective casing, a magnetic sensor on the electronic device sensed the magnetic force disappears, the electronic device is triggered automatically wake.

[0004] 发明人在实现本公开的过程中,发现相关技术至少存在以下问题: [0004] In the process of implementing the present disclosure, found in the related art least the following problems:

[0005] Smart cover实现上述功能主要靠磁铁和磁力传感器,但是一些Smart cover上没有设置磁铁,或者一些电子设备上没有磁力传感器,此时就无法实现自动休眠和自动唤醒。 [0005] Smart cover achieve the above functions mainly by the magnet and a magnetic sensor, a magnet is not provided but some Smart cover, or some of the magnetic sensors on the electronic device is not, at this time can not be achieved sleep and auto wake.

发明内容 SUMMARY

[0006] 为克服相关技术中存在的问题,本公开提供一种自动切换方法及装置。 [0006] In order to overcome the problems in the related art, the present disclosure provides a method and apparatus for automatic switching. 所述技术方案如下: The technical solutions are as follows:

[0007] 根据本公开实施例的第一方面,提供了一种自动切换方法,所述方法包括: [0007] According to a first aspect of the disclosed embodiment of the present embodiment, there is provided a method of automatic switching, the method comprising:

[0008] 获取电子设备的屏幕前方在不同时刻的距离值和光强值; [0008] The front of the screen of the electronic device acquired distance values ​​and light intensity values ​​at different times;

[0009] 检测所述距离值在时域上的变化是否符合预设的距离变化条件且所述光强值在时域上的变化是否符合预设的光强变化条件; [0009] detecting the change in the time domain distance value meets predetermined distance and the light intensity changing conditions in the time domain variation value meets a predetermined condition change of light intensity;

[0010] 如果所述距离值在时域上的变化符合所述距离变化条件且所述光强值在时域上的变化符合所述光强变化条件,则控制所述电子设备进行自动休眠或者自动唤醒; [0010] If the change in the distance value in the time domain conforms to the distance variations of the conditions and changes in light intensity values ​​in the time domain of the light intensity change in line condition, the electronic control device or an automatic sleep automatic wake-up;

[0011] 其中,检测所述光强值在时域上的变化是否符合预设的光强变化条件包括: [0011] wherein detecting a change in the light intensity values ​​in the time domain meets conditions preset light intensity change comprises:

[0012] 将所述光强值在时域上的变化与预先记录的休眠光强变化曲线或唤醒光强变化曲线进行相似度拟合; [0012] The light intensity values ​​to fit the similarity time-domain variations in the light intensity curves of the sleep or wake up the light intensity curves pre-recorded;

[0013] 如果与所述休眠光强变化曲线拟合出的相似度高于第一阈值,则确定所述光强值在时域上的变化是否符合休眠光强变化条件;所述休眠光强变化条件是指所述光强值在预定时长之内由大于预设光强唤醒阈值的取值变为小于预设光强近零阈值的取值; [0013] If the sleep fitted with a light intensity curve similarity is higher than a first threshold value, the light intensity values ​​to determine a change in the time domain meets varying conditions of light intensity sleep; the sleep intensity refers to changing conditions within the length of the light intensity values ​​of light intensity values ​​wake becomes less than a preset threshold near zero intensity threshold value by a predetermined time greater than a preset;

[0014] 如果与所述唤醒光强变化曲线拟合出的相似度高于第二阈值,则确定所述光强值在时域上的变化是否符合唤醒光强变化条件;所述唤醒光强变化条件是指所述光强值在预定时长之内由小于所述预设光强近零阈值的取值变为大于所述预设光强唤醒阈值的取值。 [0014] If the light intensity variation curve fitting the wake of similarity is higher than a second threshold, determining that the change in the light intensity value meets the wake-up time domain variations in light intensity condition; light intensity of the wake-up It refers to changing conditions in the light intensity value within a predetermined time period less than the preset light intensity near-zero threshold value becomes greater than the preset light intensity value of wake-up threshold.

[0015] 可选地,所述检测所述距离值在时域上的变化是否符合预设的距离变化条件且所述光强值在时域上的变化是否符合预设的光强变化条件,包括: [0015] Alternatively, the detected value of variation of said distance in a time domain meets predetermined distance changing conditions and changes in the light intensity values ​​in the time domain meets conditions preset light intensity changes, include:

[0016] 检测所述距离值在时域上的变化是否符合所述距离变化条件;如果所述距离值在时域上的变化符合所述距离变化条件,则检测所述光强值在时域上的变化是否符合所述光强变化条件; [0016] change detecting the distance value in the time domain the distance meets varying conditions; if the distance value variation in the time domain conforms to the distance change conditions, the light intensity values ​​is detected in the time domain whether the change in condition of the change of light intensity;

[0017]或, [0017] or,

[0018] 检测所述光强值在时域上的变化是否符合所述光强变化条件;如果所述光强值在时域上的变化符合所述光强变化条件,则检测所述距离值在时域上的变化是否符合所述距离变化条件; [0018] detecting changes in the light intensity values ​​in the time domain meets the conditions of light intensity change; if the change in the light intensity values ​​in the time domain conforms to the varying conditions of light intensity, the distance value is detected changes in the time domain from the change meets the condition;

[0019]或, [0019] or,

[0020] 检测所述距离值在时域上的变化是否符合所述距离变化条件且并行检测所述光强值在时域上的变化是否符合所述光强变化条件。 [0020] detecting the change in the time domain distance value meets the condition of change in light intensity and in parallel to the distance change detecting the condition change in light intensity value meets the time domain.

[0021] 可选地,所述检测所述距离值在时域上的变化是否符合所述距离变化条件,包括: [0021] Alternatively, the detected change in the distance value in the time domain the distance change meets the condition, comprising:

[0022] 检测所述距离值在时域上的变化是否符合休眠距离变化条件或唤醒距离变化条件,所述休眠距离变化条件是指所述距离值在预定时长之内由大于预设距离唤醒阈值的取值变为小于预设距离近零阈值的取值,所述唤醒距离变化条件是指所述距离值在预定时长之内由小于所述预设距离近零阈值的取值变为大于所述预设距离唤醒阈值的取值。 [0022] change detecting the distance value in the time domain meets varying conditions sleep or wake up from a distance varying conditions, the change from the sleep condition is that the distance value by the arousal threshold is within a predetermined distance greater than a preset length of time the value becomes less than a preset value near zero distance threshold, change the wake-up condition is that the distance value preset distance from the near-zero threshold value by less than the length of the time within a predetermined value becomes greater than said predetermined distance wake-up threshold value.

[0023] 可选地,所述方法还包括: [0023] Optionally, the method further comprising:

[0024] 记录智能外壳在所述电子设备的屏幕前方由打开状态变为关闭状态过程中的第一光强变化曲线;根据所述第一光强变化曲线生成所述休眠光强变化曲线; [0024] recorded in front of the screen of the smart shell of the electronic device from the open state to the first light intensity curve during the closed state; generating the sleep light intensity variation curve based on the first light intensity variation curve;

[0025]和 / 或; [0025] and / or;

[0026] 记录智能外壳在所述电子设备的屏幕前方由关闭状态变为打开状态过程中的第二光强变化曲线;根据所述第二光强变化曲线生成所述唤醒光强变化曲线。 [0026] recorded in front of the screen of the smart shell of the electronic device from the closed state to the second light intensity curve during the open state; light intensity of the wake-up curve according to the second variation curve to generate a strong light.

[0027] 根据本公开实施例的第二方面,提供了一种自动切换装置,所述装置包括: [0027] According to a second aspect of the disclosed embodiment of the present embodiment, there is provided an automatic switching apparatus, said apparatus comprising:

[0028] 信息获取模块,用于获取电子设备的屏幕前方在不同时刻的距离值和光强值; [0028] The information acquiring module, for acquiring the electronic device from the front of the screen and the values ​​of light intensity values ​​at different times;

[0029] 条件检测模块,用于检测所述距离值在时域上的变化是否符合预设的距离变化条件且所述光强值在时域上的变化是否符合预设的光强变化条件; [0029] The condition detection means for detecting the distance value variation in the time domain meets predetermined distance and the light intensity changing conditions in the time domain variation value meets a predetermined condition change of light intensity;

[0030]自动控制模块,用于在所述距离值在时域上的变化符合所述距离变化条件且所述光强值在时域上的变化符合所述光强变化条件时,控制所述电子设备进行自动休眠或者自动唤醒; [0030] automatic control module for a change in the distance value in the time domain and conforms to the distance variations of the light intensity condition value variation in the time domain when the light intensity meets varying conditions, the control The electronic device for automatic or automatic wake-sleep;

[0031] 其中,检测所述光强值在时域上的变化是否符合预设的光强变化条件包括: [0031] wherein detecting a change in the light intensity values ​​in the time domain meets conditions preset light intensity change comprises:

[0032] 曲线拟合子单元,用于将所述光强值在时域上的变化与预先记录的休眠光强变化曲线或唤醒光强变化曲线进行相似度拟合; [0032] Curve fitting sub-unit, configured to change values ​​in the time domain of the light intensity and the light intensity prerecorded sleep or wake-intensity curves similarity curve fitting;

[0033] 第一确定子单元,用于在与所述休眠光强变化曲线拟合出的相似度高于第一阈值时,确定所述光强值在时域上的变化是否符合休眠光强变化条件,所述休眠光强变化条件是指所述光强值在预定时长之内由大于预设光强唤醒阈值的取值变为小于预设光强近零阈值的取值; [0033] a first determining subunit, configured to, when fitted with the sleep light intensity curve similarity is higher than a first threshold value, determining the change in light intensity value meets the time domain intensity dormant changing conditions, the sleep condition is that a light intensity change of the light intensity values ​​of light intensity over a long wake-up threshold value becomes less than a preset threshold near zero light intensity is greater than a predetermined value at a predetermined time;

[0034] 第二确定子单元,用于在与所述唤醒光强变化曲线拟合出的相似度高于第二阈值时,确定所述光强值在时域上的变化是否符合唤醒光强变化条件,所述唤醒光强变化条件是指所述光强值在预定时长之内由小于所述预设光强近零阈值的取值变为大于所述预设光强唤醒阈值的取值。 [0034] The second determining sub-unit, configured to, when the light intensity curve fitting similarity is higher than a second threshold value of the wakeup, the light intensity values ​​to determine a change in the time domain intensity meets wakeup changing conditions, the wake-up condition is that a change in light intensity of said light intensity value is less than the predetermined intensity by a near-zero threshold value becomes greater than a predetermined length within the preset value when the light intensity of the wake-up threshold .

[0035] 可选地, [0035] Alternatively,

[0036] 所述条件检测模块,用于检测所述距离值在时域上的变化是否符合所述距离变化条件;在所述距离值在时域上的变化符合所述距离变化条件时,检测所述光强值在时域上的变化是否符合所述光强变化条件; [0036] The condition detection means for detecting the distance value variation in the time domain from the change meets the condition; change in the distance value in the time domain conforms to the distance change condition is detected value variation in the time domain of the light intensity change of light intensity meets the condition;

[0037]或, [0037] or,

[0038] 所述条件检测模块,用于检测所述光强值在时域上的变化是否符合所述光强变化条件;在所述光强值在时域上的变化符合所述光强变化条件时,检测所述距离值在时域上的变化是否符合所述距离变化条件; [0038] The condition detection module for detecting changes in the light intensity value in the time domain meets the conditions of light intensity change; a change in the time domain in line with the light intensity change in the light intensity values when the condition change detecting the distance value in the time domain from the change meets the condition;

[0039]或, [0039] or,

[0040] 所述条件检测模块,用于检测所述距离值在时域上的变化是否符合所述距离变化条件且并行检测所述光强值在时域上的变化是否符合所述光强变化条件。 [0040] The condition detection means for detecting the distance value variation in the time domain and meets the parallel detection of a change in light intensity value meets the time domain of the light intensity variation of said distance varying conditions condition.

[0041 ] 可选地,所述条件检测模块,包括: [0041] Alternatively, the condition detection module, comprising:

[0042] 距离检测单元; [0042] The distance detection unit;

[0043] 所述距离检测单元,用于检测所述距离值在时域上的变化是否符合休眠距离变化条件或唤醒距离变化条件,所述休眠距离变化条件是指所述距离值在预定时长之内由大于预设距离唤醒阈值的取值变为小于预设距离近零阈值的取值,所述唤醒距离变化条件是指所述距离值在预定时长之内由小于所述预设距离近零阈值的取值变为大于所述预设距离唤醒阈值的取值。 [0043] The distance detection unit, for detecting the distance value variation in the time domain meets varying conditions sleep or wake up from a distance varying conditions, the change from the sleep condition is that the distance value when the predetermined length of the by a distance greater than the predetermined threshold value becomes a value less than a preset threshold near zero distance wake, the wake-up condition is that the change from the distance value is smaller than said predetermined by the length of time within a predetermined distance near zero the threshold value becomes greater than the preset value from the wake-up threshold.

[0044] 可选地,所述装置还包括: [0044] Optionally, the apparatus further comprising:

[0045] 第一记录单元,用于记录智能外壳在所述电子设备的屏幕前方由打开状态变为关闭状态过程中的第一光强变化曲线;第一生成单元,用于根据所述第一光强变化曲线生成所述休眠光强变化曲线; [0045] The first recording unit for recording the smart shell in front of the screen of the electronic device from the first open state to the closed state of the light intensity curve of processes; a first generating unit, according to the first light intensity curve generated light intensity curve of the sleep;

[0046]和 / 或; [0046] and / or;

[0047] 第二记录单元,用于记录智能外壳在所述电子设备的屏幕前方由关闭状态变为打开状态过程中的第二光强变化曲线;第二生成单元,用于根据所述第二光强变化曲线生成所述唤醒光强变化曲线。 [0047] The second recording unit for recording the smart shell in front of the screen of the electronic device from the closed state to the second light intensity curve during the open state; a second generating unit according to the second generating a light intensity curve of light intensity of the wake-up curve.

[0048] 本公开的实施例提供的技术方案可以包括以下有益效果: [0048] The present embodiment provides a technical solution of the disclosure may comprise the following advantageous effects:

[0049] 通过获取电子设备的屏幕前方在不同时刻的距离值和光强值;如果检测出距离值在时域上的变化符合距离变化条件且光强值在时域上的变化符合光强变化条件,则控制电子设备进行自动休眠或者自动唤醒;解决了相关技术在实现Smart cover的自动休眠或自动唤醒时必须依赖电子设备上的磁力传感器的问题;达到了并未设置磁力传感器的电子设备也能够实现Smart cover的自动休眠或自动唤醒,只需要该电子设备上设置有常见的距离传感器和光强传感器即可的效果。 [0049] by taking the front of the screen of the electronic device distance value and the light intensity values ​​at different times in; if the detected distance value variation in the time domain meet the change in the distance condition and the light intensity value variation in the time domain in line with change of light intensity condition, the control electronics for automatic or automatic wake-sleep; solves the problems of the related art magnetic sensor must rely on the electronic device when implementing Smart cover automatic or automatic wake-sleep; No reached magnetometric sensor disposed electronic device also Smart cover can automatically sleep or wake up automatically only provided with a common optical sensor and a distance sensor can be an effect on the electronic device.

[0050] 应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。 [0050] It should be understood that both the foregoing general description and the details described hereinafter are merely exemplary and explanatory and are not intended to limit the present disclosure.

附图说明 BRIEF DESCRIPTION

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

[0052] 图1是根据一示例性实施例示出的一种自动切换方法的流程图; [0052] FIG. 1 is a flowchart illustrating an automatic switching method is shown according to an exemplary embodiment;

[0053] 图2A是根据一示例性实施例示出的另一自动切换方法的流程图; [0053] FIG 2A is a flowchart illustrating another method for automatic switching to an exemplary embodiment;

[0054] 图2B是图2A所示出的自动切换方法在一种实施示例中的示意图; [0054] FIG. 2B is shown in FIG. 2A is an automatic switching method In an exemplary schematic diagram of the embodiment;

[0055] 图2C是图2A所示出的自动切换方法在另一种实施示例中的示意图; [0055] FIG 2A to FIG 2C is an automatic switching method shown in the schematic view of another example of one embodiment;

[0056] 图3是根据一示例性实施例示出的一种自动切换装置的示意图; [0056] FIG. 3 is a schematic view of an automatic switching device shown in accordance with an exemplary embodiment;

[0057] 图4A是根据一示例性实施例示出的一种自动切换装置的示意图; [0057] FIG. 4A is a schematic view of an automatic switching device shown in accordance with an exemplary embodiment;

[0058] 图4B是图4A示出的光学检测单元在一种实施实例中的示意图; [0058] FIG 4A 4B is shown a schematic view of an optical detection unit In one example embodiment;

[0059] 图5是根据一不例性实施例不出的一种电子设备的结构框图。 [0059] FIG. 5 is a block diagram of an electronic apparatus not according to an exemplary embodiment is not an embodiment.

具体实施方式 Detailed ways

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

[0061]目前大部分的电子设备都设置有距离传感器和光强传感器。 [0061] At present, most electronic devices are provided with a distance sensor and the optical sensor. 距离传感器能够采集到电子设备的屏幕前方的物体与电子设备的屏幕之间的距离值,常用来实现打电话时贴近人脸后的屏幕自动熄灭功能。 The distance sensor can be acquired distance value between the object and the screen in front of the screen of the electronic device an electronic device, close to the rear face of the screen automatically extinguishing function used to implement a call. 而光强传感器能够采集到电子设备的屏幕前方的光强值,常用来实现根据环境光强调节屏幕自身的屏幕亮度的功能。 The optical sensor can collect the light intensity values ​​of the front of the screen of the electronic device, used to implement ambient light brightness of the screen section of the screen emphasize their function. 本公开提供的自动切换方法,能够通过距离值和光强值来实现Smart cover的自动休眠或自动唤醒。 The method of the present disclosure provides automatic switching, it is possible to achieve automatic sleep Smart cover by the distance value and the light intensity values ​​or automatic wakeup.

[0062] 图1是根据一示例性实施例示出的一种自动切换方法的流程图,如图1所示,该自动切换方法用于电子设备中,包括以下步骤。 [0062] FIG. 1 is a flowchart of an automatic switching method is shown according to an exemplary embodiment, shown in FIG. 1, the automatic switching method for an electronic device, comprising the following steps.

[0063] 在步骤SlOl中,获取电子设备的屏幕前方在不同时刻的距离值和光强值; [0063] In step SlOl, the front of the screen of the electronic device acquired distance values ​​and the light intensity values ​​at different times;

[0064] 在步骤S102中,检测距离值在时域上的变化是否符合预设的距离变化条件且光强值在时域上的变化是否符合预设的光强变化条件; [0064] In step S102, the detected distance value variation in the time domain meets predetermined distance changing conditions and changes in the light intensity values ​​in the time domain meets conditions preset light intensity changes;

[0065] 在步骤S103中,如果距离值在时域上的变化符合距离变化条件且光强值在时域上的变化符合光强变化条件,则控制电子设备进行自动休眠或者自动唤醒。 [0065] In step S103, if the change in the time domain distance value meets the conditions change in the distance and the light intensity value variation in the time domain in line with the varying conditions of light intensity, the control electronics for automatic or automatic sleep wakeup.

[0066] 综上所述,本实施例提供的自动切换方法,通过获取电子设备的屏幕前方在不同时刻的距离值和光强值;如果检测出距离值在时域上的变化符合距离变化条件且光强值在时域上的变化符合光强变化条件,则控制电子设备进行自动休眠或者自动唤醒;解决了相关技术在实现Smart cover的自动休眠或自动唤醒时必须依赖电子设备上的磁力传感器的问题;达到了并未设置磁力传感器的电子设备也能够实现Smart cover的自动休眠或自动唤醒,只需要该电子设备上设置有常见的距离传感器和光强传感器即可的效果。 [0066] As described above, the automatic switching method provided in the present embodiment, by taking a screen in front of the electronic device and the distance value light intensity values ​​at different times; if the detected distance value variation in the time domain the distance meet changing conditions and the variation in the light intensity value in the time domain in line with intensity varying conditions, the control electronics automatically sleep or automatic wakeup; solution with a magnetic sensor of the related art to rely on the electronic device when implementing Smart cover automatic sleep or automatic wakeup on question; did not reach the set magnetic sensor electronics can be achieved sleep Smart cover automatic or automatic wake up, there is only need to set common proximity sensor, and light sensor can be strong effect on the electronic device.

[0067] 图2A是根据一示例性实施例示出的另一自动切换方法的流程图,如图2A所示,该自动切换方法用于电子设备中,包括以下步骤。 [0067] FIG 2A is a flowchart of another method for automatic switching to an illustrated exemplary embodiment, shown in Figure 2A, the automatic switching method for an electronic device, comprising the following steps.

[0068] 在步骤S201中,获取电子设备的屏幕前方在不同时刻的距离值和光强值; [0068] In step S201, it acquires from the front of the screen of the electronic device and the value of light intensity values ​​at different times;

[0069] 电子设备每隔预定时间间隔通过距离传感器采集屏幕前方在不同时刻的距离值,比如,每秒20次。 [0069] The electronic device every predetermined time interval by the distance from the front sensor value acquisition screen at different times, for example, 20 times per second. 电子设备还每隔预定时间间隔通过光强传感器采集屏幕前方在不同时刻的光强值。 The electronic device also every predetermined time intervals by the optical sensor in front of a screen capture of light intensity values ​​at different times.

[0070] 距离值和光强值的采集时刻通常是相同的,比如,距离值和光强值均为从0.00秒开始,每秒采集20次;也有可能为间隔时间长度相同,采样时刻略有不同,比如,距离值为从0.00秒开始,每秒采集20次,光强值为0.02秒开始,每秒采集20次。 [0070] The distance value acquisition time and light intensity values ​​are generally the same, for example, distance and light intensity values ​​are values ​​of 0.00 seconds from the start, collecting 20 times per second; the same is also possible for the length of time intervals, the sampling time slightly different, for example, 0.00 seconds from the start distance value collected 20 times per second, the light intensity is 0.02 seconds starts collected 20 times per second. 但只要在同一时间段内采集到的距离值和光强值能够表征这段时间内的距离变化和光强变化即可。 But as long as the same time period the collected light intensity values ​​and the distance values ​​capable of characterizing the change in the distance and the light intensity change during this time to.

[0071] 在步骤S202中,检测距离值在时域上的变化是否符合距离变化条件; [0071] In step S202, a change is detected in the time domain distance value meets the conditions change in the distance;

[0072] 若电子设备上的保护壳由打开状态变为关闭状态,或者由关闭状态变为打开状态,都会引起电子设备的距离值和光强值发生变化。 [0072] When the protective case on the electronic device from the open state to the closed state, or from the closed state to the open state, and the value will cause the light intensity values ​​from the electronic device is changed. 电子设备可以检测距离值在时域上变化是否符合距离变化条件,该距离变化条件用于识别保护壳的由打开状态变为关闭状态,或者由关闭状态变为打开状态的事件。 The electronic device may detect a distance value variation in the time domain from the change meets the condition, the condition for identifying a change in distance by a protective case open state to a closed state or an open state by the event state to closed.

[0073] 在电子设备当前处于唤醒状态时,电子设备检测距离值在时域上的变化是否符合休眠距离变化条件,休眠距离变化条件是指距离值在预定时长之内由大于预设距离唤醒阈值的取值变为小于预设距离近零阈值的取值。 [0073] When the electronic device is currently in the awake state, change of the electronic device detects a distance value in the time domain meets the sleep distance varying conditions, sleep distance change condition is that the distance value arousal threshold by a greater than a predetermined distance within a predetermined duration of the value becomes less than the preset distance near-zero threshold value. 比如,预定时长可以为I秒,预设距离唤醒阈值可以为10cm,预设距离近零阈值可以为0.3cm,如果距离值在I秒内由大于1cm的取值变为小于0.3cm的取值,则认为距离值在时域上的变化符合休眠距离变化条件。 For example, the predetermined period may be a second I, the preset distance may be a wake-up threshold 10cm, the preset distance may be a near-zero threshold 0.3cm, if the distance value is within a second I becomes the value greater than 1cm values ​​of less than 0.3cm it is considered the distance value in the time domain in line with changes in sleep distance changing conditions.

[0074] 在电子设备当前处于休眠状态时,电子设备检测距离值在时域上的变化是否符合唤醒距离变化条件,唤醒距离变化条件是指距离值在预定时长之内由大于预设距离唤醒阈值的取值变为小于预设距离近零阈值的取值。 [0074] When the electronic device is currently in a sleep state, changes in the electronic device detects a distance value in the time domain meets distance varying conditions wakeup, wakeup distance change condition is that the distance value arousal threshold by a greater than a predetermined distance within a predetermined duration of the value becomes less than the preset distance near-zero threshold value. 比如,预定时长可以为I秒,预设距离唤醒阈值可以为10cm,预设距离近零阈值可以为0.3cm,如果距离值在I秒内由小于0.3cm的取值变为大于1cm的取值,则认为距离值在时域上的变化符合唤醒距离变化条件。 For example, the predetermined period may be a second I, the preset distance may be a wake-up threshold 10cm, the preset distance may be a near-zero threshold 0.3cm, if the distance value in seconds into the I value is less than the 0.3cm values ​​greater than 1cm it is considered the distance value in line with the change in the time domain wake from changing conditions.

[0075] 上述检测过程可以由电子设备中的协处理器(Sensor Hub)来实现,协处理器在电子设备处于休眠状态的过程中也可以处理传感器的数据。 [0075] The above-described detection process may be implemented by an electronic device coprocessor (Sensor Hub), the electronic device in the process of the coprocessor is in a sleep state of the sensor data may be processed.

[0076] 对于上述预定时长内采集到的η个距离值,至少要选取属于两端的两个距离值用于上述检测,此时准确性较低,但计算量很小;若电子设备选取全部η个距离值用于上述检测,则准确性较高,但计算量很大。 [0076] For collected within said predetermined duration η distance values, to select at least two distance values ​​belonging to both ends of the detection, the accuracy is low at this time, but the calculation is very small; if the electronic device to select all η distance values ​​used for the detection, the accuracy is high, but a large amount of calculation. 视实施例的不同,可以选取介于2和η之间的k个距离值用于上述检测。 Example view different embodiments, can select a distance between the k values ​​of between 2 and η for the detection.

[0077] 在步骤S203中,如果距离值在时域上的变化符合距离变化条件,则检测光强值在时域上的变化是否符合光强变化条件; [0077] In step S203, if the change in the time domain distance value from the change in line condition, a change of the detected light intensity values ​​in the time domain meets varying conditions of light intensity;

[0078] 由于距离值的检测结果并不总是准确,为此,电子设备还检测光强值在时域上的官话是否符合光强变化条件。 [0078] Since the detection result of the distance value is not always accurate, therefore, the electronic device further detects light intensity values ​​in the time domain Mandarin meets varying conditions of light intensity. 该光强变化条件用于识别保护壳的由打开状态变为关闭状态,或者由关闭状态变为打开状态的事件。 The condition for identifying a change in light intensity by a protective case open state to a closed state or an open state by the event state to closed.

[0079] 在电子设备当前处于唤醒状态时,电子设备检测光强值在时域上的变化是否符合休眠光强变化条件,休眠光强变化条件是指光强值在预定时长之内由大于预设光强唤醒阈值的取值变为小于预设光强近零阈值的取值。 [0079] When the electronic device is currently in the awake state, change of the electronic device detects the light intensity value in the time domain meets the sleep intensity varying conditions, sleep light intensity change condition is that the light intensity values ​​length at a predetermined sum of greater than a predetermined light intensity value provided wakeup becomes less than a preset threshold near zero light intensity threshold values.

[0080] 在电子设备当前处于休眠状态时,电子设备检测光强值在时域上的变化是否符合唤醒光强变化条件,唤醒光强变化条件是指光强值在预定时长之内由大于预设光强唤醒阈值的取值变为小于预设光强近零阈值的取值。 [0080] When the electronic device is currently in a sleep state, changes in the electronic apparatus detected light intensity values ​​in the time domain meets wake intensity varying conditions, change in light intensity conditions wakeup refers to light intensity value by a greater than a predetermined within a predetermined duration of light intensity value provided wakeup becomes less than a preset threshold near zero light intensity threshold values.

[0081] 上述检测过程也可以由电子设备中的协处理器(Sensor Hub)来实现。 [0081] The above-described detection process may also be implemented by an electronic device coprocessor (Sensor Hub). 检测光强值时的预定时长与检测距离值时的预定时长是相同或者说对应的。 When a predetermined length and a predetermined length of time from the time of detection of the detected light intensity value when the value is the same or corresponding. 比如,同属于A时刻和B时刻之间的距离值和光强值。 For example, belong to the same value and the distance between the light intensity value A and the time the B.

[0082] 对于上述预定时长内采集到的N个光强值,至少要选取属于两端的两个光强值用于上述检测,此时准确性较低,但计算量很小;若电子设备选取全部N个光强值用于上述检测,则准确性较高,但计算量很大。 [0082] For collected within the predetermined duration of N intensity values, at least two selected light intensity values ​​belonging to both ends of the detection, the accuracy is low at this time, but the calculation is very small; if the electronic device select all N values ​​for the detected light intensity, the higher the accuracy, but a large amount of calculation. 视实施例的不同,可以选取介于2和N之间的K个光强值用于上述检测。 Example view different embodiments, you can select between the K light intensity values ​​between 2 and N for the detection.

[0083] 在一个例子中,假设预定时长为I秒,预设距离唤醒阈值可以为10cm,预设距离近零阈值可以为0.3cm,预设光强唤醒阈值可以为Xcd,预设光强近零阈值可以为Ycd,则自动唤醒和自动休眠的过程示意如图2B所示。 [0083] In one example, assume the second predetermined length is I, the preset distance may be a wake-up threshold 10cm, the preset distance may be a near-zero threshold 0.3cm, the predetermined light intensity threshold may wake Xcd preset light intensity near process zero threshold may Ycd, automatic sleep and wake up automatically schematically shown in Figure 2B.

[0084] 在步骤S204中,如果距离值在时域上的变化符合距离变化条件且光强值在时域上的变化符合光强变化条件,则控制电子设备进行自动休眠或者自动唤醒。 [0084] In step S204, if the change in the time domain distance value meets the conditions change in the distance and the light intensity value variation in the time domain in line with the varying conditions of light intensity, the control electronics for automatic or automatic sleep wakeup.

[0085] 如果距离值在时域上的变化符合休眠距离变化条件且光强值在时域上的变化符合休眠光强变化条件,则控制电子设备进行自动休眠。 [0085] If the distance value variation in the time domain from the sleep meet changing conditions and changes in light intensity values ​​in the time domain in line with the light intensity change sleep condition, the control electronics automatically sleep.

[0086] 如果距离值在时域上的变化符合唤醒距离变化条件且光强值在时域上的变化符合唤醒光强变化条件,则控制电子设备进行自动休眠。 [0086] If the distance value variation in the time domain from the wakeup meet varying conditions of light intensity and the light intensity value variation in the time domain condition change meets wake, the sleep control electronics automatically.

[0087] 综上所述,本实施例提供的自动切换方法,通过获取电子设备的屏幕前方在不同时刻的距离值和光强值;如果检测出距离值在时域上的变化符合距离变化条件且光强值在时域上的变化符合光强变化条件,则控制电子设备进行自动休眠或者自动唤醒;解决了相关技术在实现Smart cover的自动休眠或自动唤醒时必须依赖电子设备上的磁力传感器的问题;达到了并未设置磁力传感器的电子设备也能够实现Smart cover的自动休眠或自动唤醒,只需要该电子设备上设置有常见的距离传感器和光强传感器即可的效果。 [0087] As described above, the automatic switching method provided in the present embodiment, by taking a screen in front of the electronic device and the distance value light intensity values ​​at different times; if the detected distance value variation in the time domain the distance meet changing conditions and the variation in the light intensity value in the time domain in line with intensity varying conditions, the control electronics automatically sleep or automatic wakeup; solution with a magnetic sensor of the related art to rely on the electronic device when implementing Smart cover automatic sleep or automatic wakeup on question; did not reach the set magnetic sensor electronics can be achieved sleep Smart cover automatic or automatic wake up, there is only need to set common proximity sensor, and light sensor can be strong effect on the electronic device.

[0088] 需要补充说明的一点是,相对于距离值,光强值更容易受到环境因素和人为因素的干扰。 [0088] It should be added is that with respect to the distance value, the light intensity value is more susceptible to interference from environmental factors, and human factors. 仅从光强唤醒阈值和光强近零阈值的阈值角度来测量,非常容易误判。 To measure light intensity only, misjudgment easy arousal threshold angle threshold and the intensity of the near-zero threshold. 为此,可以通过光感Pattern (图形)校正来实现“检测光强值在时域上的变化是否符合休眠光强变化条件或唤醒光强变化条件”步骤,包括如下子步骤: This can be achieved by a light sensing Pattern (pattern) calibration "detecting a change in light intensity values ​​in the time domain meets the sleep conditions or light intensity change conditions of light intensity change wake-up" step, comprises the substeps of:

[0089] 1、预先记录智能外壳在电子设备的屏幕前方由打开状态变为关闭状态过程中的第一光强变化曲线;根据第一光强变化曲线生成休眠光强变化曲线;和/或;预先记录智能外壳在电子设备的屏幕前方由关闭状态变为打开状态过程中的第二光强变化曲线;根据第二光强变化曲线生成唤醒光强变化曲线。 [0089] 1, pre-recorded in the smart shell front of the screen of the electronic device by the first open state to a closed state of the light intensity curve process; and / or; generating a first light intensity curve of the light intensity curve in accordance with the sleep; prerecorded smart shell in front of the screen of the electronic device from the closed state to the second light intensity curve of the open state of the process; wake intensity variation curve of the second curve generated from the light intensity.

[0090] 该子步骤相当于一个训练过程。 [0090] The sub-step corresponds to a training process. 电子设备可以提示用户将智能外壳由打开状态变为关闭状态,或者由关闭状态变为打开状态,电子设备记录在此过程中的光强变化曲线以生成休眠光强变化曲线或唤醒光强变化曲线。 The electronic device can prompt the user to the smart shell open state to a closed state, or from the closed state to the open state, the electronic device records light intensity change in the process to generate a curve of light intensity curve of a sleep or wake up the light intensity curve . 此过程可以进行多次,来统计得到较为合理的休眠光强变化曲线或唤醒光强变化曲线。 This process can be repeated to obtain reasonable statistical sleep or wake up the intensity curve of the light intensity curve. 电子设备保存该休眠光强变化曲线或唤醒光强变化曲线。 Electronic device saves the sleep or wake-intensity curves of light intensity variation curve.

[0091] 2、在检测时,电子设备将光强值在时域上的变化与预先记录的休眠光强变化曲线或唤醒光强变化曲线进行相似度拟合; [0091] 2, upon detection, electronic device fitted similarity light intensity values ​​in a change in the time domain dormancy wakeup light intensity curves of light intensity or a pre-recorded curve;

[0092] 在当前处于唤醒状态时,电子设备将光强值在时域上的变化与预先记录的休眠光强变化曲线进行相似度拟合。 [0092] When the current is awake, the electronic device changes the light intensity values ​​in the time domain with a prerecorded sleep intensity similarity curve fitting.

[0093] 在当前处于休眠状态时,电子设备将光强值在时域上的变化与预先记录的唤醒光强变化曲线进行相似度拟合。 [0093] When the current in a sleep state, the electronic device changes the light intensity values ​​in the time domain with a wakeup prerecorded similarity light intensity curve fitting.

[0094] 3、如果与休眠光强变化曲线拟合出的相似度高于第一阈值,则确定光强值在时域上的变化是否符合休眠光强变化条件; [0094] 3, if the fitted curve and the light intensity change sleep similarity is higher than a first threshold value, it is determined that the value of light intensity variation in the time domain meets varying conditions of light intensity sleep;

[0095] 4、如果与唤醒光强变化曲线拟合出的相似度高于第二阈值,则确定光强值在时域上的变化是否符合唤醒光强变化条件。 [0095] 4, if the light intensity variation curve fitting wake similarity above a second threshold value, it is determined that the value of light intensity variation in the time domain of the light intensity change whether the wake-up condition.

[0096] 在另一个例子中,假设预定时长为I秒,预设距离唤醒阈值可以为10cm,预设距离近零阈值可以为0.3cm,预设光强唤醒阈值可以为Xcd,预设光强近零阈值可以为Ycd,休眠光强变化曲线为a,唤醒变化曲线为b,则自动唤醒和自动休眠的过程示意如图2C所示。 [0096] In another example, it is assumed that I is a second predetermined length, the predetermined threshold may wake up from 10cm, the preset distance may be a near-zero threshold 0.3cm, the predetermined light intensity threshold may wake Xcd preset light intensity may be a near-zero threshold value b, then the automatic wake-up and sleep automatic process shown in Figure 2C is a schematic Ycd, sleep light intensity curve of a, wake-up curve.

[0097] 显然,通过拟合光强变化曲线来检测光强值在时域上的变化是否符合休眠光强变化条件或唤醒光强变化条件。 [0097] Obviously, by fitting a curve of light intensity to detect a change in light intensity values ​​in the time domain meets varying conditions of light intensity or a sleep light intensity change wake-up condition. 不仅考虑了光强变化在阈值角度上的符合度,还考虑了在变化过程角度上的符合度,所以检测结果的精确度较高。 Consideration of not only the degree of change in light intensity in line with the threshold angle, the degree of match is also considered in the process of change of the angle, the higher the accuracy of the test results.

[0098] 还需要说明的另外一点是,上述实施例以先检测距离值的变化再检测光强值的变化来举例说明。 [0098] Another point is further noted that the above embodiments are to detect a change in the distance value and then detecting a change in light intensity values ​​exemplified. 但是在其它实施例中,先检测光强值的变化再检测距离值的变化。 However, in other embodiments, to detect a change in light intensity values ​​of change in the distance values ​​detected again. 也即,上述步骤S201和S202可以采用如下两个步骤实现: That is, the above-described steps S201 and S202 can be implemented using the following two steps:

[0099] 1、检测光强值在时域上的变化是否符合光强变化条件; [0099] 1, detecting a change in light intensity values ​​in the time domain meets varying conditions of light intensity;

[0100] 2、如果光强值在时域上的变化符合光强变化条件,则检测距离值在时域上的变化是否符合距离变化条件; [0100] 2, if the change in light intensity values ​​in the time domain meets varying conditions of light intensity, the detected distance value variation in the time domain from the change meets the condition;

[0101] 在另外一些实施例中,距离值和光强值也可以同时检测。 [0101] In some further embodiments, the value may be detected while the distance and light intensity values. 也即,电子设备检测距离值在时域上的变化是否符合距离变化条件且并行检测光强值在时域上的变化是否符合光强变化条件。 That is, the electronic device detects a distance value variation in the time domain meets the conditions change in the distance and the light intensity value change detected in parallel in the time domain meets varying conditions of light intensity.

[0102] 图3是根据一示例性实施例示出的一种自动切换装置的流程图,如图3所示,该自动切换装置包括信息获取模块320、条件检测模块340和自动控制模块360。 [0102] FIG. 3 is a flowchart of an automatic switch according to one illustrated exemplary embodiment, shown in Figure 3, the automatic switching means includes an information acquisition module 320, condition detection module 340 and control module 360 ​​automatically.

[0103] 信息获取模块320,用于获取电子设备的屏幕前方在不同时刻的距离值和光强值; [0103] information obtaining module 320, configured to obtain an electronic device from the front of the screen and the values ​​of light intensity values ​​at different times;

[0104] 条件检测模块340,用于检测距离值在时域上的变化是否符合预设的距离变化条件且光强值在时域上的变化是否符合预设的光强变化条件; [0104] condition detection module 340, for detecting a change in the time domain distance value meets predetermined distance changing conditions and changes in the light intensity value meets predetermined temporal intensity variation conditions;

[0105]自动控制模块360,用于在距离值在时域上的变化符合距离变化条件且光强值在时域上的变化符合光强变化条件时,则控制电子设备进行自动休眠或者自动唤醒。 [0105] Automatic control module 360, a value for the distance variation in the time domain meets the conditions change in the distance and the light intensity value variation in the time domain when the light intensity changing conditions in line with the control electronic device or automatic wakeup autosleep .

[0106] 关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。 [0106] For the above-described embodiment apparatus, wherein each module performs a specific operation of the embodiment has been described in detail in an embodiment relating to the method, and will not be here described in detail.

[0107] 综上所述,本实施例提供的自动切换装置,通过获取电子设备的屏幕前方在不同时刻的距离值和光强值;如果检测出距离值在时域上的变化符合距离变化条件且光强值在时域上的变化符合光强变化条件,则控制电子设备进行自动休眠或者自动唤醒;解决了相关技术在实现Smart cover的自动休眠或自动唤醒时必须依赖电子设备上的磁力传感器的问题;达到了并未设置磁力传感器的电子设备也能够实现Smart cover的自动休眠或自动唤醒,只需要该电子设备上设置有常见的距离传感器和光强传感器即可的效果。 [0107] As described above, the automatic switching device according to this embodiment, the electronic device by obtaining the distance values ​​of the front of the screen and the light intensity values ​​at different times; if the detected distance value variation in the time domain the distance meet changing conditions and the variation in the light intensity value in the time domain in line with intensity varying conditions, the control electronics automatically sleep or automatic wakeup; solution with a magnetic sensor of the related art to rely on the electronic device when implementing Smart cover automatic sleep or automatic wakeup on question; did not reach the set magnetic sensor electronics can be achieved sleep Smart cover automatic or automatic wake up, there is only need to set common proximity sensor, and light sensor can be strong effect on the electronic device.

[0108] 图4A是根据一示例性实施例示出的另一自动切换装置的流程图,如图4A所示,该自动切换装置包括信息获取模块320、条件检测模块340和自动控制模块360。 [0108] FIG. 4A is a flowchart illustrating exemplary apparatus according to an exemplary embodiment illustrated another embodiment of the automatic switch shown in FIG. 4A, the automatic switching means includes an information acquisition module 320, condition detection module 340 and control module 360 ​​automatically.

[0109] 信息获取模块320,用于获取电子设备的屏幕前方在不同时刻的距离值和光强值; [0109] information obtaining module 320, configured to obtain an electronic device from the front of the screen and the values ​​of light intensity values ​​at different times;

[0110] 条件检测模块340,用于检测距离值在时域上的变化是否符合预设的距离变化条件且光强值在时域上的变化是否符合预设的光强变化条件; [0110] condition detection module 340, for detecting a change in the time domain distance value meets predetermined distance changing conditions and changes in the light intensity value meets predetermined temporal intensity variation conditions;

[0111]自动控制模块360,用于在距离值在时域上的变化符合距离变化条件且光强值在时域上的变化符合光强变化条件时,则控制电子设备进行自动休眠或者自动唤醒。 [0111] Automatic control module 360, a value for the distance variation in the time domain meets the conditions change in the distance and the light intensity value variation in the time domain when the light intensity changing conditions in line with the control electronic device or automatic wakeup autosleep .

[0112] 所述条件检测模块340,用于检测所述距离值在时域上的变化是否符合所述距离变化条件;在所述距离值在时域上的变化符合所述距离变化条件时,检测所述光强值在时域上的变化是否符合所述光强变化条件; [0112] The condition detection module 340 for detecting the distance value variation in the time domain from the change meets the condition; change in the distance value in the time domain when the distance changes in line conditions, detecting a change in the light intensity values ​​in the time domain meets the conditions of change of light intensity;

[0113]或, [0113] or,

[0114] 所述条件检测模块340,用于检测所述光强值在时域上的变化是否符合所述光强变化条件;在所述光强值在时域上的变化符合所述光强变化条件时,检测所述距离值在时域上的变化是否符合所述距离变化条件; [0114] The condition detection module 340 for detecting the light intensity in the time domain value change meets the condition of light intensity change; a change in the light intensity values ​​in the time domain in line with the light intensity when conditions change, change detecting the distance value in the time domain from the change meets the condition;

[0115]或, [0115] or,

[0116] 所述条件检测模块340,用于检测所述距离值在时域上的变化是否符合所述距离变化条件且并行检测所述光强值在时域上的变化是否符合所述光强变化条件。 The [0116] condition detection module 340 for detecting the distance value variation in the time domain meets the change condition and in parallel from the light intensity detecting a change in the time domain value meets said intensity changing conditions.

[0117] 所述条件检测模块340,包括:距离检测单元342和光强检测单元344。 The [0117] 340 condition detection module, comprising: a distance detection unit 342 detecting unit 344 and the light intensity.

[0118] 所述距离检测单元342,用于检测所述距离值在时域上的变化是否符合休眠距离变化条件或唤醒距离变化条件,所述休眠距离变化条件是指所述距离值在预定时长之内由大于预设距离唤醒阈值的取值变为小于预设距离近零阈值的取值,所述唤醒距离变化条件是指所述距离值在预定时长之内由小于所述预设距离近零阈值的取值变为大于所述预设距离唤醒阈值的取值。 [0118] The distance detection unit 342 for detecting the distance value variation in the time domain meets varying conditions sleep or wake up from a distance varying conditions, the change from the sleep condition is that the distance value at a predetermined length wake-up within a distance greater than a predetermined threshold value of the distance becomes less than a preset value near-zero threshold, changes from the wake-up condition is that the distance value is within a predetermined length of time is less than the predetermined distance from the near zero threshold value becomes greater than the preset threshold value of the wake-up distance.

[0119] 所述光强检测单元344,用于检测所述光强值在时域上的变化是否符合休眠光强变化条件或唤醒光强变化条件,所述休眠光强变化条件是指所述光强值在预定时长之内由大于预设光强唤醒阈值的取值变为小于预设光强近零阈值的取值,所述唤醒光强变化条件是指所述光强值在预定时长之内由小于所述预设光强近零阈值的取值变为大于所述预设光强唤醒阈值的取值。 [0119] The light intensity detecting unit 344 for detecting a change in the light intensity value in the time domain meets the conditions or changes in light intensity sleep wake varying conditions of light intensity, light intensity change the sleep condition means the light intensity values ​​in a predetermined duration greater than the preset light intensity of the wake-up threshold value becomes less than a preset threshold near zero light intensity values, the wake-up condition is that the light intensity change of the light intensity values ​​at a predetermined length within the predetermined light intensity is less than the near-zero threshold value becomes greater than the preset light intensity value of wake-up threshold.

[0120] 可选地,所述光强检测单元344,包括:曲线拟合子单元344a、第一确定子单元344b和第二确定子单元344c,如图4B所示。 [0120] Alternatively, the light intensity detecting unit 344, comprising: a curve fitting subunit 344a, 344b of the first determining sub-unit and a second determining sub-unit 344c, shown in Figure 4B.

[0121] 所述曲线拟合子单元a,用于将所述光强值在时域上的变化与预先记录的休眠光强变化曲线或唤醒光强变化曲线进行相似度拟合; [0121] The curve fitting subunit a, for a change in the light intensity values ​​in the time domain with a prerecorded sleep or wake up the light intensity curves of light intensity variation curve fitting similarity;

[0122] 所述第一确定子单元b,用于在与所述休眠光强变化曲线拟合出的相似度高于第一阈值时,确定所述光强值在时域上的变化是否符合所述休眠光强变化条件; [0122] The first determining sub-unit B, it is higher than a first threshold value for determining the light intensity values ​​in the sleep fitted with a light intensity curve in the time domain similarity variation meets the sleep condition change of light intensity;

[0123] 所述第二确定子单元C,用于在与所述唤醒光强变化曲线拟合出的相似度高于第二阈值时,确定所述光强值在时域上的变化是否符合所述唤醒光强变化条件。 [0123] The second determining sub-unit C, is used when the light intensity curve fitting similarity is higher than a second threshold value of the wakeup, the light intensity values ​​to determine a change in the time domain meets the light intensity change wake-up condition.

[0124] 如图4B所示,所述装置还包括: [0124] FIG. 4B, the apparatus further comprising:

[0125] 第一记录单元362,用于记录智能外壳在所述电子设备的屏幕前方由打开状态变为关闭状态过程中的第一光强变化曲线;第一生成单元364,用于根据所述第一光强变化曲线生成所述休眠光强变化曲线; [0125] The first recording unit 362 for recording the smart shell in front of the screen of the electronic device from the first open state to the closed state of the light intensity curve of processes; a first generating unit 364, according to the generating a first light intensity curve of the light intensity curve of sleep;

[0126]和/或; [0126] and / or;

[0127] 第二记录单元366,用于记录智能外壳在所述电子设备的屏幕前方由关闭状态变为打开状态过程中的第二光强变化曲线;第二生成单元368,用于根据所述第二光强变化曲线生成所述唤醒光强变化曲线。 [0127] The second recording unit 366 for recording the smart shell in front of the screen of the electronic device from the closed state to the second light intensity curve of an opened state during; second generating unit 368, according to the generating a second light intensity variation curve of the light intensity curve wake.

[0128] 关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。 [0128] For the above-described embodiment apparatus, wherein each module performs a specific operation of the embodiment has been described in detail in an embodiment relating to the method, and will not be here described in detail.

[0129] 综上所述,本实施例提供的自动切换装置,通过获取电子设备的屏幕前方在不同时刻的距离值和光强值;如果检测出距离值在时域上的变化符合距离变化条件且光强值在时域上的变化符合光强变化条件,则控制电子设备进行自动休眠或者自动唤醒;解决了相关技术在实现Smart cover的自动休眠或自动唤醒时必须依赖电子设备上的磁力传感器的问题;达到了并未设置磁力传感器的电子设备也能够实现Smart cover的自动休眠或自动唤醒,只需要该电子设备上设置有常见的距离传感器和光强传感器即可的效果。 [0129] As described above, the automatic switching device according to this embodiment, the electronic device by obtaining the distance values ​​of the front of the screen and the light intensity values ​​at different times; if the detected distance value variation in the time domain the distance meet changing conditions and the variation in the light intensity value in the time domain in line with intensity varying conditions, the control electronics automatically sleep or automatic wakeup; solution with a magnetic sensor of the related art to rely on the electronic device when implementing Smart cover automatic sleep or automatic wakeup on question; did not reach the set magnetic sensor electronics can be achieved sleep Smart cover automatic or automatic wake up, there is only need to set common proximity sensor, and light sensor can be strong effect on the electronic device.

[0130] 本实施例提供的自动切换装置,通过拟合光强变化曲线来检测光强值在时域上的变化是否符合休眠光强变化条件或唤醒光强变化条件。 [0130] The present automatic switching device provided in the embodiment, the light intensity value detected by the light intensity variation curve fitting in the time domain meets varying conditions of light intensity or a sleep light intensity change wake-up condition. 不仅考虑了光强变化在阈值角度上的符合度,还考虑了在变化过程角度上的符合度,所以检测结果的精确度较高。 Consideration of not only the degree of change in light intensity in line with the threshold angle, the degree of match is also considered in the process of change of the angle, the higher the accuracy of the test results.

[0131] 图5是根据一不例性实施例不出的一种电子设备500的框图。 [0131] FIG. 5 is a block diagram of an electronic apparatus 500 according to an exemplary embodiment does not of the embodiment. 例如,电子设备500可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。 For example, the electronic device 500 may be a mobile phone, a computer, a digital broadcast terminal, messaging devices, game consoles, tablets, medical equipment, fitness equipment, personal digital assistants.

[0132] 参照图5,电子设备500可以包括以下一个或多个组件:处理组件502,存储器504,电源组件506,多媒体组件508,音频组件510,输入/输出(I/O)的接口512,传感器组件514,以及通信组件516。 [0132] Referring to Figure 5, the electronic device 500 may comprise one or more of the following components: a processing component 502, memory 504, power module 506, the multimedia component 508, audio components 510, input / output (I / O) interface 512, the sensor assembly 514, and a communication component 516.

[0133] 处理组件502通常控制电子设备500的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。 [0133] Processing component 502 typically controls the overall operation of the electronic device 500, such as a display, a telephone call, a data communication operation, camera operations and recording operations associated. 处理组件502可以包括一个或多个处理器520来执行指令,以完成上述的方法的全部或部分步骤。 Processing component 502 may include one or more processors 520 to execute instructions, to perform all or part of the steps of the method described above. 此外,处理组件502可以包括一个或多个模块,便于处理组件502和其他组件之间的交互。 Moreover, processing component 502 may include one or more modules, facilitates the interaction between a component 502 and other components. 例如,处理部件502可以包括多媒体模块,以方便多媒体组件508和处理组件502之间的交互。 For example, processing component 502 may include a multimedia module to facilitate interaction between the media processing component 502 and the component 508.

[0134] 存储器504被配置为存储各种类型的数据以支持在电子设备500的操作。 [0134] The memory 504 is configured to store various types of data to support the operation of the electronic device 500. 这些数据的示例包括用于在电子设备500上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。 The exemplary data comprise instructions for any application or process operating on the electronic device 500, contact data, phonebook data, messages, pictures, videos and the like. 存储器504可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。 The memory 504 may be implemented by any type of volatile or non-volatile storage devices, or combinations thereof, 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.

[0135] 电力组件506为电子设备500的各种组件提供电力。 [0135] Power assembly 506 provides power to the various components of the electronic device 500. 电力组件506可以包括电源管理系统,一个或多个电源,及其他与为电子设备500生成、管理和分配电力相关联的组件。 Power assembly 506 may include a power management system, one or more power sources, and other electronic apparatus 500 generates, for the management and distribution of power associated components.

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

[0137] 音频组件510被配置为输出和/或输入音频信号。 [0137] Audio component 510 is configured to output and / or input audio signal. 例如,音频组件510包括一个麦克风(MIC),当电子设备500处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。 For example, an audio component 510 includes a microphone (the MIC), when the electronic device 500 in the operation mode, such as a call mode, recording mode and voice recognition mode, the microphone configured to receive an external audio signal. 所接收的音频信号可以被进一步存储在存储器504或经由通信组件516发送。 The received audio signal may be stored in memory 504 or transmitted via the further communications component 516. 在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。 In some embodiments, an audio component 810 further includes a speaker for outputting an audio signal.

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

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

[0140] 通信组件516被配置为便于电子设备500和其他设备之间有线或无线方式的通信。 [0140] Communication component 516 is configured to facilitate communications between the electronic device 500 and other wired or wireless devices. 电子设备500可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。 The electronic device 500 may access the wireless network-based communications standards, such as WiFi, 2G or 3G, or combinations thereof. 在一个示例性实施例中,通信部件516经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。 In one exemplary embodiment, the communication section 516 receives a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel. 在一个示例性实施例中,所述通信部件516还包括近场通信(NFC)模块,以促进短程通信。 In one exemplary embodiment, the communication member 516 further includes a near field communication (NFC) module to facilitate short-range communications. 例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。 For example, the NFC module can be based on radio frequency identification (RFID) technology, infrared data association (IrDA), ultra wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0141] 在示例性实施例中,电子设备500可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSH))、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。 [0141] In an exemplary embodiment, the electronic device 500 may be one or more application specific integrated circuits (ASIC), a digital signal processor (DSP), digital signal processing devices (the DSH)), programmable logic devices (PLD ), field programmable gate arrays (the FPGA), a controller, a microcontroller, a microprocessor, or other electronic components to achieve, for performing the above method.

[0142] 在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器504,上述指令可由电子设备500的处理器520执行以完成上述方法。 [0142] In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium comprising instructions, the instructions include, for example memory 504, the command processor 520 by electronic device 500 to perform the above method. 例如,所述非临时性计算机可读存储介质可以是R0M、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。 For example, the non-transitory computer-readable storage medium may be a R0M, a random access memory (RAM), CD-ROM, magnetic tapes, floppy disks, and optical data storage devices.

[0143] —种非临时性计算机可读存储介质,当所述存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行一种自动切换方法,所述方法包括: [0143] - species of non-transitory computer-readable storage medium, when the storage medium is executed by a processor of the electronic device, the electronic device capable of performing such an automatic switch, the method comprising:

[0144] 获取电子设备的屏幕前方在不同时刻的距离值和光强值; [0144] acquired from the front of the screen of the electronic device and the value of light intensity values ​​at different times;

[0145] 检测所述距离值在时域上的变化是否符合预设的距离变化条件且所述光强值在时域上的变化是否符合预设的光强变化条件; [0145] detecting the change in the time domain distance value meets predetermined distance and the light intensity changing conditions in the time domain variation value meets a predetermined condition change of light intensity;

[0146] 如果所述距离值在时域上的变化符合所述距离变化条件且所述光强值在时域上的变化符合所述光强变化条件,则控制所述电子设备进行自动休眠或者自动唤醒。 [0146] If the change in the distance value in the time domain conforms to the distance variations of the conditions and changes in light intensity values ​​in the time domain of the light intensity change in line condition, the electronic control device or an automatic sleep automatic wake-up.

[0147] 可选地,所述检测所述距离值在时域上的变化是否符合预设的距离变化条件且所述光强值在时域上的变化是否符合预设的光强变化条件,包括: [0147] Alternatively, the detected value of variation of said distance in a time domain meets predetermined distance changing conditions and changes in the light intensity values ​​in the time domain meets conditions preset light intensity changes, include:

[0148] 检测所述距离值在时域上的变化是否符合所述距离变化条件;如果所述距离值在时域上的变化符合所述距离变化条件,则检测所述光强值在时域上的变化是否符合所述光强变化条件; [0148] change detecting the distance value in the time domain the distance meets varying conditions; if the distance value variation in the time domain conforms to the distance change conditions, the light intensity values ​​is detected in the time domain whether the change in condition of the change of light intensity;

[0149]或, [0149] or,

[0150] 检测所述光强值在时域上的变化是否符合所述光强变化条件;如果所述光强值在时域上的变化符合所述光强变化条件,则检测所述距离值在时域上的变化是否符合所述距离变化条件; [0150] detecting changes in the light intensity values ​​in the time domain meets the conditions of light intensity change; if the change in the light intensity values ​​in the time domain conforms to the varying conditions of light intensity, the distance value is detected changes in the time domain from the change meets the condition;

[0151]或, [0151] or,

[0152] 检测所述距离值在时域上的变化是否符合所述距离变化条件且并行检测所述光强值在时域上的变化是否符合所述光强变化条件。 [0152] detecting the change in the time domain distance value meets the condition of change in light intensity and in parallel to the distance change detecting the condition change in light intensity value meets the time domain.

[0153] 可选地,所述检测所述距离值在时域上的变化是否符合所述距离变化条件,包括: [0153] Alternatively, the detected change in the distance value in the time domain the distance change meets the condition, comprising:

[0154] 检测所述距离值在时域上的变化是否符合休眠距离变化条件或唤醒距离变化条件,所述休眠距离变化条件是指所述距离值在预定时长之内由大于预设距离唤醒阈值的取值变为小于预设距离近零阈值的取值,所述唤醒距离变化条件是指所述距离值在预定时长之内由小于所述预设距离近零阈值的取值变为大于所述预设距离唤醒阈值的取值。 [0154] change detecting the distance value in the time domain meets varying conditions sleep or wake up from a distance varying conditions, the change from the sleep condition is that the distance value by the arousal threshold is within a predetermined distance greater than a preset length of time the value becomes less than a preset value near zero distance threshold, change the wake-up condition is that the distance value preset distance from the near-zero threshold value by less than the length of the time within a predetermined value becomes greater than said predetermined distance wake-up threshold value.

[0155] 可选地,所述检测所述光强值在时域上的变化是否符合所述光强变化条件,包括: [0155] Alternatively, the detected value of the light intensity variations in the time domain of the light intensity change meets the condition, comprising:

[0156] 检测所述光强值在时域上的变化是否符合休眠光强变化条件或唤醒光强变化条件,所述休眠光强变化条件是指所述光强值在预定时长之内由大于预设光强唤醒阈值的取值变为小于预设光强近零阈值的取值,所述唤醒光强变化条件是指所述光强值在预定时长之内由小于所述预设光强近零阈值的取值变为大于所述预设光强唤醒阈值的取值。 [0156] detecting changes in the light intensity values ​​in the time domain meets varying conditions of light intensity sleep or wake varying conditions of light intensity, light intensity change the sleep condition is that the value of the light intensity of a predetermined length greater than at wake preset light intensity value becomes less than a preset threshold near zero light intensity threshold values, the wake-up condition is that a change in light intensity of said light intensity value is within the predetermined duration of less than the preset light intensity near-zero threshold value becomes greater than the preset value of light intensity of the wake-up threshold.

[0157] 可选地,所述检测所述光强值在时域上的变化是否符合休眠光强变化条件或唤醒光强变化条件,包括: [0157] Alternatively, the detected change in the light intensity values ​​in the time domain meets the sleep conditions or light intensity change of light intensity change wake condition, comprising:

[0158] 将所述光强值在时域上的变化与预先记录的休眠光强变化曲线或唤醒光强变化曲线进行相似度拟合; [0158] The light intensity values ​​to fit the similarity time-domain variations in the light intensity curves of the sleep or wake up the light intensity curves pre-recorded;

[0159] 如果与所述休眠光强变化曲线拟合出的相似度高于第一阈值,则确定所述光强值在时域上的变化是否符合所述休眠光强变化条件; [0159] If the sleep light intensity curve fitting of similarity is higher than a first threshold value, determining the change in light intensity values ​​in the time domain meets the sleep condition change of light intensity;

[0160] 如果与所述唤醒光强变化曲线拟合出的相似度高于第二阈值,则确定所述光强值在时域上的变化是否符合所述唤醒光强变化条件。 [0160] If the light intensity variation curve fitting the wake of similarity is higher than a second threshold value, the light intensity values ​​to determine a change in the time domain meets the wake conditions of light intensity change.

[0161 ] 可选地,所述方法还包括: [0161] Optionally, the method further comprising:

[0162] 记录智能外壳在所述电子设备的屏幕前方由打开状态变为关闭状态过程中的第一光强变化曲线;根据所述第一光强变化曲线生成所述休眠光强变化曲线; [0162] recorded in front of the screen of the smart shell of the electronic device from the open state to the first light intensity curve during the closed state; generating the sleep light intensity variation curve based on the first light intensity variation curve;

[0163]和/或; [0163] and / or;

[0164] 记录智能外壳在所述电子设备的屏幕前方由关闭状态变为打开状态过程中的第二光强变化曲线;根据所述第二光强变化曲线生成所述唤醒光强变化曲线。 [0164] recorded in front of the screen of the smart shell of the electronic device from the closed state to the second light intensity curve during the open state; light intensity of the wake-up curve according to the second variation curve to generate a strong light.

[0165] 本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本发明的其它实施方案。 [0165] Those skilled in the art upon consideration of the specification and practice of the invention disclosed herein, will readily appreciate other embodiments of the present invention. 本申请旨在涵盖本发明的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本发明的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。 This application is intended to cover any variations, uses, or adaptations of the present invention encompasses these variations, uses, or adaptations of the invention following the general principles of the common general knowledge and comprises in the art of the present disclosure is not disclosed in the conventional techniques or . 说明书和实施例仅被视为示例性的,本发明的真正范围和精神由下面的权利要求指出。 The specification and examples be considered as exemplary only, with a true scope and spirit of the invention indicated by the following claims claim.

[0166] 应当理解的是,本发明并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。 [0166] It should be appreciated that the present invention is not limited to the above has been described and illustrated in the drawings precise structure, and may be carried out without departing from the scope of the various modifications and changes. 本发明的范围仅由所附的权利要求来限制。 Scope of the invention be limited only by the appended claims.

Claims (8)

1.一种自动切换方法,其特征在于,所述方法包括: 获取电子设备的屏幕前方在不同时刻的距离值和光强值; 检测所述距离值在时域上的变化是否符合预设的距离变化条件且所述光强值在时域上的变化是否符合预设的光强变化条件; 如果所述距离值在时域上的变化符合所述距离变化条件且所述光强值在时域上的变化符合所述光强变化条件,则控制所述电子设备进行自动休眠或者自动唤醒; 其中,检测所述光强值在时域上的变化是否符合预设的光强变化条件包括: 将所述光强值在时域上的变化与预先记录的休眠光强变化曲线或唤醒光强变化曲线进行相似度拟合; 如果与所述休眠光强变化曲线拟合出的相似度高于第一阈值,则确定所述光强值在时域上的变化是否符合休眠光强变化条件;所述休眠光强变化条件是指所述光强值在预定时长之内由大于预设 An automatic switching method, characterized in that, said method comprising: obtaining a screen in front of the electronic device and the light intensity value of the distance values ​​at different times; detecting a change in the distance value in the time domain meets a preset condition change in the distance and the light intensity value variation in the time domain meets conditions preset light intensity change; a change of the light intensity if the distance value in the time domain, and conforms to the distance value at the time of changing conditions conforms to the variation in the field intensity varying conditions, the electronic control device for automatic or automatic wake-sleep; wherein detecting a change in the light intensity values ​​in the time domain meets conditions preset light intensity change comprises: the change in the light intensity values ​​in the time domain with a prerecorded sleep light intensity curve fitting or similarity wake intensity curve; change in light intensity if the sleep similarity is higher than the fitted curve a first threshold value, determining the change in light intensity values ​​in the time domain meets varying conditions of light intensity sleep; the sleep condition is that a change in light intensity of said light intensity value is greater than a preset within a predetermined duration of 光强唤醒阈值的取值变为小于预设光强近零阈值的取值; 如果与所述唤醒光强变化曲线拟合出的相似度高于第二阈值,则确定所述光强值在时域上的变化是否符合唤醒光强变化条件;所述唤醒光强变化条件是指所述光强值在预定时长之内由小于所述预设光强近零阈值的取值变为大于所述预设光强唤醒阈值的取值。 Wake-up light intensity value becomes less than a preset threshold intensity near-zero threshold value; if the light intensity variation curve fitting the wake of similarity is higher than a second threshold value, it is determined that the light intensity values ​​in changes in time domain variations in light intensity whether the wake-up condition; change in light intensity of the wake-up condition is that the light intensity value becomes less than the preset light intensity of near-zero threshold value in the predetermined duration is greater than the said preset light intensity of the wake-up threshold value.
2.根据权利要求1所述的方法,其特征在于,所述检测所述距离值在时域上的变化是否符合预设的距离变化条件且所述光强值在时域上的变化是否符合预设的光强变化条件,包括: 检测所述距离值在时域上的变化是否符合所述距离变化条件;如果所述距离值在时域上的变化符合所述距离变化条件,则检测所述光强值在时域上的变化是否符合所述光强变化条件; 或, 检测所述光强值在时域上的变化是否符合所述光强变化条件;如果所述光强值在时域上的变化符合所述光强变化条件,则检测所述距离值在时域上的变化是否符合所述距离变化条件; 或, 检测所述距离值在时域上的变化是否符合所述距离变化条件且并行检测所述光强值在时域上的变化是否符合所述光强变化条件。 2. The method according to claim 1, wherein said detecting a change in the distance value in the time domain meets predetermined distance changing conditions and changes in the light intensity values ​​in the time domain meets preset light intensity change conditions, comprising: detecting a change in the distance value in the time domain the distance meets varying conditions; if the distance value variation in the time domain conforms to the distance change condition is detected by said light intensity values ​​in the time domain variation of light intensity change meets the condition; or detecting a change in the light intensity values ​​in the time domain of the light intensity change meets the condition; if the light intensity value changes in field conditions conforming to the change of light intensity, the distance value change is detected in the time domain the distance meets varying conditions; or detecting a change in the distance value in the time domain meets the distance detecting changes in the condition and in parallel changes in light intensity values ​​in the time domain meets the conditions of light intensity change.
3.根据权利要求2所述的方法,其特征在于,所述检测所述距离值在时域上的变化是否符合所述距离变化条件,包括: 检测所述距离值在时域上的变化是否符合休眠距离变化条件或唤醒距离变化条件,所述休眠距离变化条件是指所述距离值在预定时长之内由大于预设距离唤醒阈值的取值变为小于预设距离近零阈值的取值,所述唤醒距离变化条件是指所述距离值在预定时长之内由小于所述预设距离近零阈值的取值变为大于所述预设距离唤醒阈值的取值。 3. The method according to claim 2, wherein said detecting a change in the distance value in the time domain the distance meets varying conditions, comprising: detecting a change in the distance value in the time domain are meet changing conditions or wake up from sleep distance change condition changes from the sleep condition is that the distance value is greater than the arousal threshold by a predetermined distance within a predetermined length of time less than a preset value of distance value becomes near-zero threshold value , changes from the wake-up condition is that the distance value in a predetermined length of a predetermined distance less than the near-zero threshold value becomes greater than the preset distance arousal threshold values.
4.根据权利要求1所述的方法,其特征在于,所述方法还包括: 记录智能外壳在所述电子设备的屏幕前方由打开状态变为关闭状态过程中的第一光强变化曲线;根据所述第一光强变化曲线生成所述休眠光强变化曲线; 和/或; 记录智能外壳在所述电子设备的屏幕前方由关闭状态变为打开状态过程中的第二光强变化曲线;根据所述第二光强变化曲线生成所述唤醒光强变化曲线。 4. The method according to claim 1, wherein said method further comprises: recording the smart shell in front of the screen of the electronic device from the first open state to the closed state of the light intensity curve in the process; according the first light intensity curve generated light intensity curve of the sleep; and / or; intelligent recorded in front of the screen housing from the closed state of the electronic device to a second light intensity curve in the open state during; according the second light intensity variation curve to generate the wake-up light intensity curve.
5.一种自动切换装置,其特征在于,所述装置包括: 信息获取模块,用于获取电子设备的屏幕前方在不同时刻的距离值和光强值; 条件检测模块,用于检测所述距离值在时域上的变化是否符合预设的距离变化条件且所述光强值在时域上的变化是否符合预设的光强变化条件; 自动控制模块,用于在所述距离值在时域上的变化符合所述距离变化条件且所述光强值在时域上的变化符合所述光强变化条件时,则控制所述电子设备进行自动休眠或者自动唤醒; 其中,检测所述光强值在时域上的变化是否符合预设的光强变化条件包括: 曲线拟合子单元,用于将所述光强值在时域上的变化与预先记录的休眠光强变化曲线或唤醒光强变化曲线进行相似度拟合; 第一确定子单元,用于在与所述休眠光强变化曲线拟合出的相似度高于第一阈值时,确定所述光强值在时域 An automatic switching apparatus, wherein the apparatus comprises: an information obtaining module, configured to acquire the screen of the electronic device from the front light intensity values ​​and the values ​​at different times; condition detecting means for detecting the distance value variation in the time domain meets predetermined distance changing conditions and changes in the light intensity values ​​in the time domain meets the preset light intensity changing conditions; automated control module, configured to, when the distance value changes in field conditions conforming to the change in the distance and the light intensity value variation in the time domain when the light intensity meets varying conditions, the electronic control device for automatic or automatic wake-sleep; wherein said light detecting preset conditions change light intensity change in the time domain intensity value meets comprising: curve fitting sub-unit, configured to change the light intensity values ​​in the time domain with a prerecorded sleep or wake up the light intensity curve similarity intensity curve fitting; first determining subunit, for fitting in with the sleep light intensity curve similarity is higher than a first threshold value, determining the light intensity values ​​in the time domain 上的变化是否符合休眠光强变化条件,所述休眠光强变化条件是指所述光强值在预定时长之内由大于预设光强唤醒阈值的取值变为小于预设光强近零阈值的取值; 第二确定子单元,用于在与所述唤醒光强变化曲线拟合出的相似度高于第二阈值时,确定所述光强值在时域上的变化是否符合唤醒光强变化条件,所述唤醒光强变化条件是指所述光强值在预定时长之内由小于所述预设光强近零阈值的取值变为大于所述预设光强唤醒阈值的取值。 Whether the change in light intensity change the sleep condition, the sleep condition is that a light intensity change of the light intensity within the light intensity value of the long wake-up value is larger than a predetermined threshold value when a predetermined light intensity becomes less than a predetermined near-zero threshold value; and a second determining sub-unit, configured to, when the light intensity curve fitting similarity is higher than a second threshold value of the wakeup, the light intensity values ​​to determine a change in the time domain meets wakeup light intensity changing conditions, the wake-up condition is that the light intensity change of the light intensity values ​​in a predetermined length of time within the predetermined light intensity is less than the near-zero threshold value becomes greater than the preset threshold intensity wakeup value.
6.根据权利要求5所述的装置,其特征在于, 所述条件检测模块,用于检测所述距离值在时域上的变化是否符合所述距离变化条件;在所述距离值在时域上的变化符合所述距离变化条件时,检测所述光强值在时域上的变化是否符合所述光强变化条件; 或, 所述条件检测模块,用于检测所述光强值在时域上的变化是否符合所述光强变化条件;在所述光强值在时域上的变化符合所述光强变化条件时,检测所述距离值在时域上的变化是否符合所述距离变化条件; 或, 所述条件检测模块,用于检测所述距离值在时域上的变化是否符合所述距离变化条件且并行检测所述光强值在时域上的变化是否符合所述光强变化条件。 6. The apparatus according to claim 5, wherein said condition detecting means for detecting the distance value variation in the time domain from the change meets the condition; when the domain distance value when the change in the distance change meets the condition, detecting a change in the light intensity values ​​in the time domain of the light intensity change meets the condition; or, said condition detecting means for detecting the light intensity value at the time changes in field meets the condition of light intensity change; changes in the light intensity values ​​in the time domain when the light intensity changes meet condition change detecting the distance value in the time domain meets the distance changing conditions; or, said condition detecting module for detecting a change in the distance value in the time domain meets the change condition and in parallel from said detected light intensity value change in the time domain of the light meets strong changing conditions.
7.根据权利要求6所述的装置,其特征在于,所述条件检测模块,包括: 距离检测单元; 所述距离检测单元,用于检测所述距离值在时域上的变化是否符合休眠距离变化条件或唤醒距离变化条件,所述休眠距离变化条件是指所述距离值在预定时长之内由大于预设距离唤醒阈值的取值变为小于预设距离近零阈值的取值,所述唤醒距离变化条件是指所述距离值在预定时长之内由小于所述预设距离近零阈值的取值变为大于所述预设距离唤醒阈值的取值。 7. The device according to claim 6, wherein said condition detection module, comprising: a distance detection unit; said distance detecting means for detecting the distance value variation in the time domain from the sleep meets change wake-up condition or the distance change condition changes from the sleep condition is that the distance value is greater than the arousal threshold by a predetermined distance within a predetermined length of time less than a preset value of distance value becomes near-zero threshold, said change wake-up condition is that from the distance value at a predetermined length less than the preset distance of the near-zero threshold value becomes greater than the preset distance arousal threshold values.
8.根据权利要求5所述的装置,其特征在于,所述装置还包括: 第一记录单元,用于记录智能外壳在所述电子设备的屏幕前方由打开状态变为关闭状态过程中的第一光强变化曲线;第一生成单元,用于根据所述第一光强变化曲线生成所述休眠光强变化曲线; 和/或; 第二记录单元,用于记录智能外壳在所述电子设备的屏幕前方由关闭状态变为打开状态过程中的第二光强变化曲线;第二生成单元,用于根据所述第二光强变化曲线生成所述唤醒光强变化曲线。 8. The device as claimed in claim 5, characterized in that said apparatus further comprises: a first recording unit for recording the smart shell in front of the screen of the electronic device from the first open state to the closed state during a light intensity curve; a first generating unit for generating a curve based on the change in intensity of the first light intensity curve sleep; and / or; a second recording means for recording said intelligent electronic device housing screen in front of the closed state to the open state of the second light intensity curve process; a second generating unit configured to wake up the light intensity curve in accordance with curve generating the second light intensity variations.
CN201410078725.2A 2014-03-05 2014-03-05 Method and apparatus for automatic switching CN103885588B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410078725.2A CN103885588B (en) 2014-03-05 2014-03-05 Method and apparatus for automatic switching

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410078725.2A CN103885588B (en) 2014-03-05 2014-03-05 Method and apparatus for automatic switching

Publications (2)

Publication Number Publication Date
CN103885588A CN103885588A (en) 2014-06-25
CN103885588B true CN103885588B (en) 2016-03-30

Family

ID=50954522

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410078725.2A CN103885588B (en) 2014-03-05 2014-03-05 Method and apparatus for automatic switching

Country Status (1)

Country Link
CN (1) CN103885588B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105335303B (en) * 2014-07-30 2019-02-05 联想(北京)有限公司 A kind of information processing method and the first electronic equipment
CN104503691B (en) * 2014-11-27 2018-11-30 小米科技有限责任公司 Apparatus control method, device and intelligent terminal
CN105373004B (en) * 2015-12-01 2018-11-30 小米科技有限责任公司 Smart machine control method and device
CN105511731A (en) * 2015-12-17 2016-04-20 广东欧珀移动通信有限公司 Screen control method and device
CN105607739B (en) * 2015-12-25 2019-04-30 惠州Tcl移动通信有限公司 A kind of mobile terminal intelligence boot system and its method
CN105573502B (en) * 2015-12-25 2019-01-29 惠州Tcl移动通信有限公司 A kind of closedown method and its system of mobile terminal
CN106959803A (en) * 2016-01-11 2017-07-18 中兴通讯股份有限公司 Method and device for waking up screen
CN106066972A (en) * 2016-05-27 2016-11-02 深圳天珑无线科技有限公司 Terminal controlling method and apparatus
CN106095062A (en) * 2016-06-13 2016-11-09 合肥联宝信息技术有限公司 Electronic equipment and method for switching working states thereof
CN106383444B (en) * 2016-09-29 2019-08-20 深圳市汉莫智能科技股份有限公司 The suspend mode and awakening method and its system of a kind of electronic equipment
CN106569339A (en) * 2016-11-08 2017-04-19 歌尔科技有限公司 VR headset and VR headset control method
CN107764406A (en) * 2017-10-26 2018-03-06 珠海市魅族科技有限公司 The management method and electronic equipment of a kind of infrared detection
CN110012522A (en) * 2018-01-05 2019-07-12 中国移动通信有限公司研究院 A kind of control method and communication equipment of communication equipment
CN108322608A (en) * 2018-01-30 2018-07-24 维沃移动通信有限公司 A kind of screen light on and off control method, mobile terminal

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04199482A (en) * 1990-11-29 1992-07-20 Toshiba Corp Postal letter sorter
CN102006356A (en) * 2010-09-27 2011-04-06 浙江大学 Method for detecting state of cell phone pocket by using Android operating system
CN102778950A (en) * 2012-06-14 2012-11-14 惠州Tcl移动通信有限公司 Screen unlocking method, screen unlocking system and mobile terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04199482A (en) * 1990-11-29 1992-07-20 Toshiba Corp Postal letter sorter
CN102006356A (en) * 2010-09-27 2011-04-06 浙江大学 Method for detecting state of cell phone pocket by using Android operating system
CN102778950A (en) * 2012-06-14 2012-11-14 惠州Tcl移动通信有限公司 Screen unlocking method, screen unlocking system and mobile terminal

Also Published As

Publication number Publication date
CN103885588A (en) 2014-06-25

Similar Documents

Publication Publication Date Title
EP2930705A1 (en) Method and apparatus for controlling smart terminal
CN104571921A (en) Unlocking method, device and terminal
WO2016023340A1 (en) Camera switching method and device
CN104332012A (en) Anti-theft method and device of terminal device
CN104361303A (en) Terminal exception processing method and device and electronic equipment
CN104636065A (en) Method and device for awakening terminal
CN104951159A (en) Touch key and fingerprint identification method
CN104158946B (en) A method and apparatus for controlling a terminal
WO2017071067A1 (en) Volume adjustment method and apparatus, and terminal
CN104991789B (en) Application program open method and device
CN105246045A (en) Method and device for determining user position change
KR101846752B1 (en) Method and device for turning on air conditioner
CN104700816B (en) Method and apparatus for screen brightness
CN104503691A (en) Equipment control method and device
JP2017510915A (en) Method and apparatus for switching display modes
CN103841264A (en) Method and device for protecting terminal equipment and terminal equipment
CN105554567A (en) Television control method and device
CN104580730B (en) Method and device alarm reminder
CN105204742B (en) Control method, device and the terminal of electronic equipment
CN103744517A (en) Startup and shutdown control method and device
CN104219388A (en) Voice control method and device
CN103955365A (en) Method and device for controlling terminal when terminal falls off
CN105468152A (en) Terminal operation control method and device based on wearable equipment, and equipment
CN104836897A (en) Method and device for controlling terminal communication through wearable device
CN104750597A (en) User guide method and device during low power

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
C14 Grant of patent or utility model