Movatterモバイル変換


[0]ホーム

URL:


CN111432068B - Display state control method and device, electronic equipment and storage medium - Google Patents

Display state control method and device, electronic equipment and storage medium
Download PDF

Info

Publication number
CN111432068B
CN111432068BCN202010161777.1ACN202010161777ACN111432068BCN 111432068 BCN111432068 BCN 111432068BCN 202010161777 ACN202010161777 ACN 202010161777ACN 111432068 BCN111432068 BCN 111432068B
Authority
CN
China
Prior art keywords
magnetic induction
preset
threshold
data
display state
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.)
Active
Application number
CN202010161777.1A
Other languages
Chinese (zh)
Other versions
CN111432068A (en
Inventor
彭聪
高文俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 LtdfiledCriticalBeijing Xiaomi Mobile Software Co Ltd
Priority to CN202010161777.1ApriorityCriticalpatent/CN111432068B/en
Publication of CN111432068ApublicationCriticalpatent/CN111432068A/en
Application grantedgrantedCritical
Publication of CN111432068BpublicationCriticalpatent/CN111432068B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

Translated fromChinese

本公开是关于一种显示状态控制方法和装置、电子设备、存储介质。一种显示状态控制方法,应用于设置有显示屏的电子设备,包括:获取霍尔传感器所采集的磁感数据;响应于所述磁感数据超过预设的磁感应阈值,获取预设传感器所采集的传感数据;基于所述传感数据控制所述电子设备中显示屏的显示状态。本实施例中,通过预设传感器的传感数据来辅助判断霍尔传感器控制显示屏的显示状态,使显示屏的关闭状态和亮屏状态能够与使用场景相匹配,可以提高控制的准确度,有利于提升使用体验。

Figure 202010161777

The present disclosure relates to a display state control method and device, an electronic device, and a storage medium. A display state control method, applied to an electronic device provided with a display screen, includes: acquiring magnetic induction data collected by a Hall sensor; in response to the magnetic induction data exceeding a preset magnetic induction threshold, acquiring the magnetic induction data collected by a preset sensor Sensing data; controlling the display state of the display screen in the electronic device based on the sensing data. In this embodiment, the sensor data of the preset sensor is used to assist in judging the display state of the display screen controlled by the Hall sensor, so that the closed state and the bright screen state of the display screen can be matched with the usage scene, which can improve the control accuracy. Conducive to improve the user experience.

Figure 202010161777

Description

Translated fromChinese
显示状态控制方法和装置、电子设备、存储介质Display state control method and device, electronic device, storage medium

技术领域technical field

本公开涉及检测技术领域,尤其涉及一种显示状态控制方法和装置、电子设备、存储介质。The present disclosure relates to the field of detection technology, and in particular, to a display state control method and apparatus, electronic equipment, and storage medium.

背景技术Background technique

目前,部分用户会在手机外部安装一个皮套,以防止手机被摔坏或者划伤。皮套包括一个可折叠的上盖,该上盖中设置一块磁铁,通过吸附安装在皮套上指定位置的金属,达到闭合上盖以及覆盖手机显示屏的效果。当上盖被闭合时,设置在手机中的霍尔传感器会感应到磁铁的磁场即检测到磁通量增多,此时手机确定皮套的上盖闭合,可以关闭显示屏以节省用电量。At present, some users will install a leather case on the outside of the phone to prevent the phone from being broken or scratched. The leather case includes a foldable upper cover, and a magnet is arranged in the upper cover, and the effect of closing the upper cover and covering the display screen of the mobile phone is achieved by attracting the metal installed on the designated position on the leather case. When the top cover is closed, the Hall sensor installed in the mobile phone will sense the magnetic field of the magnet and detect the increase in magnetic flux. At this time, the mobile phone determines that the top cover of the leather case is closed, and the display screen can be turned off to save power consumption.

然而,实际应用中,手机可能处于强磁场环境,导致霍尔传感器检测到磁通量增多而误关闭显示屏,影响用户使用;或者,上盖中磁铁消磁,导致霍尔传感器检测不到足够多的磁通量而保持亮屏,进而浪费电能。However, in practical applications, the mobile phone may be in a strong magnetic field environment, which may cause the Hall sensor to detect an increase in magnetic flux and turn off the display by mistake, which affects the user's use; or, the magnet in the upper cover is demagnetized, so that the Hall sensor cannot detect enough magnetic flux. And keep the screen bright, thus wasting power.

发明内容SUMMARY OF THE INVENTION

本公开提供一种显示状态控制方法和装置、电子设备、存储介质,以解决相关技术的不足。The present disclosure provides a display state control method and device, an electronic device, and a storage medium to solve the deficiencies of the related art.

根据本公开实施例的第一方面,提供一种显示状态控制方法,应用于设置有显示屏的电子设备,包括:According to a first aspect of the embodiments of the present disclosure, there is provided a display state control method, which is applied to an electronic device provided with a display screen, including:

获取霍尔传感器所采集的磁感数据;Obtain the magnetic sensing data collected by the Hall sensor;

响应于所述磁感数据超过预设的磁感应阈值,获取预设传感器所采集的传感数据;Acquiring sensing data collected by a preset sensor in response to the magnetic sensing data exceeding a preset magnetic sensing threshold;

基于所述传感数据控制所述电子设备中显示屏的显示状态。The display state of the display screen in the electronic device is controlled based on the sensing data.

可选地,基于所述传感数据控制所述电子设备中显示屏的显示状态,包括:Optionally, controlling the display state of the display screen in the electronic device based on the sensing data includes:

确定所述传感数据是否满足第一预设条件,得到确定结果;determining whether the sensing data satisfies a first preset condition, and obtaining a determination result;

当所述确定结果表征所述传感数据满足所述第一预设条件时,控制电子设备的显示屏切换到关闭状态;当所述确定结果表征所述传感数据不满足所述第一预设条件时,控制所述显示屏保持显示状态。When the determination result indicates that the sensing data meets the first preset condition, the display screen of the control electronic device is switched to an off state; when the determination result indicates that the sensing data does not meet the first preset condition When the conditions are set, the display screen is controlled to keep the display state.

可选地,所述预设传感器包括以下至少一种:距离传感器、光线传感器。Optionally, the preset sensor includes at least one of the following: a distance sensor and a light sensor.

可选地,所述第一预设条件包括以下至少一种:距离值小于或者等于预设距离值,当前光感值小于或等于预设光感值。Optionally, the first preset condition includes at least one of the following: the distance value is less than or equal to the preset distance value, and the current light sensitivity value is less than or equal to the preset light sensitivity value.

可选地,当确定结果表征所述传感数据不满足所述第一预设条件之后,所述方法还包括:Optionally, after the determination result indicates that the sensing data does not meet the first preset condition, the method further includes:

生成提醒信息,所述提醒信息用于提醒所述电子设备处于强磁场环境中。Generating reminder information, where the reminder information is used to remind the electronic device to be in a strong magnetic field environment.

可选地,所述方法还包括调整所述霍尔传感器的磁感应阈值的步骤,具体包括:Optionally, the method further includes the step of adjusting the magnetic induction threshold of the Hall sensor, specifically including:

获取所述霍尔传感器所采集的当前磁感数据;obtaining the current magnetic induction data collected by the Hall sensor;

当所述当前磁感数据满足第二预设条件时,将所述霍尔传感器的磁感应阈值调整为第一磁感应阈值。When the current magnetic induction data satisfies the second preset condition, the magnetic induction threshold of the Hall sensor is adjusted to the first magnetic induction threshold.

可选地,所述第二预设条件包括以下至少一种:当前磁感数据为霍尔传感器所采集的磁感数据的最大值且该当前磁感数据小于预设的磁感应阈值,当前磁感数据之前预设时间段内的磁感数据均小于预设的磁感应阈值。Optionally, the second preset condition includes at least one of the following: the current magnetic induction data is the maximum value of the magnetic induction data collected by the Hall sensor and the current magnetic induction data is less than a preset magnetic induction threshold, the current magnetic induction The magnetic induction data in the preset time period before the data are all smaller than the preset magnetic induction threshold.

可选地,将所述霍尔传感器的磁感应阈值调整为第一磁感应阈值,包括:Optionally, adjusting the magnetic induction threshold of the Hall sensor to the first magnetic induction threshold, including:

获取所述霍尔传感器的使用时长;Obtain the usage time of the Hall sensor;

基于预设的时长和磁感数据的对应关系表,确定所述使用时长对应的第一磁感数据,将所述第一磁感数据作为所述第一阈值;determining the first magnetic induction data corresponding to the use duration based on a preset correspondence table between the duration and the magnetic induction data, and using the first magnetic induction data as the first threshold;

将所述霍尔传感器的磁感应阈值调整为所述第一磁感应阈值。The magnetic induction threshold of the Hall sensor is adjusted to the first magnetic induction threshold.

可选地,将所述霍尔传感器的磁感应阈值调整为第一磁感应阈值,包括:Optionally, adjusting the magnetic induction threshold of the Hall sensor to the first magnetic induction threshold, including:

获取所述当前磁感数据之前预设时间段内的磁感数据的平均值,将所述平均值作为第一磁感应阈值;acquiring an average value of magnetic induction data within a preset time period before the current magnetic induction data, and using the average value as a first magnetic induction threshold;

将所述霍尔传感器的磁感应阈值调整为所述第一磁感应阈值。The magnetic induction threshold of the Hall sensor is adjusted to the first magnetic induction threshold.

根据本公开实施例的第二方面,提供一种显示状态控制装置,应用于设置有显示屏的电子设备,包括:According to a second aspect of the embodiments of the present disclosure, there is provided a display state control apparatus, which is applied to an electronic device provided with a display screen, including:

磁感数据获取模块,用于获取霍尔传感器所采集的磁感数据;The magnetic induction data acquisition module is used to obtain the magnetic induction data collected by the Hall sensor;

传感数据获取模块,用于响应于所述磁感数据超过预设的磁感应阈值,获取预设传感器所采集的传感数据;a sensing data acquisition module, configured to acquire sensing data collected by a preset sensor in response to the magnetic sensing data exceeding a preset magnetic sensing threshold;

显示状态控制模块,用于基于所述传感数据控制所述电子设备中显示屏的显示状态。The display state control module is used for controlling the display state of the display screen in the electronic device based on the sensing data.

可选地,所述显示状态控制模块包括:Optionally, the display state control module includes:

确定结果获取单元,用于确定所述传感数据是否满足第一预设条件,得到确定结果;a determination result obtaining unit, configured to determine whether the sensing data satisfies a first preset condition, and obtain a determination result;

显示状态控制单元,用于当所述确定结果表征所述传感数据满足所述第一预设条件时,控制电子设备的显示屏切换到关闭状态;当所述确定结果表征所述传感数据不满足所述第一预设条件时,控制所述显示屏保持显示状态。a display state control unit, configured to control the display screen of the electronic device to switch to an off state when the determination result represents that the sensing data meets the first preset condition; when the determination result represents the sensing data When the first preset condition is not satisfied, the display screen is controlled to maintain the display state.

可选地,所述预设传感器包括以下至少一种:距离传感器、光线传感器。Optionally, the preset sensor includes at least one of the following: a distance sensor and a light sensor.

可选地,所述第一预设条件包括以下至少一种:距离值小于或者等于预设距离值,当前光感值小于或等于预设光感值。Optionally, the first preset condition includes at least one of the following: the distance value is less than or equal to the preset distance value, and the current light sensitivity value is less than or equal to the preset light sensitivity value.

所述显示状态控制模块包括:The display state control module includes:

提醒信息生成单元,用于生成提醒信息,所述提醒信息用于提醒所述电子设备处于强磁场环境中。A reminder information generating unit, configured to generate reminder information, where the reminder information is used to remind the electronic device to be in a strong magnetic field environment.

可选地,所述装置还包括磁感阈值调整模块;所述磁感阈值调整模块包括:Optionally, the device further includes a magnetic induction threshold adjustment module; the magnetic induction threshold adjustment module includes:

当前值获取单元,用于获取所述霍尔传感器所采集的当前磁感数据;The current value acquisition unit is used to acquire the current magnetic induction data collected by the Hall sensor;

阈值调整单元,用于当所述当前磁感数据满足第二预设条件时,将所述霍尔传感器的磁感应阈值调整为第一磁感应阈值。A threshold adjustment unit, configured to adjust the magnetic induction threshold of the Hall sensor to a first magnetic induction threshold when the current magnetic induction data satisfies a second preset condition.

可选地,所述第二预设条件包括以下至少一种:当前磁感数据为霍尔传感器所采集的磁感数据的最大值且该当前磁感数据小于预设的磁感应阈值,当前磁感数据之前预设时间段内的磁感数据均小于预设的磁感应阈值。Optionally, the second preset condition includes at least one of the following: the current magnetic induction data is the maximum value of the magnetic induction data collected by the Hall sensor and the current magnetic induction data is less than a preset magnetic induction threshold, the current magnetic induction The magnetic induction data in the preset time period before the data are all smaller than the preset magnetic induction threshold.

可选地,所述阈值调整单元包括:Optionally, the threshold adjustment unit includes:

使用时长获取子单元,用于获取所述霍尔传感器的使用时长;a use duration acquisition subunit for acquiring the use duration of the Hall sensor;

第一阈值确定子单元,用于基于预设的时长和磁感数据的对应关系表,确定所述使用时长对应的第一磁感数据,将所述第一磁感数据作为所述第一阈值;a first threshold determination subunit, configured to determine the first magnetic induction data corresponding to the use duration based on a preset correspondence table of duration and magnetic induction data, and use the first magnetic induction data as the first threshold ;

阈值调整子单元,用于将所述霍尔传感器的磁感应阈值调整为所述第一磁感应阈值。The threshold adjustment subunit is used to adjust the magnetic induction threshold of the Hall sensor to the first magnetic induction threshold.

可选地,所述阈值调整单元包括:Optionally, the threshold adjustment unit includes:

平均值获取子单元,用于获取所述当前磁感数据之前预设时间段内的磁感数据的平均值,将所述平均值作为所述第一阈值;an average value acquisition subunit, configured to acquire the average value of the magnetic induction data in a preset time period before the current magnetic induction data, and use the average value as the first threshold;

阈值调整子单元,用于将所述霍尔传感器的磁感应阈值调整为所述第一磁感应阈值。The threshold adjustment subunit is used to adjust the magnetic induction threshold of the Hall sensor to the first magnetic induction threshold.

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

霍尔传感器和预设传感器;所述预设传感器包括以下至少一种:距离传感器、光线传感器;A hall sensor and a preset sensor; the preset sensor includes at least one of the following: a distance sensor, a light sensor;

处理器;processor;

用于存储所述处理器可执行的计算机程序的存储器;a memory for storing a computer program executable by the processor;

所述处理器被配置为执行所述存储器中的计算机程序以实现上述任一项所述方法的步骤。The processor is configured to execute a computer program in the memory to implement the steps of any of the methods described above.

根据本公开实施例的第四方面,提供一种可读存储介质,其上存储有可执行的计算机程序,该计算机程序被执行时实现上述所述方法的步骤。According to a fourth aspect of the embodiments of the present disclosure, there is provided a readable storage medium on which an executable computer program is stored, and when the computer program is executed, the steps of the above-described method are implemented.

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

由上述实施例可知,本公开实施例中通过获取霍尔传感器所采集的磁感数据,并响应于所述磁感数据超过预设的磁感应阈值,获取预设传感器所采集的传感数据;基于所述传感数据控制所述电子设备中显示屏的显示状态。本实施例中,通过预设传感器的传感数据来辅助判断霍尔传感器控制显示屏的显示状态,使显示屏的关闭状态和亮屏状态能够与使用场景相匹配,可以提高控制的准确度,有利于提升使用体验。It can be seen from the above embodiments that in the embodiments of the present disclosure, the magnetic sensing data collected by the Hall sensor is obtained, and in response to the magnetic sensing data exceeding the preset magnetic sensing threshold, the sensing data collected by the preset sensor is obtained; based on The sensing data controls the display state of the display screen in the electronic device. In this embodiment, the sensor data of the preset sensor is used to assist in judging the display state of the display screen controlled by the Hall sensor, so that the closed state and the bright screen state of the display screen can be matched with the usage scene, which can improve the control accuracy. Conducive to improve the user experience.

应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that 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 disclosure and together with the description serve to explain the principles of the disclosure.

图1是根据一示例性实施例示出的一种显示状态控制方法的流程图。FIG. 1 is a flow chart of a display state control method according to an exemplary embodiment.

图2是根据一示例性实施例示出的一种控制显示状态的流程图。Fig. 2 is a flowchart showing a control display state according to an exemplary embodiment.

图3是根据一示例性实施例示出的一种调整磁感应阈值的流程图。Fig. 3 is a flow chart of adjusting a magnetic induction threshold according to an exemplary embodiment.

图4是根据一示例性实施例示出的另一种调整磁感应阈值的流程图。Fig. 4 is another flow chart of adjusting the magnetic induction threshold according to an exemplary embodiment.

图5是根据一示例性实施例示出的又一种调整磁感应阈值的流程图。Fig. 5 is another flowchart of adjusting the magnetic induction threshold according to an exemplary embodiment.

图6~图10是根据一示例性实施例示出的一种显示状态控制装置的框图。6 to 10 are block diagrams of a display state control apparatus according to an exemplary embodiment.

图11是根据一示例性实施例示出的一种电子设备的框图。Fig. 11 is a block diagram of an electronic device according to an exemplary embodiment.

具体实施方式Detailed ways

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

考虑到用户会在手机外部安装皮套,手机中的霍尔传感器会检测磁感数据,之后根据磁感数据判断是否关闭显示屏。然而,当手机处于强磁场环境时,霍尔传感器检测到磁通量增多可能会误关闭显示屏,影响用户使用;或者,上盖中磁铁消磁,导致霍尔传感器检测不到足够多的磁通量而保持亮屏,进而浪费电能。Considering that the user will install a leather case on the outside of the mobile phone, the Hall sensor in the mobile phone will detect the magnetic induction data, and then judge whether to turn off the display screen according to the magnetic induction data. However, when the mobile phone is in a strong magnetic field environment, the Hall sensor detects an increase in magnetic flux, which may turn off the display screen by mistake, affecting the user's use; or, the magnet in the top cover is demagnetized, causing the Hall sensor to not detect enough magnetic flux and keep bright screen, thereby wasting power.

为解决上述技术问题,本公开实施例提供了一种显示状态控制方法,可以应用于设置有霍尔传感器的预设传感器的电子设备,其中预设传感器可以包括以下至少一种:距离传感器和光线传感器。当然,技术人员还可以根据具体场景,选择其他传感器,在能够检测到皮套接近或者闭合时,相应方案落入本公开的保护范围。In order to solve the above technical problems, an embodiment of the present disclosure provides a display state control method, which can be applied to an electronic device provided with a preset sensor of a Hall sensor, wherein the preset sensor can include at least one of the following: a distance sensor and a light sensor. Of course, technicians can also select other sensors according to specific scenarios, and when it is possible to detect that the holster is approaching or closing, the corresponding solution falls within the protection scope of the present disclosure.

图1是根据一示例性实施例示出的一种显示状态控制方法的流程图,参见图1,一种显示状态控制方法,包括步骤11~步骤13,其中:Fig. 1 is a flowchart showing a display state control method according to an exemplary embodiment. Referring to Fig. 1, a display state control method includessteps 11 to 13, wherein:

在步骤11中,获取霍尔传感器所采集的磁感数据。Instep 11, the magnetic sensing data collected by the Hall sensor is acquired.

本实施例中,电子设备内霍尔传感器会按照设定周期或者实时检测预设范围内的磁通量,并根据磁通量生成磁感数据。其中,磁感数据可以为磁感电压。可理解是的,霍尔传感器感测到的磁通量越大,则输出的磁感电压越大,即通过磁感电压可以反映霍尔传感器感测的磁通量的大小。霍尔传感器的具体结构和工作原理可以参考相关技术,在此不再详述。In this embodiment, the Hall sensor in the electronic device detects the magnetic flux within a preset range according to a set period or in real time, and generates magnetic induction data according to the magnetic flux. The magnetic induction data may be magnetic induction voltage. It can be understood that the larger the magnetic flux sensed by the Hall sensor, the larger the output magnetic induction voltage, that is, the magnitude of the magnetic flux sensed by the Hall sensor can be reflected by the magnetic induction voltage. For the specific structure and working principle of the Hall sensor, reference may be made to related technologies, which will not be described in detail here.

本实施例中,电子设备内处理器可以与霍尔传感器建立通信链接,通过该通信链接可以获取霍尔传感器输出的磁感数据。In this embodiment, the processor in the electronic device may establish a communication link with the Hall sensor, and the magnetic induction data output by the Hall sensor may be acquired through the communication link.

在步骤12中,响应于所述磁感数据超过预设的磁感应阈值,获取预设传感器所采集的传感数据。Instep 12, in response to the magnetic induction data exceeding a preset magnetic induction threshold, acquiring sensing data collected by a preset sensor.

本实施例中,电子设备内可以预先存储一个磁感应阈值。该磁感应阈值可以是在皮套的上盖闭合后,霍尔传感器能够感测到磁感数据的最小值,或者多次测量后磁感数据的平均值,或者能够感测到磁感数据的最大值与预设比例(如90%~98%之间的一个数值)的乘积。技术人员可以根据具体场景确定磁感应阈值的大小,相应方案落入本公开的保护范围。In this embodiment, a magnetic induction threshold may be pre-stored in the electronic device. The magnetic induction threshold can be the minimum value of the magnetic induction data that can be sensed by the Hall sensor after the upper cover of the leather case is closed, or the average value of the magnetic induction data after multiple measurements, or the maximum value of the magnetic induction data that can be sensed. The product of the value and a preset ratio (such as a value between 90% and 98%). A skilled person can determine the magnitude of the magnetic induction threshold according to a specific scenario, and the corresponding solution falls within the protection scope of the present disclosure.

本实施例中,处理器获取到磁感数据后,可以对比磁感数据和磁感应阈值,得到对比结果。当对比结果表示磁感数据小于磁感应阈值时,说明皮套的上盖没有闭合到位,此时处理器无需进行后续动作,同时返回步骤11;当对比结果表示磁感数据超过(大于或者等于)磁感应阈值时,处理器可以响应于磁感数据超过预设的磁感应阈值,获取预设传感器所采集的传感数据。In this embodiment, after acquiring the magnetic induction data, the processor can compare the magnetic induction data and the magnetic induction threshold to obtain a comparison result. When the comparison result indicates that the magnetic induction data is less than the magnetic induction threshold, it means that the upper cover of the holster is not closed in place, and the processor does not need to perform subsequent actions at this time, and returns to step 11 at the same time; when the comparison result indicates that the magnetic induction data exceeds (greater than or equal to) the magnetic induction When the threshold is reached, the processor may acquire sensing data collected by the preset sensor in response to the magnetic sensing data exceeding the preset magnetic sensing threshold.

在一实施例中,预设传感器可能处于关闭状态,处理器可以向预设传感器发送启动控制指令,开启预设传感器。预设传感器在启动后,会按照设定周期或者实时检测相应的参数,得到传感数据。此时,处理器可以主动获取上述传感数据,或者接收预设传感器发送的传感数据。当然,在获取到传感数据后,处理器还可以向预设传感器发送关闭控制指令,使预设传感器恢复关闭状态。In one embodiment, the preset sensor may be in an off state, and the processor may send an activation control instruction to the preset sensor to turn on the preset sensor. After the preset sensor is started, it will detect the corresponding parameters according to the set period or in real time, and obtain the sensing data. At this time, the processor may actively acquire the above sensing data, or receive sensing data sent by a preset sensor. Of course, after acquiring the sensing data, the processor may also send a shutdown control instruction to the preset sensor, so that the preset sensor returns to a closed state.

在一实施例中,当预设传感器是距离传感器时,传感数据可以是距离值,该距离值表示距离传感器到皮套的上盖的距离,如上盖闭合后距离值为0,上盖快闭合(上盖与显示屏之间夹角为5-10度)时距离值为1cm等。当预设传感器是光线传感器时,传感数据可以是光感值,该光感值表示光线传感器所处环境下当前的光感数据,如上盖闭合后,光感值为0。In one embodiment, when the preset sensor is a distance sensor, the sensing data may be a distance value, and the distance value represents the distance from the distance sensor to the upper cover of the leather case. When closed (the angle between the upper cover and the display screen is 5-10 degrees), the distance value is 1cm, etc. When the preset sensor is a light sensor, the sensing data may be a light sensitivity value, and the light sensitivity value represents the current light sensitivity data in the environment where the light sensor is located. For example, after the upper cover is closed, the light sensitivity value is 0.

在步骤13中,基于所述传感数据控制所述电子设备中显示屏的显示状态。Instep 13, the display state of the display screen in the electronic device is controlled based on the sensing data.

本实施例中,处理器可以基于传感数据控制电子设备中显示屏的显示状态。电子设备内可以预先存储第一预设条件,该第一预设条件可以包括以下至少一种:距离值小于或者等于预设距离值,当前光感值小于或等于预设光感值。实际应用中,该第一预设条件可以根据预设传感器的种类和数量进行调整,在此不作限定。In this embodiment, the processor may control the display state of the display screen in the electronic device based on the sensor data. A first preset condition may be pre-stored in the electronic device, and the first preset condition may include at least one of the following: the distance value is less than or equal to the preset distance value, and the current light sensitivity value is less than or equal to the preset light sensitivity value. In practical applications, the first preset condition may be adjusted according to the type and quantity of the preset sensors, which is not limited herein.

参见图2,在步骤21中,处理器可以获取第一预设条件,并确定传感数据是否满足第一预设条件,得到确定结果。以距离传感器为例,此时传感数据是距离值,若距离值小于或者等于预设距离值,处理器可以确定距离值满足第一预设条件,否则可以确定距离值不满足第一预设条件。以光线传感器为例,此时传感数据是当前光感值,若当前光感值小于或者等于预设光感值,处理器可以确定光感值满足第一预设条件,否则可以确定距离值不满足第一预设条件。以同时采用光线传感器和距离传感器为例,此时传感数据包括距离值和当前光感值,其中距离值与预设距离值对比且当前光感值与预设光感值对比。此时距离结果可以包括以下情况:第一,距离值小于或者等于预设距离值,并且当前光感值小于或者等于预设光感值,此时,传感数据满足第一预设条件。第二,距离值大于预设距离值,并且当前光感值大于预设光感值,此时,传感数据不满足第一预设条件。第三,距离值小于或者等于预设距离值,并且当前光感值大于预设光感值,此时,传感数据不满足第一预设条件。第四,距离值大于预设距离值,并且当前光感值小于或者等于预设光感值,此时,传感数据满足第一预设条件。对于第三种和第四种情况而言,考虑到光线传感器会受到外部环境光线(例如黑夜、灯光)的影响,其检测准确率会略低于距离传感器的检测准确率,因此,设置了第三种和第四种方案。实际应用中,还可以在距离值和当前光感值中的一个不满足第一预设条件时,即确定传感数据不满足第一预设条件。Referring to FIG. 2, instep 21, the processor may acquire a first preset condition, and determine whether the sensing data satisfies the first preset condition, and obtain a determination result. Taking the distance sensor as an example, the sensing data is the distance value at this time. If the distance value is less than or equal to the preset distance value, the processor can determine that the distance value satisfies the first preset condition, otherwise it can determine that the distance value does not meet the first preset condition. condition. Taking the light sensor as an example, the sensing data is the current light sensitivity value. If the current light sensitivity value is less than or equal to the preset light sensitivity value, the processor can determine that the light sensitivity value satisfies the first preset condition, otherwise it can determine the distance value. The first preset condition is not met. Taking both a light sensor and a distance sensor as an example, the sensing data includes a distance value and a current light sensitivity value, wherein the distance value is compared with the preset distance value and the current light sensitivity value is compared with the preset light sensitivity value. At this time, the distance result may include the following situations: first, the distance value is less than or equal to the preset distance value, and the current light sensitivity value is less than or equal to the preset light sensitivity value, at this time, the sensing data satisfies the first preset condition. Second, when the distance value is greater than the preset distance value, and the current light sensitivity value is greater than the preset light sensitivity value, in this case, the sensing data does not meet the first preset condition. Third, when the distance value is less than or equal to the preset distance value, and the current light sensitivity value is greater than the preset light sensitivity value, in this case, the sensing data does not meet the first preset condition. Fourth, the distance value is greater than the preset distance value, and the current light sensitivity value is less than or equal to the preset light sensitivity value. At this time, the sensing data satisfies the first preset condition. For the third and fourth cases, considering that the light sensor will be affected by external ambient light (such as night, lights), its detection accuracy will be slightly lower than that of the distance sensor. Therefore, set the third The third and fourth options. In practical applications, it may also be determined that the sensing data does not meet the first preset condition when one of the distance value and the current light sensitivity value does not satisfy the first preset condition.

在步骤22中,当确定结果表征所述传感数据满足所述第一预设条件时,控制电子设备的显示屏切换到关闭状态;当确定结果表征传感数据不满足第一预设条件时,控制所述显示屏保持显示状态。Instep 22, when the determination result indicates that the sensing data meets the first preset condition, the display screen of the control electronic device is switched to an off state; when the determination result indicates that the sensing data does not meet the first preset condition , control the display screen to keep the display state.

在一实施例中,考虑到霍尔传感器检测到磁感数据,而预设传感器采集的传感数据不满足第一预设条件,处理器可以确定电子设备处于强磁场环境中。因此,当确定结果表征传感数据不满足所述第一预设条件后,处理器可以生成提醒信息,提醒信息用于提醒电子设备处于强磁场环境中,例如,提醒信息可以是“当前处于强磁场环境中有可能会影响到电子设备使用,请注意”。本实施例中通过交互可以使用户清楚使用环境,提升使用体验。In one embodiment, considering that the Hall sensor detects magnetic sensing data and the sensing data collected by the preset sensor does not meet the first preset condition, the processor may determine that the electronic device is in a strong magnetic field environment. Therefore, when it is determined that the sensing data does not meet the first preset condition, the processor can generate reminder information, and the reminder information is used to remind the electronic device to be in a strong magnetic field environment. The magnetic field environment may affect the use of electronic equipment, please pay attention.” In this embodiment, the user can be made clear about the use environment through interaction, and the use experience can be improved.

在上述各实施例中,上述磁感应阈值可以是一个固定值,也可以是一个动态值。以动态值为例,处理器可以在执行本公开的方法之前,调整该磁感应阈值,其中电子设备内可以预先存储第二预设条件,该第二预设条件包括以下至少一种:当前磁感数据为霍尔传感器所采集的磁感数据的最大值且该当前磁感数据小于预设的磁感应阈值,当前磁感数据之前预设时间段内的磁感数据均小于预设的磁感应阈值。In the foregoing embodiments, the foregoing magnetic induction threshold may be a fixed value or a dynamic value. Taking the dynamic value as an example, the processor may adjust the magnetic induction threshold before executing the method of the present disclosure, wherein a second preset condition may be pre-stored in the electronic device, and the second preset condition includes at least one of the following: the current magnetic induction The data is the maximum value of the magnetic induction data collected by the Hall sensor and the current magnetic induction data is smaller than the preset magnetic induction threshold, and the magnetic induction data in the preset time period before the current magnetic induction data are all smaller than the preset magnetic induction threshold.

需要说明的是,关于“当前磁感数据为霍尔传感器所采集的磁感数据的最大值且该当前磁感数据小于预设的磁感应阈值”中最大值的确定,处理器在获取到当前磁感数据后,可以获取当前磁感数据之前某一段时间内的历史值,当某一段时间的历史值的磁感数据均小于或者等于该当前磁感数据,说明该当前磁感数据为最大值。这是因为,用户在使用电子设备的过程中,上述某一段时间内必然存在打开上盖和闭合上盖的过程,在上盖闭合时,霍尔传感器能够感测到最大的磁通量且能够输出最大的磁感数据。而最大值又小于磁感应阈值,则说明上盖中磁铁出现消磁。It should be noted that, regarding the determination of the maximum value in "the current magnetic induction data is the maximum value of the magnetic induction data collected by the Hall sensor and the current magnetic induction data is less than the preset magnetic induction threshold", the processor obtains the current magnetic induction data. After the sensing data is obtained, the historical value of a certain period of time before the current magnetic sensing data can be obtained. When the magnetic sensing data of the historical value of a certain period of time is less than or equal to the current magnetic sensing data, it means that the current magnetic sensing data is the maximum value. This is because, when the user is using the electronic device, there must be a process of opening the upper cover and closing the upper cover for a certain period of time. When the upper cover is closed, the Hall sensor can sense the maximum magnetic flux and can output the maximum magnetic induction data. And the maximum value is smaller than the magnetic induction threshold, which means that the magnet in the upper cover is demagnetized.

另需要说明的是,关于“当前磁感数据之前预设时间段内的磁感数据均小于预设的磁感应阈值”是指,霍尔传感器在采集到当前磁感数据之前的预设时间段内的各磁感数据均小于磁感应阈值,表明电子设备处理强磁场环境或者上盖中磁铁出现消磁。It should also be noted that "the magnetic induction data in the preset time period before the current magnetic induction data are all smaller than the preset magnetic induction threshold" means that the Hall sensor collects the current magnetic induction data in the preset time period before the current magnetic induction data is collected. The magnetic induction data of all are less than the magnetic induction threshold, indicating that the electronic device is dealing with a strong magnetic field environment or the magnet in the upper cover is demagnetized.

参见图3,在步骤31中,处理器可以获取霍尔传感器所采集的当前磁感数据。在步骤32中,处理器可以确定当前磁感数据是否满足该第二预设条件,例如,当前磁感数据(是磁感电压)等于4V,且是霍尔传感器所能采集到磁感数据的最大值,而磁感应阈值为5V,则确定当前磁感数据满足第二预设条件。当满足第二预设条件时,处理器可以将霍尔传感器的磁感应阈值调整为第一阈值。Referring to FIG. 3 , instep 31, the processor may acquire current magnetic induction data collected by the Hall sensor. Instep 32, the processor can determine whether the current magnetic induction data satisfies the second preset condition, for example, the current magnetic induction data (which is the magnetic induction voltage) is equal to 4V, and the magnetic induction data can be collected by the Hall sensor. maximum value, and the magnetic induction threshold value is 5V, it is determined that the current magnetic induction data satisfies the second preset condition. When the second preset condition is met, the processor may adjust the magnetic induction threshold of the Hall sensor to the first threshold.

本实施例中,步骤32可以包括:In this embodiment, step 32 may include:

在一示例中,电子设备可以预先存储一个预设的时长和磁感数据的对应关系表,该对应关系表表示磁铁随着使用时长的增加,上盖中磁铁的磁场是慢慢衰减的,相应地,霍尔传感器所输出的磁感数据也同步减小,相应的其磁感应阈值也应慢慢变小。从而,基于使用时长和磁感应阈值可以建立上述时长和磁感数据的对应关系表。参见图4,在步骤41中,处理器可以获取霍尔传感器的使用时长。在步骤42中,基于预设的时长和磁感数据的对应关系表,处理器可以确定使用时长对应的第一磁感数据。在步骤43中,处理器可以将霍尔传感器的磁感应阈值调整为上述第一磁感应阈值。In an example, the electronic device may pre-store a preset correspondence table between the duration and the magnetic induction data. On the ground, the magnetic induction data output by the Hall sensor also decreases synchronously, and the corresponding magnetic induction threshold should also gradually decrease. Therefore, based on the usage duration and the magnetic induction threshold, the above-mentioned correspondence table of the duration and the magnetic induction data can be established. Referring to FIG. 4, instep 41, the processor may obtain the usage time of the Hall sensor. Instep 42, the processor may determine the first magnetic induction data corresponding to the usage duration based on the preset correspondence table between the duration and the magnetic induction data. Instep 43, the processor may adjust the magnetic induction threshold of the Hall sensor to the above-mentioned first magnetic induction threshold.

在另一示例中,参见图5,在步骤51中,处理器在获取到当前磁感数据后,可以获取该当前磁感数据之前预设时间段内的磁感数据,且计算这些磁感数据的平均值,并将平均值作为第一磁感应阈值。在步骤52中,处理器可以将霍尔传感器的磁感应阈值调整为第一磁感应阈值。In another example, referring to FIG. 5 , instep 51, after acquiring the current magnetic induction data, the processor may acquire magnetic induction data within a preset time period before the current magnetic induction data, and calculate the magnetic induction data The average value of , and the average value is taken as the first magnetic induction threshold. In step 52, the processor may adjust the magnetic induction threshold of the Hall sensor to the first magnetic induction threshold.

本实施例中通过调整磁感应阈值,可以避免出现上盖中磁铁消磁而无法执行本公开的一种显示状态控制方法的问题,有利于保证控制状态的准确性。In this embodiment, by adjusting the magnetic induction threshold, the problem that the magnet in the upper cover is demagnetized and the display state control method of the present disclosure cannot be executed can be avoided, which is beneficial to ensure the accuracy of the control state.

至此,本公开实施例中通过获取霍尔传感器所采集的磁感数据,并响应于所述磁感数据超过预设的磁感应阈值,获取预设传感器所采集的传感数据;基于所述传感数据控制所述电子设备中显示屏的显示状态。本实施例中,通过预设传感器的传感数据来辅助判断霍尔传感器控制显示屏的显示状态,使显示屏的关闭状态和亮屏状态能够与使用场景相匹配,可以提高控制的准确度,有利于提升使用体验。So far, in the embodiment of the present disclosure, the magnetic sensing data collected by the Hall sensor is acquired, and in response to the magnetic sensing data exceeding the preset magnetic sensing threshold, the sensing data collected by the preset sensor is obtained; The data controls the display state of the display screen in the electronic device. In this embodiment, the sensor data of the preset sensor is used to assist in judging the display state of the display screen controlled by the Hall sensor, so that the closed state and the bright screen state of the display screen can be matched with the usage scene, which can improve the control accuracy. Conducive to improve the user experience.

图6是根据一示例性实施例示出的一种显示状态控制装置的框图,应用于设置有显示屏的电子设备,参见图6,一种显示状态控制装置,包括:FIG. 6 is a block diagram of a display state control apparatus according to an exemplary embodiment, which is applied to an electronic device provided with a display screen. Referring to FIG. 6, a display state control apparatus includes:

磁感数据获取模块61,用于获取霍尔传感器所采集的磁感数据;The magnetic inductiondata acquisition module 61 is used to acquire the magnetic induction data collected by the Hall sensor;

传感数据获取模块62,用于响应于所述磁感数据超过预设的磁感应阈值,获取预设传感器所采集的传感数据;A sensingdata acquisition module 62, configured to acquire sensing data collected by a preset sensor in response to the magnetic sensing data exceeding a preset magnetic sensing threshold;

显示状态控制模块63,用于基于所述传感数据控制所述电子设备中显示屏的显示状态。The displaystate control module 63 is configured to control the display state of the display screen in the electronic device based on the sensing data.

在一实施例中,参见图7,所述显示状态控制模块63包括:In one embodiment, referring to FIG. 7 , the displaystate control module 63 includes:

确定结果获取单元71,用于确定所述传感数据是否满足第一预设条件,得到确定结果;A determinationresult obtaining unit 71, configured to determine whether the sensing data satisfies a first preset condition, and obtain a determination result;

显示状态控制单元72,用于当所述确定结果表征所述传感数据满足所述第一预设条件时,控制电子设备的显示屏切换到关闭状态;当所述确定结果表征所述传感数据不满足所述第一预设条件时,控制所述显示屏保持显示状态。The displaystate control unit 72 is configured to control the display screen of the electronic device to switch to an off state when the determination result represents that the sensing data meets the first preset condition; when the determination result represents the sensing data When the data does not meet the first preset condition, the display screen is controlled to maintain the display state.

在一实施例中,所述预设传感器包括以下至少一种:距离传感器、光线传感器。In one embodiment, the preset sensor includes at least one of the following: a distance sensor and a light sensor.

在一实施例中,所述第一预设条件包括以下至少一种:距离值小于或者等于预设距离值,当前光感值小于或等于预设光感值。In one embodiment, the first preset condition includes at least one of the following: the distance value is less than or equal to the preset distance value, and the current light sensitivity value is less than or equal to the preset light sensitivity value.

在一实施例中,所述显示状态控制模块63包括:In one embodiment, the displaystate control module 63 includes:

提醒信息生成单元,用于生成提醒信息,所述提醒信息用于提醒所述电子设备处于强磁场环境中。A reminder information generating unit, configured to generate reminder information, where the reminder information is used to remind the electronic device to be in a strong magnetic field environment.

在一实施例中,参见图8,所述装置还包括磁感阈值调整模块;所述磁感阈值调整模块包括:In an embodiment, referring to FIG. 8 , the apparatus further includes a magnetic induction threshold adjustment module; the magnetic induction threshold adjustment module includes:

当前值获取单元81,用于获取所述霍尔传感器所采集的当前磁感数据;The currentvalue obtaining unit 81 is used to obtain the current magnetic induction data collected by the Hall sensor;

阈值调整单元82,用于当所述当前磁感数据满足第二预设条件时,将所述霍尔传感器的磁感应阈值调整为第一磁感应阈值。Thethreshold adjustment unit 82 is configured to adjust the magnetic induction threshold of the Hall sensor to the first magnetic induction threshold when the current magnetic induction data satisfies the second preset condition.

在一实施例中,所述第二预设条件包括以下至少一种:当前磁感数据为霍尔传感器所采集的磁感数据的最大值且该当前磁感数据小于预设的磁感应阈值,当前磁感数据之前预设时间段内的磁感数据均小于预设的磁感应阈值。In one embodiment, the second preset condition includes at least one of the following: the current magnetic induction data is the maximum value of the magnetic induction data collected by the Hall sensor and the current magnetic induction data is less than a preset magnetic induction threshold, the current magnetic induction data The magnetic induction data in the preset time period before the magnetic induction data are all smaller than the preset magnetic induction threshold.

在一实施例中,参见图9,所述阈值调整单元82包括:In one embodiment, referring to FIG. 9 , thethreshold adjustment unit 82 includes:

使用时长获取子单元91,用于获取所述霍尔传感器的使用时长;The useduration acquisition subunit 91 is used to obtain the use duration of the Hall sensor;

第一阈值确定子单元92,用于基于预设的时长和磁感数据的对应关系表,确定所述使用时长对应的第一磁感数据,将所述第一磁感数据作为所述第一阈值;The firstthreshold determination subunit 92 is configured to determine the first magnetic induction data corresponding to the use duration based on the preset time duration and the corresponding relationship table of magnetic induction data, and use the first magnetic induction data as the first magnetic induction data. threshold;

阈值调整子单元93,用于将所述霍尔传感器的磁感应阈值调整为所述第一磁感应阈值。Thethreshold adjustment subunit 93 is configured to adjust the magnetic induction threshold of the Hall sensor to the first magnetic induction threshold.

在一实施例中,参见图10,所述阈值调整单元82包括:In an embodiment, referring to FIG. 10 , thethreshold adjustment unit 82 includes:

平均值获取子单元101,用于获取所述当前磁感数据之前预设时间段内的磁感数据的平均值,将所述平均值作为所8596述第一阈值;The averagevalue acquisition subunit 101 is used to acquire the average value of the magnetic induction data in the preset time period before the current magnetic induction data, and the average value is used as the first threshold value;

阈值调整子单元102,用于将所述霍尔传感器的磁感应阈值调整为所述第一磁感应阈值。Thethreshold adjustment subunit 102 is configured to adjust the magnetic induction threshold of the Hall sensor to the first magnetic induction threshold.

可理解的是,本公开实施例提供的装置与上述方法相对应,具体内容可以参考方法各实施例的内容,在此不再赘述。It is understandable that the apparatuses provided by the embodiments of the present disclosure correspond to the above-mentioned methods, and the specific content may refer to the content of the various embodiments of the methods, which will not be repeated here.

图11是根据一示例性实施例示出的一种电子设备的框图。例如,电子设备1100可以是智能手机,计算机,数字广播终端,平板设备,医疗设备,健身设备,个人数字助理等。Fig. 11 is a block diagram of an electronic device according to an exemplary embodiment. For example, theelectronic device 1100 may be a smartphone, a computer, a digital broadcast terminal, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.

参照图11,电子设备1100可以包括以下一个或多个组件:处理组件1102,存储器1104,电源组件1106,多媒体组件1108,音频组件1110,输入/输出(I/O)的接口1112,传感器组件1114,通信组件1116,以及图像采集组件1118。11, anelectronic device 1100 may include one or more of the following components: aprocessing component 1102, amemory 1104, apower supply component 1106, amultimedia component 1108, anaudio component 1110, an input/output (I/O)interface 1112, asensor component 1114 , acommunication component 1116 , and an image acquisition component 1118 .

处理组件1102通常电子设备1100的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件1102可以包括一个或多个处理器1120来执行计算机程序。此外,处理组件1102可以包括一个或多个模块,便于处理组件1102和其他组件之间的交互。例如,处理组件1102可以包括多媒体模块,以方便多媒体组件1108和处理组件1102之间的交互。Theprocessing component 1102 is generally the overall operation of theelectronic device 1100, such as operations associated with display, phone calls, data communications, camera operations, and recording operations.Processing component 1102 may include one ormore processors 1120 to execute computer programs. Additionally,processing component 1102 may include one or more modules that facilitate interaction betweenprocessing component 1102 and other components. For example,processing component 1102 may include a multimedia module to facilitate interaction betweenmultimedia component 1108 andprocessing component 1102.

存储器1104被配置为存储各种类型的数据以支持在电子设备1100的操作。这些数据的示例包括用于在电子设备1100上操作的任何应用程序或方法的计算机程序,联系人数据,电话簿数据,消息,图片,视频等。存储器1104可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。Thememory 1104 is configured to store various types of data to support operation at theelectronic device 1100 . Examples of such data include computer programs for any application or method operating onelectronic device 1100, contact data, phonebook data, messages, pictures, videos, and the like.Memory 1104 may be implemented by any type of volatile or non-volatile storage device or combination 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.

电源组件1106为电子设备1100的各种组件提供电力。电源组件1106可以包括电源管理系统,一个或多个电源,及其他与为电子设备1100生成、管理和分配电力相关联的组件。Power supply assembly 1106 provides power to various components ofelectronic device 1100 .Power supply components 1106 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power toelectronic device 1100 .

多媒体组件1108包括在电子设备1100和目标对象之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示屏(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自目标对象的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与触摸或滑动操作相关的持续时间和压力。Themultimedia component 1108 includes a screen that provides an output interface between theelectronic device 1100 and the target object. 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 target object. The touch panel includes one or more touch sensors to sense touch, swipe, and gestures on the touch panel. A touch sensor can sense not only the boundaries of a touch or swipe action, but also the duration and pressure associated with the touch or swipe action.

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

I/O接口1112为处理组件1102和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。The I/O interface 1112 provides an interface between theprocessing component 1102 and a peripheral interface module, which may be a keyboard, a click wheel, a button, or the like.

传感器组件1114包括一个或多个传感器,用于为电子设备1100提供各个方面的状态评估。例如,传感器组件1114可以检测到电子设备1100的打开/关闭状态,组件的相对定位,例如组件为电子设备1100的显示屏和小键盘,传感器组件1114还可以检测电子设备1100或一个组件的位置改变,目标对象与电子设备1100接触的存在或不存在,电子设备1100方位或加速/减速和电子设备1100的温度变化。传感器组件1114可以包括距离传感器和/或光线传感器,用于获取传感数据,以使处理器基于传感器可以实现图1~图5所示方法的步骤。Sensor assembly 1114 includes one or more sensors for providing various aspects of status assessment forelectronic device 1100 . For example, thesensor assembly 1114 can detect the open/closed state of theelectronic device 1100, the relative positioning of components, such as the display screen and keypad of theelectronic device 1100, and thesensor assembly 1114 can also detect changes in the position of theelectronic device 1100 or a component , the presence or absence of the contact between the target object and theelectronic device 1100 , the orientation or acceleration/deceleration of theelectronic device 1100 , and the temperature change of theelectronic device 1100 . Thesensor component 1114 may include a distance sensor and/or a light sensor for acquiring sensing data, so that the processor may implement the steps of the methods shown in FIGS. 1 to 5 based on the sensor.

通信组件1116被配置为便于电子设备1100和其他设备之间有线或无线方式的通信。电子设备1100可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件1116经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,通信组件1116还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。Communication component 1116 is configured to facilitate wired or wireless communication betweenelectronic device 1100 and other devices. Theelectronic device 1100 may access wireless networks based on communication standards, such as WiFi, 2G or 3G, or a combination thereof. In one exemplary embodiment, thecommunication component 1116 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, thecommunication component 1116 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-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

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

在示例性实施例中,还提供了一种包括可执行的计算机程序的非临时性可读存储介质,例如包括指令的存储器1104,上述可执行的计算机程序可由处理器执行。其中,可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, there is also provided a non-transitory readable storage medium including an executable computer program, such as amemory 1104 including instructions, which can be executed by a processor. The 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 present disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any modifications, uses or adaptations that follow the general principles of this disclosure and include common general knowledge or techniques in the technical field not disclosed by this disclosure. The specification and examples are to be regarded as exemplary only, with the true scope and spirit of the disclosure being indicated by the following claims.

应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It is to be understood that the present disclosure is not limited to the precise structures described above and illustrated in the accompanying drawings, and that 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 (16)

Translated fromChinese
1.一种显示状态控制方法,其特征在于,应用于设置有显示屏的电子设备,包括:1. a display state control method, is characterized in that, is applied to the electronic equipment that is provided with display screen, comprises:获取霍尔传感器所采集的磁感数据,并根据所述磁感数据调整所述霍尔传感器的预设的磁感应阈值;acquiring the magnetic induction data collected by the Hall sensor, and adjusting the preset magnetic induction threshold of the Hall sensor according to the magnetic induction data;响应于所述磁感数据超过预设的磁感应阈值,获取预设传感器所采集的传感数据;Acquiring sensing data collected by a preset sensor in response to the magnetic sensing data exceeding a preset magnetic sensing threshold;基于所述传感数据控制所述电子设备中显示屏的显示状态;Controlling the display state of the display screen in the electronic device based on the sensing data;所述方法还包括调整所述霍尔传感器的磁感应阈值的步骤,具体包括:The method also includes the step of adjusting the magnetic induction threshold of the Hall sensor, specifically including:获取所述霍尔传感器所采集的当前磁感数据;当所述当前磁感数据满足第二预设条件时,将所述霍尔传感器的磁感应阈值调整为第一磁感应阈值;acquiring the current magnetic induction data collected by the Hall sensor; when the current magnetic induction data satisfies a second preset condition, adjusting the magnetic induction threshold of the Hall sensor to the first magnetic induction threshold;所述第二预设条件包括以下至少一种:当前磁感数据为霍尔传感器所采集的磁感数据的最大值且该当前磁感数据小于预设的磁感应阈值,当前磁感数据之前预设时间段内的磁感数据均小于预设的磁感应阈值;所述磁感数据的最大值是指当前磁感数据之前预设时间段内的历史磁感数据均小于或者等于所述当前磁感数据。The second preset condition includes at least one of the following: the current magnetic induction data is the maximum value of the magnetic induction data collected by the Hall sensor and the current magnetic induction data is less than a preset magnetic induction threshold, and the current magnetic induction data is previously preset The magnetic induction data in the time period are all smaller than the preset magnetic induction threshold; the maximum value of the magnetic induction data means that the historical magnetic induction data in the preset time period before the current magnetic induction data are all less than or equal to the current magnetic induction data .2.根据权利要求1所述的显示状态控制方法,其特征在于,基于所述传感数据控制所述电子设备中显示屏的显示状态,包括:2 . The display state control method according to claim 1 , wherein controlling the display state of the display screen in the electronic device based on the sensing data comprises: 2 .确定所述传感数据是否满足第一预设条件,得到确定结果;determining whether the sensing data satisfies a first preset condition, and obtaining a determination result;当所述确定结果表征所述传感数据满足所述第一预设条件时,控制电子设备的显示屏切换到关闭状态;当所述确定结果表征所述传感数据不满足所述第一预设条件时,控制所述显示屏保持显示状态。When the determination result indicates that the sensing data meets the first preset condition, the display screen of the control electronic device is switched to an off state; when the determination result indicates that the sensing data does not meet the first preset condition When the conditions are set, the display screen is controlled to keep the display state.3.根据权利要求2所述的显示状态控制方法,其特征在于,所述预设传感器包括以下至少一种:距离传感器、光线传感器。3 . The display state control method according to claim 2 , wherein the preset sensor comprises at least one of the following: a distance sensor and a light sensor. 4 .4.根据权利要求3所述的显示状态控制方法,其特征在于,所述第一预设条件包括以下至少一种:距离值小于或者等于预设距离值,当前光感值小于或等于预设光感值。4. The display state control method according to claim 3, wherein the first preset condition comprises at least one of the following: a distance value is less than or equal to a preset distance value, and a current light sensitivity value is less than or equal to a preset value light sensitivity.5.根据权利要求2所述的显示状态控制方法,其特征在于,当确定结果表征所述传感数据不满足所述第一预设条件之后,所述方法还包括:5 . The display state control method according to claim 2 , wherein after the determination result indicates that the sensing data does not meet the first preset condition, the method further comprises: 6 .生成提醒信息,所述提醒信息用于提醒所述电子设备处于强磁场环境中。Generating reminder information, where the reminder information is used to remind the electronic device to be in a strong magnetic field environment.6.根据权利要求1所述的显示状态控制方法,其特征在于,将所述霍尔传感器的磁感应阈值调整为第一磁感应阈值,包括:6. The display state control method according to claim 1, wherein adjusting the magnetic induction threshold of the Hall sensor to the first magnetic induction threshold comprises:获取所述霍尔传感器的使用时长;Obtain the usage time of the Hall sensor;基于预设的时长和磁感数据的对应关系表,确定所述使用时长对应的第一磁感数据;determining the first magnetic induction data corresponding to the use duration based on the preset time duration and the corresponding relationship table of the magnetic induction data;将所述霍尔传感器的磁感应阈值调整为所述第一磁感应阈值。The magnetic induction threshold of the Hall sensor is adjusted to the first magnetic induction threshold.7.根据权利要求1所述的显示状态控制方法,其特征在于,将所述霍尔传感器的磁感应阈值调整为第一磁感应阈值,包括:7. The display state control method according to claim 1, wherein adjusting the magnetic induction threshold of the Hall sensor to the first magnetic induction threshold comprises:获取所述当前磁感数据之前预设时间段内的磁感数据的平均值,将所述平均值作为第一磁感应阈值;acquiring an average value of magnetic induction data within a preset time period before the current magnetic induction data, and using the average value as a first magnetic induction threshold;将所述霍尔传感器的磁感应阈值调整为所述第一磁感应阈值。The magnetic induction threshold of the Hall sensor is adjusted to the first magnetic induction threshold.8.一种显示状态控制装置,其特征在于,应用于设置有显示屏的电子设备,包括:8. A display state control device, characterized in that, applied to an electronic device provided with a display screen, comprising:磁感数据获取模块,用于获取霍尔传感器所采集的磁感数据;The magnetic induction data acquisition module is used to obtain the magnetic induction data collected by the Hall sensor;磁感阈值调整模块,用于根据所述磁感数据调整所述霍尔传感器的预设的磁感应阈值;a magnetic induction threshold adjustment module, configured to adjust the preset magnetic induction threshold of the Hall sensor according to the magnetic induction data;传感数据获取模块,用于响应于所述磁感数据超过预设的磁感应阈值,获取预设传感器所采集的传感数据;a sensing data acquisition module, configured to acquire sensing data collected by a preset sensor in response to the magnetic sensing data exceeding a preset magnetic sensing threshold;显示状态控制模块,用于基于所述传感数据控制所述电子设备中显示屏的显示状态;a display state control module, configured to control the display state of the display screen in the electronic device based on the sensing data;所述磁感阈值调整模块包括:The magnetic induction threshold adjustment module includes:当前值获取单元,用于获取所述霍尔传感器所采集的当前磁感数据;The current value acquisition unit is used to acquire the current magnetic induction data collected by the Hall sensor;阈值调整单元,用于当所述当前磁感数据满足第二预设条件时,将所述霍尔传感器的磁感应阈值调整为第一磁感应阈值;a threshold adjustment unit, configured to adjust the magnetic induction threshold of the Hall sensor to a first magnetic induction threshold when the current magnetic induction data satisfies a second preset condition;所述第二预设条件包括以下至少一种:当前磁感数据为霍尔传感器所采集的磁感数据的最大值且该当前磁感数据小于预设的磁感应阈值,当前磁感数据之前预设时间段内的磁感数据均小于预设的磁感应阈值;所述磁感数据的最大值是指当前磁感数据之前预设时间段内的历史磁感数据均小于或者等于所述当前磁感数据。The second preset condition includes at least one of the following: the current magnetic induction data is the maximum value of the magnetic induction data collected by the Hall sensor and the current magnetic induction data is less than a preset magnetic induction threshold, and the current magnetic induction data is previously preset The magnetic induction data in the time period are all smaller than the preset magnetic induction threshold; the maximum value of the magnetic induction data means that the historical magnetic induction data in the preset time period before the current magnetic induction data are all less than or equal to the current magnetic induction data .9.根据权利要求8所述的显示状态控制装置,其特征在于,所述显示状态控制模块包括:9. The display state control device according to claim 8, wherein the display state control module comprises:确定结果获取单元,用于确定所述传感数据是否满足第一预设条件,得到确定结果;a determination result obtaining unit, configured to determine whether the sensing data satisfies a first preset condition, and obtain a determination result;显示状态控制单元,用于当所述确定结果表征所述传感数据满足所述第一预设条件时,控制电子设备的显示屏切换到关闭状态;当所述确定结果表征所述传感数据不满足所述第一预设条件时,控制所述显示屏保持显示状态。a display state control unit, configured to control the display screen of the electronic device to switch to an off state when the determination result represents that the sensing data meets the first preset condition; when the determination result represents the sensing data When the first preset condition is not satisfied, the display screen is controlled to maintain the display state.10.根据权利要求9所述的显示状态控制装置,其特征在于,所述预设传感器包括以下至少一种:距离传感器、光线传感器。10 . The display state control device according to claim 9 , wherein the preset sensor comprises at least one of the following: a distance sensor and a light sensor. 11 .11.根据权利要求10所述的显示状态控制装置,其特征在于,所述第一预设条件包括以下至少一种:距离值小于或者等于预设距离值,当前光感值小于或等于预设光感值。11. The display state control device according to claim 10, wherein the first preset condition comprises at least one of the following: a distance value is less than or equal to a preset distance value, and a current light sensitivity value is less than or equal to a preset value light sensitivity.12.根据权利要求9所述的显示状态控制装置,其特征在于,所述显示状态控制模块包括:12. The display state control device according to claim 9, wherein the display state control module comprises:提醒信息生成单元,用于生成提醒信息,所述提醒信息用于提醒所述电子设备处于强磁场环境中。A reminder information generating unit, configured to generate reminder information, where the reminder information is used to remind the electronic device to be in a strong magnetic field environment.13.根据权利要求8所述的显示状态控制装置,其特征在于,所述阈值调整单元包括:13. The display state control device according to claim 8, wherein the threshold adjustment unit comprises:使用时长获取子单元,用于获取所述霍尔传感器的使用时长;a use duration acquisition subunit for acquiring the use duration of the Hall sensor;第一阈值确定子单元,用于基于预设的时长和磁感数据的对应关系表,确定所述使用时长对应的第一磁感数据,将所述第一磁感数据作为所述第一阈值;a first threshold determination subunit, configured to determine the first magnetic induction data corresponding to the use duration based on a preset correspondence table of duration and magnetic induction data, and use the first magnetic induction data as the first threshold ;阈值调整子单元,用于将所述霍尔传感器的磁感应阈值调整为所述第一磁感应阈值。The threshold adjustment subunit is used to adjust the magnetic induction threshold of the Hall sensor to the first magnetic induction threshold.14.根据权利要求13所述的显示状态控制装置,其特征在于,所述阈值调整单元包括:14. The display state control device according to claim 13, wherein the threshold adjustment unit comprises:平均值获取子单元,用于获取所述当前磁感数据之前预设时间段内的磁感数据的平均值,将所述平均值作为所述第一阈值;an average value acquisition subunit, configured to acquire the average value of the magnetic induction data in a preset time period before the current magnetic induction data, and use the average value as the first threshold;阈值调整子单元,用于将所述霍尔传感器的磁感应阈值调整为所述第一磁感应阈值。The threshold adjustment subunit is used to adjust the magnetic induction threshold of the Hall sensor to the first magnetic induction threshold.15.一种电子设备,其特征在于,包括:15. An electronic device, comprising:霍尔传感器和预设传感器;所述预设传感器包括以下至少一种:距离传感器、光线传感器;A hall sensor and a preset sensor; the preset sensor includes at least one of the following: a distance sensor, a light sensor;处理器;processor;用于存储所述处理器可执行的计算机程序的存储器;a memory for storing a computer program executable by the processor;所述处理器被配置为执行所述存储器中的计算机程序以实现权利要求1~7任一项所述方法的步骤。The processor is configured to execute a computer program in the memory to implement the steps of the method of any of claims 1-7.16.一种可读存储介质,其上存储有可执行的计算机程序,其特征在于,该计算机程序被执行时实现权利要求1~7任一项所述方法的步骤。16. A readable storage medium on which an executable computer program is stored, characterized in that, when the computer program is executed, the steps of the method according to any one of claims 1 to 7 are implemented.
CN202010161777.1A2020-03-102020-03-10Display state control method and device, electronic equipment and storage mediumActiveCN111432068B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202010161777.1ACN111432068B (en)2020-03-102020-03-10Display state control method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202010161777.1ACN111432068B (en)2020-03-102020-03-10Display state control method and device, electronic equipment and storage medium

Publications (2)

Publication NumberPublication Date
CN111432068A CN111432068A (en)2020-07-17
CN111432068Btrue CN111432068B (en)2022-04-08

Family

ID=71546247

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202010161777.1AActiveCN111432068B (en)2020-03-102020-03-10Display state control method and device, electronic equipment and storage medium

Country Status (1)

CountryLink
CN (1)CN111432068B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN112286599B (en)*2020-08-202024-09-10北京小米移动软件有限公司Control method of terminal equipment and terminal equipment
CN114489534B (en)*2021-07-232023-07-14荣耀终端有限公司 Display switching method of foldable electronic device, electronic device and medium
CN114935902B (en)*2022-05-202025-03-25南昌逸勤科技有限公司 Control method, device and equipment applied to electronic equipment
CN116701099B (en)*2022-11-082024-08-20荣耀终端有限公司 Electronic device and method for controlling working state of electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN104640184A (en)*2015-02-152015-05-20广东欧珀移动通信有限公司 A screen wake-up method and device
CN104834497A (en)*2015-05-152015-08-12北京智膜科技有限公司On screen display control method and controller
CN106210336A (en)*2016-07-222016-12-07北京小米移动软件有限公司Control the method and device of mobile terminal state switching
WO2019061177A1 (en)*2017-09-282019-04-04华为技术有限公司Prompt method and portable device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
JP5634041B2 (en)*2009-02-172014-12-03ローム株式会社 Magnetic sensor and electronic device equipped with the same
CN107197076A (en)*2016-03-142017-09-22中兴通讯股份有限公司A kind of control method of terminal device, mobile terminal and system
CN106339168B (en)*2016-08-222020-10-16北京小米移动软件有限公司 Screen control method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN104640184A (en)*2015-02-152015-05-20广东欧珀移动通信有限公司 A screen wake-up method and device
CN104834497A (en)*2015-05-152015-08-12北京智膜科技有限公司On screen display control method and controller
CN106210336A (en)*2016-07-222016-12-07北京小米移动软件有限公司Control the method and device of mobile terminal state switching
WO2019061177A1 (en)*2017-09-282019-04-04华为技术有限公司Prompt method and portable device

Also Published As

Publication numberPublication date
CN111432068A (en)2020-07-17

Similar Documents

PublicationPublication DateTitle
CN111432068B (en)Display state control method and device, electronic equipment and storage medium
CN108040360B (en) Method and device for screen display control
CN110796988A (en)Backlight adjusting method and device
CN106375604A (en) Method and device for controlling terminal power
CN112202962B (en)Screen brightness adjusting method and device and storage medium
CN106210336B (en)Control the method and device of mobile terminal state switching
CN106550522A (en)Illumination control method and device
CN106843706B (en)Shutdown control method and device and terminal equipment
CN107197441A (en)The operating mode control method and device of intelligent home device
CN107995676A (en)terminal control method and device
CN106959807A (en)View angle switch method and device
CN106897009A (en)Mobile device time display method and device
CN108769416A (en)It puts out screen and shows method and device
CN107529699A (en)Control method of electronic device and device
CN105208510B (en)The method and device of intelligent alarm
CN106292320A (en)Control the method and device that controlled device runs
CN112148149A (en)Touch screen control method, touch screen control device and storage medium
CN108932116A (en)The adjusting method and device of volume
CN107656694B (en)Display control method and device of user interface
CN106775246B (en)Screen brightness adjusting method and device
CN108267972B (en) Electronic equipment control method and device
CN108154865A (en)Adjust the method and device of screen color temp
CN111243554A (en)Screen brightness adjusting method, screen brightness adjusting device and storage medium
CN107566626A (en)Terminal state control method and device
CN107203264A (en)The control method of display pattern, device, electronic equipment

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp