Screen control method, electronic equipment, chip system, storage medium and program product

Obtaining photosensitive data from the front and rear cameras determines the proximity of the human body, which solves the problem of proximity sensor occupying screen space and increasing costs, and improves the user experience and performance of electronic devices.

CN119299558APending Publication Date: 2025-01-10SHANGHAI GLORY SMART TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411207731.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

Existing electronic devices need to install proximity sensors when judging the human body's proximity, resulting in a decrease in screen-to-body ratio, an increase in costs and waste of resources, and a low sensor usage rate in non-call scenarios.

Method used

Acquire photosensitive data through the front and rear cameras, judge the proximity of the human body, avoid using proximity sensors, increase the screen-to-body ratio and reduce costs.

Benefits of technology

It realizes accurate judgment of human proximity without the need for proximity sensors, improve user experience and equipment performance, and reduce manufacturing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119299558A_ABST
    Figure CN119299558A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a screen control method, electronic equipment, a chip system, a storage medium and a program product, and relates to the technical field of terminals. The method comprises the following steps: running a first application in a foreground of the electronic equipment, wherein the electronic equipment is in a light-source-free environment; if the electronic equipment is still in the light-source-free environment, the electronic equipment moves, and the screen brightness of the electronic equipment is increased; after the screen brightness of the electronic equipment is increased, continuously acquiring photosensitive data through the front camera; and setting the electronic equipment not to execute the screen touch logic under the condition of judging that the first photosensitive data acquired by the front camera in the first time length is in a growth trend and the second photosensitive data acquired in the second time length after the first time length is in a reduction trend change. Thus, the electronic equipment can judge whether the human body approaches the electronic equipment or not through the front camera and the rear camera, a proximity sensor can not be arranged, the screen-to-body ratio is increased, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a screen control method, electronic device, chip system, storage medium and program product. Background Art

[0002] In order to reduce the phenomenon of call interruption caused by accidental touch of the screen when a person approaches the electronic device during a call, the electronic device can set the electronic device not to execute the screen touch logic by setting the screen to turn off when the person approaches the electronic device. Currently, the electronic device can set a proximity sensor on the side close to the screen, so that the electronic device can determine the distance between the person and the electronic device through the proximity sensor.

[0003] However, such an approach may reduce the screen-to-body ratio of the electronic device, thereby affecting the user's visual experience. Summary of the invention

[0004] The embodiments of the present application provide a screen control method, an electronic device, a chip system, a storage medium and a program product, which are applied to the field of terminal technology. When an electronic device is about to enter or enters a call scene, the electronic device can judge whether a human body is close to the electronic device based on the light-sensitive data obtained by the front and rear cameras, so that the electronic device does not need to be equipped with a proximity sensor, which helps to make the screen ratio of the electronic device larger and improve the user experience.

[0005] In the first aspect, the embodiment of the present application proposes a screen control method. The method includes: at a first moment, the electronic device runs a first application in the foreground, and the electronic device is in a light-free environment; the first application includes an application that uses a front camera and / or a rear camera during operation; the electronic device is still in a light-free environment, the electronic device moves, and the screen brightness of the electronic device is increased; after the screen brightness of the electronic device is increased, the front camera is used to continuously obtain photosensitive data; when it is determined that the first photosensitive data obtained by the front camera within a first time period shows an increasing trend and the second photosensitive data obtained within a second time period after the first time period shows a decreasing trend, the electronic device is set not to execute the screen touch logic.

[0006] The first application may be a call application or a social application described below. The first application running in the foreground of the electronic device may be a call about to be entered scenario or a call entering scenario described below. The first duration may be a second preset duration in the third scenario described below, and the second duration may be a third preset duration in the third scenario described below. The first light sensing data may be the forward light sensing data described in S1306 described below, for example Fig.12 The second light-sensitive data may be the forward light-sensitive data in S1307 below, for example Fig.12(b) shows the forward-photographic data in the second half of time period 3 and the forward-photographic data in time period 4.

[0007] A light-free environment does not mean that the environment in which the electronic device is located is absolutely without light, but can be understood as the light intensity of the environment in which the electronic device is located is lower than a certain threshold (for example, 5lux). Alternatively, the electronic device being in a light-free environment can also be understood as the front and rear cameras of the electronic device in the third scenario below are both blocked, causing the electronic device to be in a light-free environment. Setting the electronic device not to execute the screen touch logic can be "processor 110 sets the electronic device to enter an anti-mistouch state" in S1308. When the electronic device does not execute the screen touch logic, the electronic device may not respond when the user touches the screen.

[0008] In the screen control method of the present application, as the human body approaches the screen of the electronic device, the light reflected by the screen from the human body will cause the light-sensitive data acquired by the front camera to show an increasing trend; and as the human body approaches the screen of the electronic device and blocks the front camera, the light-sensitive data acquired by the front camera will show a decreasing area. Therefore, through the changes in the light-sensitive data within the first time period and the second time period, the electronic device can determine that the human body is approaching the electronic device, and then set the electronic device not to execute the screen touch logic. In this way, the electronic device determines whether the human body is approaching the electronic device through the light-sensitive data acquired by the front and rear cameras, and the electronic device does not need to be equipped with a proximity sensor, which helps to make the screen-to-body ratio of the electronic device larger and improves the user experience.

[0009] In combination with the first aspect, in certain implementations of the first aspect, the electronic device is in an environment without light source, including: the electronic device obtains second light-sensing data through a front camera and obtains third light-sensing data through a rear camera; and determines that the second light-sensing data and the third light-sensing data are less than a first threshold.

[0010] The first threshold may be the threshold 14 mentioned below. The second light-sensing data may be the forward light-sensing data mentioned in S1302 below, for example Fig.12 The third light-sensing data may be the rear-view light-sensing data in S1302 below, for example Fig.12 The post-photographic light-sensing data acquired in the middle time period 1. The implementation of judging that the second light-sensing data and the third light-sensing data are less than the first threshold is similar to that of S1302.

[0011] Optionally, the second photosensitive data and the third photosensitive data may be a numerical value, respectively. Alternatively, the second photosensitive data and the third photosensitive data may include a plurality of data, respectively. Then the second photosensitive data and the third photosensitive data being less than the first threshold value may mean that the average value of the second photosensitive data and the average value of the third photosensitive data are both less than the first threshold value.

[0012] In this way, the second light-sensing data and the third light-sensing data are less than the first threshold, indicating that the electronic device is currently in the third scenario described below, that is, the electronic device is in a light-free environment. The electronic device can determine whether the human body is close to the electronic device based on the method corresponding to the light-free environment (the third scenario).

[0013] In combination with the first aspect, in certain implementations of the first aspect, setting the electronic device not to execute the screen touch logic includes: determining whether a first time length exists and an increase in the first light-sensitive data within the first time length is greater than a second threshold; if the first time length exists, determining whether a second time length exists, and the second light-sensitive data within the second time length shows a decreasing trend and decreases to less than a third threshold; if the second time length exists, setting the electronic device not to execute the screen touch logic.

[0014] The second threshold value may be the threshold value 15 mentioned below. The first photosensitive data may be the proactive photosensitive data in S1306 mentioned below. The third threshold value may be the threshold value 17 mentioned below, and the second photosensitive data may be the proactive photosensitive data in S1307 mentioned below. The second photosensitive data being reduced to less than the third threshold value may be the proactive photosensitive data after reduction being less than the threshold value 17 in S1307.

[0015] After judging that the first duration exists and the increase of the first light-sensitive data within the first duration is greater than the second threshold, it indicates that the electronic device is in the stage where the user picks up the electronic device in the third scenario described below. In the case where the first duration exists, judging that the second duration exists, the second light-sensitive data within the second duration shows a decreasing trend and decreases to less than the third threshold, indicating that the electronic device is determined to be in the stage where the user holds the electronic device and gradually approaches the human body in the third scenario described below, and the decrease of the second light-sensitive data to less than the third threshold indicates that the electronic device is in the stage where the electronic device is close to the human body in the third scenario described below.

[0016] In this way, when the electronic device is in an environment without light, it is possible to determine whether a human body is close to the electronic device based on the changing trend of the light-sensitive data obtained by the front camera, thereby improving the accuracy of the screen control method and enhancing the user experience.

[0017] In combination with the first aspect, in certain implementations of the first aspect, the method also includes: at a second moment, a second application is running in the foreground of the electronic device, and the electronic device is in an environment with light; the second application includes an application that uses the front camera and / or the rear camera during operation, and the second moment is different from the first moment; the electronic device is still in an environment with light, and the electronic device moves; after determining that the electronic device has moved, when it is determined that there is a third time period, the second light-sensitive data shows a decreasing trend within the third time period, and the second light-sensitive data is reduced to less than a fourth threshold, setting the electronic device not to execute the screen touch logic.

[0018] The second application may be a call application or a social application described below. A light source environment may be understood as a light intensity in the environment where the electronic device is located being greater than a certain threshold (e.g., 5lux). The electronic device being in a light source environment may be the electronic device being in the first scenario, the second scenario, or the fourth scenario described below.

[0019] When the electronic device is in the first scenario, the third duration may be the third preset duration in S804 below. The second light-sensing data may be the forward-viewing light-sensing data in S804. The fourth threshold may be the threshold 5 in S804. The second light-sensing data being reduced to less than the fourth threshold may be the forward-viewing light-sensing data being reduced to less than the threshold 5.

[0020] When the electronic device is in the second scenario, the third duration may be the third preset duration in S1104 below. The second light-sensing data may be the forward-viewing light-sensing data in S1104. The fourth threshold may be the threshold 12 in S1104. The second light-sensing data being reduced to less than the fourth threshold may be the forward-viewing light-sensing data being reduced to less than the threshold 12.

[0021] When the electronic device is in the third scenario, the third duration may be the third preset duration in S1504 below. The second light-sensing data may be the forward-viewing light-sensing data in S1504. The fourth threshold may be the threshold 23 in S1504. The second light-sensing data being reduced to less than the fourth threshold may be the forward-viewing light-sensing data being reduced to less than the threshold 23.

[0022] In this way, after determining that the electronic device has moved, if it is judged that the second light sensitivity data shows a decreasing trend within the third time period and the second light sensitivity data decreases to less than the third threshold, it means that the human body is approaching the electronic device, and the electronic device may not execute the screen touch logic, thereby preventing the user from accidentally touching the screen.

[0023] In combination with the first aspect, in certain implementations of the first aspect, the electronic device is in an environment with a light source, including: obtaining fourth light-sensing data through a front camera, and obtaining fifth light-sensing data through a rear camera; and determining that the fourth light-sensing data and the fifth light-sensing data are greater than a fifth threshold.

[0024] The fourth light-sensing data and the fifth light-sensing data being greater than the fifth threshold value indicates that the fourth light-sensing data is greater than the fifth threshold value, and the fifth light-sensing data is greater than the fifth threshold value. The fourth light-sensing data may be the forward-viewing light-sensing data in S1502, for example Fig.14 The fifth light-sensing data may be the post-photographic data in S1502, for example Fig.14 The fifth threshold value may be preset as 21.

[0025] Optionally, the fourth photosensitive data and the fifth photosensitive data may be a numerical value. Alternatively, the fourth photosensitive data and the fifth photosensitive data may include a plurality of data. The fourth photosensitive data and the fifth photosensitive data being greater than the fifth threshold value may be that the average value of the fourth photosensitive data and the average value of the fifth photosensitive data are both greater than the fifth threshold value.

[0026] In this way, the fourth photosensitive data and the fifth photosensitive data being greater than the fourth threshold value indicate that the electronic device is in the fourth scenario described below (for example, a user holds the electronic device), so that the electronic device can determine whether the human body is close to the electronic device in a manner corresponding to the fourth scenario.

[0027] In combination with the first aspect, in some implementations of the first aspect, determining that the electronic device is moving includes: determining the movement of the electronic device using measurement data acquired by a combined sensor of an accelerometer and a gyroscope.

[0028] The combined sensor of the accelerometer and the gyroscope may be referred to as the "A+G sensor" below, and the movement of the electronic device may also be understood as the electronic device being picked up (e.g. Fig.14 The user holds the electronic device gradually closer to the human body).

[0029] In this way, through the measurement data obtained by the combined sensor of the accelerometer and the gyroscope, the electronic device can determine whether the electronic device is picked up by the user.

[0030] In combination with the first aspect, in certain implementations of the first aspect, the electronic device is in an environment with a light source, including: obtaining sixth light-sensing data through a front camera, and obtaining seventh light-sensing data through a rear camera; determining that the sixth light-sensing data is greater than N times the seventh light-sensing data, and the seventh light-sensing data is less than a sixth threshold, and N is greater than or equal to 2.

[0031] The sixth light-sensing data may be the forward light-sensing data in S802 below, for example Figure 7 The seventh light-sensing data may be the rear-camera light-sensing data in S802, for example Figure 7 The sixth threshold value may be the threshold value 1 mentioned below.

[0032] Optionally, the sixth photosensitive data and the seventh photosensitive data may be a numerical value, respectively. Alternatively, the sixth photosensitive data and the seventh photosensitive data may include a plurality of data, respectively. The sixth photosensitive data being N times greater than the seventh photosensitive data may mean that an average value of the sixth photosensitive data is N times greater than an average value of the seventh photosensitive data, and the seventh photosensitive data being less than the sixth threshold may mean that an average value of the seventh photosensitive data is less than the sixth threshold.

[0033] In this way, the electronic device can determine the scene in which the electronic device is located through the light-sensitive data obtained by the front camera and the rear camera, and then determine whether the human body is close to the electronic device in a corresponding manner.

[0034] In combination with the first aspect, in certain implementations of the first aspect, determining that the electronic device has moved includes: when it is determined that there is a fourth time period and an increase in the eighth photosensitive data within the fourth time period is greater than a seventh threshold, determining that the electronic device has moved, the eighth photosensitive data being photosensitive data acquired through a rear camera.

[0035] The fourth duration may be the second preset duration in S803, for example Figure 7 In time period 2, the eighth light-sensing data may be the post-photographic light-sensing data in S803, for example Figure 7 The seventh threshold value may be the threshold value 2 in S803.

[0036] Optionally, during the fourth time period, the change in the light-sensing data acquired by the front camera is less than a threshold value a. That is, when the user picks up the electronic device, the front camera is not blocked, and the change in the light-sensing data acquired by the front camera is small.

[0037] In this way, after determining that the electronic device is placed face up in a light environment, the accuracy of the screen control method can be improved by judging whether the electronic device is picked up by the user based on the change in the rear camera light sensing data of the electronic device, and then judging whether the human body is close to the electronic device.

[0038] In combination with the first aspect, in certain implementations of the first aspect, the electronic device is in an environment with a light source, including: ninth light-sensing data obtained through a front camera, and tenth light-sensing data obtained through a rear camera; judging that the ninth light-sensing data is less than a sixth threshold, and the tenth light-sensing data is greater than N times the ninth light-sensing data, and N is greater than or equal to 2.

[0039] Optionally, the ninth photosensitive data and the tenth photosensitive data may be a numerical value, respectively. Alternatively, the ninth photosensitive data and the tenth photosensitive data may include a plurality of data, respectively. The tenth photosensitive data being N times greater than the ninth photosensitive data may mean that the average value of the tenth photosensitive data is N times greater than the average value of the ninth photosensitive data, and the ninth photosensitive data being less than the sixth threshold may mean that the average value of the ninth photosensitive data is less than the sixth threshold.

[0040] The ninth light-sensing data may be the forward light-sensing data in S1102, for example Fig.10 The tenth light-sensing data may be the post-photographic light-sensing data in S1102, for example Fig.10 The sixth threshold value may be the threshold value 8 in S1102.

[0041] In this way, after determining that the electronic device is in an environment with light, it can be further determined that the placement state of the electronic device is placed with the back facing up, so that the electronic device selects a corresponding method to determine whether the human body is close to the electronic device, which can improve the accuracy of the screen control method.

[0042] In combination with the first aspect, in certain implementations of the first aspect, determining that the electronic device has moved includes: when it is determined that there is a fifth time period and an increase in the eleventh photosensitive data within the fifth time period is greater than a seventh threshold, determining that the electronic device has moved, the eleventh photosensitive data being photosensitive data acquired through the front camera.

[0043] The fifth duration may be the second preset duration in S1103, for example Fig.10 The eleventh light-sensing data may be the forward light-sensing data in S1103, for example Fig.10 The seventh threshold value may be the threshold value 9 in S1103.

[0044] In this way, after determining that the electronic device is placed with its back facing up in an environment with light, the electronic device can judge whether the electronic device is picked up by the user based on the change in the electronic device's front-view light-sensitive data, and then judge whether the human body is close to the electronic device in a corresponding manner.

[0045] In combination with the first aspect, in certain implementations of the first aspect, after the electronic device is set not to execute the screen touch logic, the method also includes: determining whether there is a sixth time period, during which the twelfth light-sensing data shows an increasing trend and increases to be greater than an eighth threshold, and the twelfth light-sensing data is acquired by the front camera; if the sixth time period exists, setting the electronic device to execute the screen touch logic.

[0046] Among them, the sixth time duration may be the fourth preset time duration, the twelfth photosensitive data may be the forward-viewing photosensitive data acquired within the fourth preset time duration, and the eighth threshold may be the threshold c.

[0047] That is, no matter in what scenario the electronic device enters the anti-mistouch state, it can be restored to the normal state through the above method.

[0048] In this way, after setting the electronic device not to execute the screen touch logic, the electronic device can continue to judge whether the human body is far away from the electronic device based on the changing trend of the front-camera light-sensitive data. After judging that the human body is far away from the electronic device, the electronic device is set to execute the screen touch logic to restore the electronic device to normal state and improve the user experience.

[0049] In a second aspect, an embodiment of the present application provides a screen control device, which may be an electronic device, or a chip or chip system in an electronic device. The screen control device may include a front camera, a rear camera, and a processing unit. The processing unit may be a processor. The device may also include a storage unit, which may be a memory. The storage unit is used to store instructions, and the processing unit executes the instructions stored in the storage unit so that the electronic device implements a screen control method described in the first aspect or any possible implementation of the first aspect. When the device is a chip or chip system in an electronic device, the processing unit may be a processor. The processing unit executes the instructions stored in the storage unit so that the electronic device implements a screen control method described in the first aspect or any possible implementation of the first aspect. The storage unit may be a storage unit in the chip (e.g., a register, a cache, etc.), or a storage unit in the electronic device located outside the chip (e.g., a read-only memory, a random access memory, etc.).

[0050] In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, the memory being used to store code instructions, and the processor being used to run the code instructions to execute the method described in the first aspect or any possible implementation of the first aspect.

[0051] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program or instructions are stored. When the computer program or instructions are run on a computer, the computer executes the method described in the first aspect or any possible implementation of the first aspect.

[0052] In a fifth aspect, an embodiment of the present application provides a computer program product including a computer program. When the computer program runs on a computer, the computer executes the method described in the first aspect or any possible implementation manner of the first aspect.

[0053] In a sixth aspect, the present application provides a chip or a chip system, the chip or chip system comprising at least one processor and a communication interface, the communication interface and the at least one processor are interconnected by a line, and the at least one processor is used to run a computer program or instruction to execute the method described in the first aspect or any possible implementation of the first aspect. The communication interface in the chip can be an input / output interface, a pin or a circuit, etc.

[0054] In a possible implementation, the chip or chip system described above in the present application further includes at least one memory, in which instructions are stored. The memory may be a storage unit inside the chip, such as a register, a cache, etc., or a storage unit of the chip (e.g., a read-only memory, a random access memory, etc.).

[0055] It should be understood that the second to sixth aspects of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 is a schematic diagram for illustrating a communication method between a SOC and a proximity sensor;

[0057] Figure 2 A schematic diagram of an application scenario provided for an application embodiment;

[0058] Figure 3 A flowchart of a screen control method is shown;

[0059] Figure 4 A schematic diagram for showing the installation position of a proximity sensor;

[0060] Figure 5 A schematic block diagram of the hardware architecture of an electronic device provided in an embodiment of the present application;

[0061] Figure 6 A schematic block diagram of the software architecture of the electronic device provided in the embodiment of the present application;

[0062] Figure 7 A schematic diagram of a first photosensitive data curve provided in an embodiment of the present application;

[0063] Figure 8 A schematic diagram of a flow chart of a first screen control method provided in an embodiment of the present application;

[0064] Fig. 9 A schematic diagram of pixels of a dual-working mode camera provided in an embodiment of the present application;

[0065] Fig.10 A schematic diagram of a second photosensitive data curve provided in an embodiment of the present application;

[0066] Fig.11 A schematic diagram of a flow chart of a second screen control method provided in an embodiment of the present application;

[0067] Fig.12 A schematic diagram of a third photosensitive data curve provided in an embodiment of the present application;

[0068] Fig.13 A schematic diagram of a flow chart of a third screen control method provided in an embodiment of the present application;

[0069] Fig.14 A schematic diagram of a fourth photosensitivity data curve provided in an embodiment of the present application;

[0070] Fig.15 A schematic diagram of a flow chart of a fourth screen control method provided in an embodiment of the present application;

[0071] Fig.16 A schematic block diagram of a screen control device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0072] In order to clearly describe the technical solutions of the embodiments of the present application, some terms and technologies involved in the embodiments of the present application are briefly introduced below:

[0073] 1. Proximity sensor

[0074] A sensor that can detect the proximity of an object, usually used to detect the distance between an object (such as a face, hand, or object) and the sensor. Commonly used proximity sensors include infrared sensors and ultrasonic sensors. Proximity sensors can be applied to electronic devices such as mobile phones. For example, an electronic device can determine the distance between the electronic device and the detected object through a proximity sensor.

[0075] 2. System on chip (SOC)

[0076] A highly integrated microprocessor that integrates multiple functional components on a single chip and is widely used in electronic devices. In electronic devices, SOC usually integrates a processor, GPU, memory, communication module, etc. to provide computing, graphics processing, communication and other functions.

[0077] 3. Integrated circuit bus (inter-integrated circuit, I 2 C)

[0078] Refers to a serial communication protocol used for short-distance communication between integrated circuits, which can be applied to embedded systems, sensors, display screens, storage devices and other fields. 2 The C bus consists of a serial clock line (SCL) and a serial data line (SDA). Bidirectional data transmission between one component and another can be achieved through the two bus lines SCL and SDA.

[0079] For example, Figure 1As shown, the two bus lines SCL and SDA can be used for information exchange between the proximity sensor and the SOC.

[0080] 4. External interrupt (EINT)

[0081] It can also be called external interrupt mechanism, etc. It can be used to transmit interrupt signals that need to be processed immediately to the microcontroller or processor.

[0082] For example, in combination Figure 1 EINT can be set between the proximity sensor and the SOC. When the proximity sensor detects that the distance between the proximity sensor and the detected object is less than or equal to a preset threshold value 1 (for example, 5 cm, etc.), the proximity sensor generates an interrupt signal and sends the interrupt signal to the SOC through EINT; and / or, when the proximity sensor detects that the distance between the proximity sensor and the detected object is greater than or equal to a preset threshold value 2 (for example, 7 cm, etc.), the proximity sensor generates an interrupt signal and sends the interrupt signal to the SOC through EINT.

[0083] 5. Dual working mode camera

[0084] Refers to a camera that can sense images and sense light at the same time. Among all the pixels of this camera, there are multiple light-sensitive + image-sensing pixels evenly distributed. Unlike ordinary pixels that can only sense images, light-sensitive + image-sensing pixels can sense light in addition to images. For ease of understanding, light-sensitive + image-sensing pixels are referred to as light-sensitive points below.

[0085] The working modes of the dual-working mode camera include camera mode and ambient light mode.

[0086] The camera mode refers to the dual working mode camera collecting image data. In the camera mode, the SOC can call the pixel points of the camera to collect image data.

[0087] Ambient light mode refers to the dual-mode camera collecting photosensitive data. In ambient light mode, the camera's photosites can capture light signals entering the lens. Each photosite can record the intensity of the captured light signal to obtain an initial data set in RAW format. Furthermore, the SOC can obtain the initial data set collected by the camera and convert the initial data set into photosensitive data.

[0088] 6. Photosensitive data

[0089] It can also be called photosensitivity. It can refer to the illuminance, which is used to indicate the light intensity of the current environment, and the unit is lux. In the ambient light mode, the dual-mode camera calls the photosensor to collect the initial data set of the ambient light of the current environment. After the camera sends the initial data set to the SOC, the processor set on the SOC processes the initial data set to obtain the photosensitivity data.

[0090] For example, the mapping relationship curve between the initial data of ambient light and the photosensitive data can be obtained by performing curve fitting after obtaining test data under known illumination conditions. After the curve is fitted, the collected initial data set is substituted into the fitted curve to obtain the photosensitive data.

[0091] When the dual-working mode camera does not enable the camera mode, the dual-working mode camera can be in the ambient light mode, that is, the dual-working mode camera can collect an initial data set of the ambient light in the environment and transmit the initial data set to the SOC to obtain photosensitive data.

[0092] 7. A+G sensor

[0093] Refers to a combined sensor of an accelerometer and a gyroscope, which is usually used in electronic devices. Among them, an accelerometer is a sensor used to measure acceleration, which can detect the tilt and rotation angle of an electronic device; a gyroscope is a sensor used to measure angular velocity, which can detect the rotation and direction change of an electronic device. Through the A+G sensor, the acceleration and angular velocity of an electronic device can be measured simultaneously, thereby obtaining the motion state information of the electronic device.

[0094] 8. Other terms

[0095] In the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects. For example, the first chip and the second chip are only used to distinguish different chips, and their order is not limited. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.

[0096] It should be noted that in the embodiments of the present application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplarily" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.

[0097] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, a--c, bc, or abc, where a, b, c can be single or multiple.

[0098] 9. Electronic devices

[0099] The electronic devices of the embodiments of the present application may include handheld devices, vehicle-mounted devices, etc. with face recognition functions. For example, some electronic devices are: mobile phones, tablet computers, PDAs, laptop computers, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to wireless modems, vehicle-mounted devices, wearable devices, terminal devices in 5G networks or future evolved public land mobile communication networks (PLANs), and wireless terminals in smart cities. The embodiments of the present application do not limit this.

[0100] As an example but not limitation, in the embodiments of the present application, the electronic device may also be a wearable device. Wearable devices may also be referred to as wearable smart devices, which are a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also powerful functions achieved through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include full-featured, large-sized, and fully or partially independent of smartphones, such as smart watches or smart glasses, as well as devices that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various types of smart bracelets and smart jewelry for vital sign monitoring.

[0101] In addition, in the embodiments of the present application, the electronic device can also be a terminal device in the Internet of Things (IoT) system. IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network that interconnects people and machines and things.

[0102] The electronic devices in the embodiments of the present application may also be referred to as: terminal equipment, user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent or user device, etc.

[0103] In an embodiment of the present application, the electronic device or each network device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and a memory (also called main memory). The operating system can be any one or more computer operating systems that implement business processing through processes, such as Linux operating system, Unix operating system, Android operating system, iOS operating system, or Windows operating system. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software.

[0104] When an electronic device is in a call scenario, in order to prevent accidental touches from causing call interruptions, the electronic device usually enters an anti-accidental touch state. For example, when the electronic device detects that a human body is approaching the electronic device, the electronic device can prevent the electronic device from executing the screen touch logic by turning off the screen.

[0105] It is understandable that when an electronic device enters the anti-mistouch state, such as when the screen of the electronic device is turned off, the electronic device does not execute the screen touch logic. That is, the screen of the electronic device will not respond to any touch input. For example, when a user places a mobile phone near the face or ear, if the user accidentally touches the screen, the mobile phone will not execute processes such as hanging up the call, opening the application or sending a message.

[0106] For example, in combination Figure 2 In the first application scenario, the electronic device establishes a voice call by dialing or answering an incoming call 1. When the electronic device detects that the distance between the human body and the electronic device is far, the electronic device can display Figure 2 When the electronic device detects that the distance between the human body and the electronic device is close, the electronic device can switch from interface (a) to interface (d), that is, the electronic device can turn off the screen.

[0107] It should be understood that, in addition to Figure 2 During the call process shown in the interface (a) in FIG. 1 , when the electronic device initiates the call as the calling end but the call has not been successfully established, the electronic device can also enter the anti-mistouch state. For the sake of simplicity, they are not shown one by one here.

[0108] In the second application scenario, when the electronic device establishes a voice call 2 with a friend through a social application 1, when the electronic device detects that the distance between the human body and the electronic device is far, the electronic device can display Figure 2 When the electronic device detects that the distance between the human body and the electronic device is close, the electronic device can switch from interface (b) to interface (d), that is, the electronic device can turn off the screen.

[0109] In the third application scenario, the electronic device displays Figure 2 Interface (c) in the figure can be understood as the chat interface of social application 2. A voice message is displayed in interface (c). In response to the user's operation of playing the voice message, the electronic device can play the voice message. In the process of the electronic device playing the voice message, when the electronic device detects that the distance between the human body and the electronic device is far, the electronic device plays the voice message normally, that is, the voice message is played in interface (c); when the electronic device detects that the distance between the human body and the electronic device is close, the electronic device can switch from interface (c) to interface (d), that is, the electronic device can turn off the screen.

[0110] In the several application scenarios shown above, the electronic device can determine whether the human body is close to the electronic device based on the proximity sensor. If the proximity sensor determines that the human body is close to the electronic device, the electronic device can enter the false touch prevention state; if the proximity sensor determines that the human body is far away from the electronic device, the electronic device can return to the normal state.

[0111] Combine the following Figure 3 , describes the process of an electronic device determining whether to enter an anti-mistouch state in a call scenario.

[0112] It should be noted that the electronic device may include a processor and a proximity sensor. The processor is, for example, Figure 1 The SOC shown in the figure, the proximity sensor can be Figure 1 The proximity sensor shown in FIG. That is, an EINT is provided between the processor and the proximity sensor.

[0113] Among them, no matter whether the electronic device is in a call scene or not, the proximity sensor can continuously detect the distance between the electronic device and an object (such as a human body).

[0114] Figure 3 3 is a flow chart of a screen control method 300. The method 300 includes the following steps, wherein S301 to S306 are steps of performing logic judgment for preventing accidental touches by the electronic device.

[0115] S301: The processor determines whether a call scene has been entered.

[0116] The call scenario may be, for example, the first application scenario, the second application scenario, or the third application scenario shown above.

[0117] S302: The processor sets the interrupt priority of the proximity sensor from priority 1 to priority 2.

[0118] Among them, priority 2 is higher than priority 1. The interrupt priority is the priority of the processor in processing the interrupt signal. In the case where the processor increases the interrupt priority of the proximity sensor, the processor can preferentially process the interrupt signal from the proximity sensor.

[0119] S303 , at time 1 , the proximity sensor determines that the distance between the human body and the electronic device is less than or equal to a preset threshold 3 .

[0120] The preset threshold value 3 may be indicated by the processor to the proximity sensor, or may be a value preset in the proximity sensor. The preset threshold value 3 may be, for example, 5 cm, 3 cm, etc.

[0121] S304 : Based on the distance between the human body and the electronic device being less than or equal to a preset threshold value 3 , the proximity sensor transmits an interrupt signal 1 to the processor via EINT.

[0122] S305. Based on the interrupt signal 1, the processor instructs the screen of the electronic device to turn off, that is, to enter an anti-mistouch state.

[0123] S306 . At time 2 after time 1 , the proximity sensor determines that the distance between the human body and the electronic device is greater than a preset threshold 3 .

[0124] S307 . The proximity sensor transmits an interrupt signal 2 to the processor via EINT.

[0125] S307: Based on the interrupt signal 2, the processor instructs the screen of the electronic device to turn on, that is, to return to a normal state.

[0126] Through method 300, the electronic device can enter an anti-mistouch state after entering a call scene and when a human body is close to the electronic device, to prevent the user from accidentally touching the screen and causing an abnormal interruption of the call.

[0127] However, method 300 detects the distance between the electronic device and the human body through a proximity sensor. In a call scenario, the user will bring the screen side of the electronic device close to the face or ear. In order to detect the distance between the electronic device and the human body, the proximity sensor is usually installed on the screen side of the electronic device.

[0128] For example, Figure 4 As shown, the proximity sensor is usually installed at position 1 and position 2 of the electronic device. Position 1 may be around the camera of the electronic device; position 2 may be the top of the screen of the electronic device.

[0129] However, no matter where the proximity sensor is installed on the screen, the following problems exist:

[0130] Question 1: The proximity sensor will occupy the display area of ​​the screen, reduce the screen-to-body ratio, and affect the user's visual experience.

[0131] Problem 2: Electronic devices need to be equipped with additional hardware modules, such as the sensor itself and its related supporting circuits and wiring, etc. This increases the manufacturing cost and design complexity of electronic devices.

[0132] Question 3: Proximity sensors are mainly used in call scenarios and are rarely used in other scenarios, resulting in a waste of resources.

[0133] In order to solve the above technical problems, the present application provides a screen control method. When the electronic device is about to enter or enters a call scene, the front camera continuously acquires the front-camera light-sensing data, and the rear camera continuously acquires the rear-camera light-sensing data, and judges whether the human body is close to the electronic device based on the relative size and change trend of the front-camera light-sensing data and the rear-camera light-sensing data. In this way, the electronic device can be equipped with no proximity sensor, so that the screen ratio of the electronic device is larger, and the user experience is improved. It also helps to reduce the manufacturing cost of the electronic device.

[0134] Figure 5 Schematic diagram of the structure of the electronic device 500 provided in the embodiment of the present application. Figure 5 As shown, the electronic device 500 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0135] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 500. In other embodiments of the present application, the electronic device 500 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0136] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP) and a coprocessor (CP). The application processor includes an application framework layer, a hardware abstraction layer, a kernel layer, etc. of the software architecture adopted by the electronic device 500; the coprocessor includes a sensor hub, etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0137] In some embodiments, the electronic device 500 may include 1 or N cameras 193 , where N is a positive integer greater than 1. Exemplarily, the electronic device 500 may include a front camera (also referred to as a front-facing camera) and a rear camera (also referred to as a rear-facing camera).

[0138] The front camera and the rear camera of the electronic device 500 may both be dual-working mode cameras. The processor 110 may obtain an initial data set 1 collected by the front camera and an initial data set 2 collected by the rear camera. The initial data set 1 and the initial data set 2 may be in RAW format and are used to indicate the intensity of the light signal. The processor 110 may determine the photosensitive data corresponding to the front camera based on the initial data set 1; and may determine the photosensitive data corresponding to the rear camera based on the initial data set 2.

[0139] It should be understood that for the sake of ease of description, the photosensitive data corresponding to the front camera is referred to as front-camera photosensitive data, and the photosensitive data corresponding to the rear camera is referred to as rear-camera photosensitive data, which will not be elaborated on below.

[0140] Based on the above embodiment, the processor 110 can determine whether a human body is close to the electronic device 500 in the following manner: when the processor 110 determines that a call scene is about to be entered, the front camera and the rear camera (camera 193) can be powered on through the power management module 141, so that the front camera collects initial data set 1 and the rear camera collects initial data set 2; when the processor 110 determines that a call scene is entered, the processor 110 can obtain initial data set 1 and initial data set 2, and then determine the front camera light-sensitive data based on the initial data set 1, and determine the rear camera light-sensitive data based on the initial data set 2; thereby, the processor 110 can determine whether the human body is close to the electronic device 500 based on the front camera light-sensitive data and the rear camera light-sensitive data.

[0141] The display screen 194 can be used to display a variety of interfaces, such as Figure 2When the processor 110 determines that the human body is close to the electronic device 500 (for example, the distance between the human body and the electronic device 500 is less than the preset threshold 4), the processor 110 can control the display screen 194 not to execute the screen touch logic, that is, when the user touches the display screen 194, the electronic device does not provide feedback.

[0142] The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 500. The internal memory 121 may be used to store computer executable program codes, which include instructions.

[0143] Figure 6 It is a schematic diagram of the architecture (including software system and some hardware) of the embodiment of the present application. Figure 6 As shown, the application architecture is divided into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the application architecture can be divided into six layers, from top to bottom, namely, the application layer, the application framework layer, the system service layer, the hardware abstraction layer, the kernel layer, and the hardware layer.

[0144] To facilitate understanding, the following explains the various layers of the application architecture and the terms involved.

[0145] 1. The application layer may include applications such as call and social applications. Among them, the call application at least supports the functions of making, answering and hanging up calls; the social application supports receiving and playing voice messages, and establishing voice calls.

[0146] Exemplarily, for a call application, when an electronic device displays the interface of the call application (such as a dialing interface, etc.) and the electronic device has not established a call, it can be understood that the electronic device is about to enter a call scenario, and the electronic device has not established a call means that the user has not dialed through the electronic device, has not successfully established a call, and has not received a call from the other party. In the case where the electronic device establishes a call, it can be understood that the electronic device enters a call scenario. Establishing a call includes: the electronic device has dialed and the call has not been successfully established or the electronic device has successfully established a call (for example, displaying Figure 2 The interface in (a)).

[0147] For a social application, the social application is run in the foreground of the electronic device, and the interface of the social application is displayed on the electronic device (for example, Figure 2Interface (c) in the figure), and the electronic device has not established a voice call or played a voice message, it can be understood that the electronic device is about to enter a call scene. The electronic device has not established a voice call, which means that the user has not initiated a voice call request to a friend through the electronic device, has not successfully established a voice call, and has not received a voice call request from a friend. The electronic device has not played a voice message, which means that when the electronic device displays the interface of a social application with a voice message, the user has not clicked the play button of the voice message. When the electronic device establishes a voice call or plays a voice message, it can be understood that the electronic device enters a call scene.

[0148] Establishing a voice call includes: the electronic device has initiated a voice call in the social application and the voice call has not been successfully established, or the electronic device has successfully established a voice call (for example, display Figure 2 interface (b)).

[0149] Playing the voice message includes: when the electronic device displays the interface of the social application containing the voice message, the user clicks the play button of the voice message.

[0150] 2. The application framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. Figure 6 As shown, the application framework layer may include an anti-mistouch module, a telephony manager, an activity manager, a power manager, an input manager, a camera API, and a window manager, etc.

[0151] Among them, the phone manager is used to provide communication functions of the electronic device. For example, the management of call status (including connecting, hanging up, etc.). The activity manager is responsible for managing the life cycle of the application, which may specifically include starting, pausing, resuming and destroying the activities of the application. For example, in a call scenario, the activity manager ensures that the call application or social application is in the foreground active state and prevents other applications from interfering with the call.

[0152] The power manager is used to manage the power state of the electronic device. For example, the power manager can manage the power on and off of the screen to turn the screen on or off, or the power manager can manage the power on and off of the camera.

[0153] The input manager is used to manage input events of the electronic device, wherein the input events include touch screen operations or key presses and releases, etc. Exemplarily, when the input manager receives an instruction not to process input events, the input manager shields input events of touch screen operations.

[0154] The camera API is used to provide camera interfaces related to the camera, such as interfaces for powering on, powering off, or data collection.

[0155] The window manager is used to manage the screen status of the electronic device and provide interfaces for window management and screen control. For example, the screen switch status can be controlled by calling the interface provided by the window manager, and the screen can be turned on and off.

[0156] The anti-accidental touch module is responsible for managing the process of preventing accidental touches of electronic devices. Specifically, it may include the following functions:

[0157] (1) Determine whether the electronic device is about to enter or has entered a call scene. Optionally, the anti-mistouch module can determine whether the electronic device has entered a call scene by monitoring the phone status changes of the call manager; or monitor the activity manager to obtain the foreground and background switching status of the application, and determine whether the call application is in the foreground to determine whether the electronic device has entered a call scene.

[0158] (2) Instructing the camera to power on. Optionally, when it is determined that the electronic device is about to enter or has entered a call scene, the camera service is instructed to power on.

[0159] (3) Requesting data collection, for example, after receiving a notification that the camera has been powered on, instructing the camera service to collect data.

[0160] (4) Determine whether a human body is close to an electronic device. Specifically, the anti-mistouch module can determine whether a human body is close to an electronic device based on data collected by a camera.

[0161] (5) Control input and screen status. For example, when a person is detected approaching the electronic device, the input manager is instructed to shield the input events of the touch screen operation, or the power manager is instructed to turn off the screen; when a person is detected moving away from the electronic device, the normal state is restored.

[0162] (6) Exit the call scene. When it is detected that the call scene is being exited, the camera is instructed to power off.

[0163] 3. The system service layer includes camera services and power management services.

[0164] The camera service is used to manage the power-on and power-off operations of the camera to ensure that the electronic device can call the camera in a call scenario. The power management service is used to control the brightness, off, and wake-up operations of the screen to ensure that the screen is turned on and off in a call scenario. Specifically, when the power management service receives a screen-off instruction from the window manager, the screen is turned off by powering off the screen.

[0165] 4. The hardware abstraction layer (HAL Layer) mainly serves to connect the application framework layer and the kernel layer. HAL can include camera HAL and screen HAL. Among them, camera HAL provides hardware support for camera service to control the camera. For example, the camera service sends a power-on request through the camera HAL interface to notify the camera driver to power on the camera.

[0166] In addition, the screen HAL provides hardware support for the power management service. For example, the power management service sends a screen-off request through the screen HAL.

[0167] 5. The kernel layer is a layer between hardware and software. In an exemplary embodiment, the kernel layer includes a camera driver and a screen driver. For example, the camera driver can directly interact with the camera to control the power state of the camera, or control the camera to collect initial data set 1 and initial data set 2. The screen driver directly interacts with the screen to control the power state of the screen to realize the screen on or off operation.

[0168] 6. The hardware layer can include a variety of hardware, such as cameras, screens, etc.

[0169] Combination Figure 6 According to the software architecture shown, the electronic device can implement the screen control method in the call scenario in the following manner, for example.

[0170] S1. The anti-mistouch module determines that a call scene is about to be entered or a call scene is entered;

[0171] Exemplarily, the anti-mistake touch module can register a listener with the activity manager, so when the anti-mistake touch module determines that a call application or a social application is running in the foreground of the electronic device, it can be determined that a call scene is about to enter; and / or, the anti-mistake touch module can obtain the real-time display interface of the electronic device, and when the electronic device displays the interface of the call application or the interface of the social application, it can be determined that a call scene is about to enter.

[0172] Alternatively, the false touch prevention module may also register for monitoring with the telephone manager, and when the false touch prevention module determines that a call is currently being established based on the telephone manager, it may determine that a call scene has been entered.

[0173] Alternatively, the anti-false touch module can determine that the call scene has been entered when it determines that the electronic device displays the interface of a call application and determines through the input manager that the electronic device receives an operation of the user clicking a button for answering a call. The anti-false touch module can determine that the call scene has been entered when it determines that the electronic device displays the interface of a call application and determines through the input manager that the electronic device receives an operation of the user clicking a button for dialing a call. The anti-false touch module can determine that the call scene has been entered when it determines that the electronic device displays the interface of a social application and determines through the input manager that the electronic device receives an operation of the user clicking a button for playing a voice message. The anti-false touch module can determine that the call scene has been entered when it determines that the electronic device displays the interface of a social application and determines through the input manager that the electronic device receives an operation of the user clicking a button for answering a voice call, or determines that the electronic device receives an operation of the user clicking a button for initiating a voice call.

[0174] It should be understood that the above-mentioned method of the anti-mistaken touch module judging whether a call scene is about to be entered or has been entered is only an example, and the anti-mistaken touch module can also judge in other ways. For the sake of brevity, they are not shown one by one here.

[0175] S2, the anti-mistaken touch module instructs the camera service to power on;

[0176] S3: The camera service requests the power management service to power on the front camera and the rear camera.

[0177] S4, the power management service instructs the camera service to power on the front camera and the rear camera;

[0178] S5, the camera service indicates a power-on request to the camera HAL;

[0179] S6. Based on the power-on request, the camera HAL powers on the front camera and the rear camera through the camera driver;

[0180] S7, after the camera is powered on, the camera HAL indicates to the anti-false touch module that the camera is powered on through the camera service;

[0181] S8, when the anti-mistouch module determines that a call scene has been entered, it indicates a data collection request to the camera service;

[0182] S9, the camera service instructs the camera driver to collect data by calling the camera HAL;

[0183] S10, the camera driver controls the front camera to collect initial data set 1, and controls the rear camera to collect initial data set 2;

[0184] S11, the camera driver sends the initial data set 1 and the initial data set 2 to the camera HAL;

[0185] S12, the camera HAL transmits the initial data set 1 and the initial data set 2 to the anti-false touch module through the camera service;

[0186] S13, the anti-mistaken touch module determines the front camera light sensing data based on the initial data set 1; and determines the rear camera light sensing data based on the initial data set 2;

[0187] S14, the false touch prevention module determines whether a human body is close to the electronic device based on the front-camera light-sensing data and the rear-camera light-sensing data;

[0188] S15. When it is determined that a human body is close to the electronic device, the anti-mistaken touch module instructs the input manager not to execute the screen touch logic; or, the anti-mistaken touch module instructs the power manager to turn off the screen.

[0189] It can be understood that in a call scenario, S10 to S13 are continuously and cyclically executed.

[0190] Optionally, after S15, if the anti-mistouch module determines that the human body is away from the electronic device, the electronic device can also return to a normal state. That is, the screen control method further includes:

[0191] S16, the camera HAL transmits the new initial data set 1 and the new initial data set 2 to the false touch prevention module through the camera service;

[0192] S17, the anti-mistaken touch module determines new front-camera light-sensing data based on the new initial data set 1; and determines new rear-camera light-sensing data based on the initial data set 2;

[0193] S18, judging whether a human body is close to the electronic device based on the new front-camera light-sensing data and the new rear-camera light-sensing data;

[0194] S19: When it is determined that the human body is away from the electronic device, instruct the input manager to execute the screen touch logic; or instruct the power manager to turn on the screen.

[0195] Optionally, after S15 or after S19, if the anti-mistaken touch module determines that the electronic device is no longer in a call scene, the anti-mistaken touch module can instruct the camera to power off. That is, the screen control method further includes:

[0196] S20, the anti-mistouch module determines to exit the call scene;

[0197] S21, the anti-mistaken touch module instructs the camera service to power off;

[0198] S22, the camera service requests the power management service to power off the front camera and the rear camera;

[0199] S23, the power management service instructs the camera service to power off the front camera and the rear camera;

[0200] S24, the camera service indicates a power-off request to the camera HAL;

[0201] S25. Based on the power-off request, the camera HAL powers off the front camera and the rear camera through the camera driver;

[0202] S26: After the camera is powered off, the camera HAL indicates to the anti-false touch module through the camera service that the camera is powered off.

[0203] The following specific embodiments are used to describe the method of the present application in detail. The following embodiments may be combined with each other or implemented independently, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0204] In combination with the above embodiments, it can be understood that the electronic device can determine whether the human body is close to the electronic device based on the forward-photosensitive data and the rear-photosensitive data. As the scene in which the electronic device is located is different, the change trend of the forward-photosensitive data and the rear-photosensitive data obtained by the electronic device is different. Therefore, as the scene in which the electronic device is located is different, it is possible to determine whether the human body is close to the electronic device in different ways, and then set the electronic device to switch from the normal state to the anti-mistaken touch state or from the anti-mistaken touch state to the normal state. The details are as follows.

[0205] In the first scenario, the electronic device is placed face up in a light environment. The electronic device can determine whether a human body is close to the electronic device by the first method (method 800), and then set the electronic device to switch from a normal state to an anti-mistake touch state or from an anti-mistake touch state to a normal state.

[0206] In the second scenario, the electronic device is placed with its back facing up in a light environment. The electronic device can determine whether a human body is close to the electronic device by the second method (method 1100), and then set the electronic device to switch from a normal state to an anti-mistake touch state or from an anti-mistake touch state to a normal state.

[0207] In the third scenario, the electronic device is placed in an environment without light source. The electronic device can determine whether a human body is close to the electronic device by a third method (method 1300), and then set the electronic device to switch from a normal state to an anti-mistake touch state or from an anti-mistake touch state to a normal state.

[0208] In the fourth scenario, the front and rear cameras of the electronic device are not blocked, and the electronic device can determine whether a human body is close to the electronic device by the fourth method (method 1500), and then set the electronic device to switch from a normal state to an anti-mistake touch state or from an anti-mistake touch state to a normal state.

[0209] Therefore, in order to enable the electronic device to more accurately determine whether the human body is close to the electronic device, when the electronic device is about to enter or enters a call scene, the scene of the electronic device can be determined first, and then whether the human body is close to the electronic device can be determined based on the method corresponding to the scene of the electronic device.

[0210] It should be understood that the change trends of the electronic device's forward-viewing light-sensing data and the rear-viewing light-sensing data will be different depending on the placement of the electronic device or the light source of the electronic device's environment. Therefore, the scene where the electronic device is located can be determined based on the relative size and change trend of the forward-viewing light-sensing data and the rear-viewing light-sensing data, and then whether the human body is close to the electronic device can be determined based on the corresponding method.

[0211] The first scenario

[0212] For ease of understanding, in the first scenario, when the electronic device is about to enter or enters a call scenario, the changing trends of the front-camera light-sensing data and the rear-camera light-sensing data of the electronic device are analyzed.

[0213] In the first scenario, that is, the electronic device is placed face up in a light environment, the changing trends of the front camera light sensing data and the rear camera light sensing data can be shown in Table 1.

[0214] For ease of understanding, the process corresponding to the first scenario is divided into four stages in chronological order from front to back. In different stages, the forward-camera light-sensing data and the rear-camera light-sensing data are different.

[0215] Exemplarily, as shown in Table 1, the four stages are respectively: a stage where the electronic device is placed face up, in which the electronic device can be placed face up on any object and the electronic device can be in a stationary state; a stage where the user is picking up the electronic device; a stage where the user is holding the electronic device and gradually approaching the human body; and a stage where the electronic device is close to the human body.

[0216] Combined with Table 1, when the electronic device is placed face up, the front camera light data of the electronic device is 15lux or 16lux. Since 15lux or 16lux is relatively large, it means that the electronic device is currently in an environment with light. However, since the electronic device is placed face up, the rear camera is close to the object on which the electronic device is placed, and the rear camera light data continues to be 0, indicating that the rear camera is in a completely dark environment.

[0217] It can be understood that when the electronic device is in an environment with light and is placed face up, the front-camera photosensitive data is high and the rear-camera photosensitive data is close to 0; and because the electronic device is almost in a stationary state during the stage when the electronic device is placed face up, the change trends of the front-camera photosensitive data and the rear-camera photosensitive data during the stage when the electronic device is placed face up are stable.

[0218] When the user is picking up the electronic device, the human body has not yet blocked the light source of the front camera, so the front camera light sensitivity data does not change much; and because the electronic device switches from the face-up state to the picked-up state, the rear camera is gradually exposed to the light source, and the rear camera light sensitivity data gradually increases. The rear camera light sensitivity data are 8lux, 13lux and 15lux respectively.

[0219] When the electronic device gradually approaches the human body, the front camera light source is blocked by the human body, causing the front camera light data to drop significantly (from 14-15lux to 3-4lux), indicating that the light intensity detected by the front camera is greatly reduced. However, since the human body does not block the light source of the rear camera, the rear camera light data is stable and is between 15-19lux, which means that the light intensity detected by the rear camera is higher.

[0220] When the electronic device is close to the human body, the front camera is blocked by the human body, making the front camera light data 0. However, when the electronic device is close to the human body, the rear camera light data is still maintained at 16-17 lux, that is, the rear camera still detects a higher light intensity.

[0221] Table 1

[0222]

[0223]

[0224] Optionally, the electronic device may also convert the acquired front-camera photosensitive data and rear-camera photosensitive data (such as the photosensitive data in Table 1) into the following Figure 7 The photosensitive data curve shown can be combined with the photosensitive data curve to determine the change trend and relative size of the front-camera photosensitive data and the rear-camera photosensitive data.

[0225] like Figure 7 As shown, the horizontal axis of the figure represents time, and the vertical axis represents the value of the photosensitive data.

[0226] Wherein, curve 701 may be a forward-viewing light-sensing data curve, which may be drawn based on a plurality of forward-viewing light-sensing data; curve 702 may be a rear-viewing light-sensing data curve, which may be drawn based on a plurality of rear-viewing light-sensing data. For ease of description, in the figure, time is divided into time period 1, time period 2, time period 3 and time period 4 in chronological order.

[0227] Moreover, according to the sequence of each time period, curve 701 and curve 702 can also be divided into: the stage where the electronic device is placed face up (corresponding to time period 1), the stage where the user is picking up the electronic device (corresponding to time period 2), the stage where the user holds the electronic device and gradually approaches the human body (corresponding to time period 3), and the stage where the electronic device is close to the human body (corresponding to time period 4).

[0228] from Figure 7 It can be seen that when the electronic device is placed face up, the front camera light-sensitive data is much larger than the rear camera light-sensitive data, and the rear camera light-sensitive data is 0; when the user is picking up the electronic device, the rear camera light-sensitive data gradually increases to a value close to the front camera light-sensitive data; when the user holds the electronic device and gradually approaches the human body, the front camera light-sensitive data drops sharply and the rear camera light-sensitive data tends to stabilize; when the electronic device is close to the human body, the rear camera light-sensitive data is much larger than the front camera light-sensitive data, and the front camera light-sensitive data is 0.

[0229] Based on the above analysis process, the screen control method 800 provided in the embodiment of the present application can be applied to the first scenario.

[0230] For example, Figure 8 800 is a flowchart of a screen control method 800 provided in an embodiment of the present application. The method 800 may be executed by the processor 110, for example, Figure 6 The anti-false touch module shown is executed. Figure 8 As shown, the method 800 includes the following steps:

[0231] S801. Based on establishing a call through a call application, or based on playing a voice message or establishing a voice call through a social application, the processor 110 obtains front-camera light-sensing data and rear-camera light-sensing data.

[0232] Among them, establishing a call, playing a voice message through a social application, or establishing a voice call can be understood as the electronic device entering a call scene, and the processor 110 can continuously obtain the front-camera light-sensing data and the rear-camera light-sensing data.

[0233] It should be understood that the front-camera light-sensing data may be light-sensing data determined by data collected by the front camera, and the rear-camera light-sensing data may be light-sensing data determined by data collected by the rear camera. Therefore, in order to obtain light-sensing data, the front camera and the rear camera may both be dual-working mode cameras. When the electronic device is about to enter a call scene or has entered a call scene, the processor 110 controls the front camera and the rear camera to be in an ambient light mode, so as to obtain light-sensing data through the data collected by the front camera and the rear camera.

[0234] Taking a camera as an example, the processor 110 may determine the light-sensing data corresponding to the camera in the following manner, for example.

[0235] For example, Fig. 9 Schematic diagram of pixels of a dual working mode camera provided in an embodiment of the present application. Fig. 9 As shown, among all the pixels of the dual-working mode camera, there are perception image pixels and light-sensitive + perception image pixels, and the light-sensitive + perception image pixels are evenly distributed among all the pixels. When the dual-working mode camera is in ambient light mode, the processor 110 obtains an initial data set collected by the light-sensitive + perception image pixels, and determines the light-sensitive data based on the initial data set.

[0236] Exemplarily, the processor 110 may preset a conversion relationship between the initial data set (RAW format) and the photosensitive data (in lux), such as a conversion curve or a conversion formula, etc. Thus, in a call scenario, the processor 110 may convert the initial data set obtained from the camera into photosensitive data in lux format based on the conversion relationship.

[0237] It should be understood that the processor 110 can obtain the front-camera light-sensing data corresponding to the front camera and the rear-camera light-sensing data corresponding to the rear camera in the above manner.

[0238] Alternatively, the processor 110 may also generate a light-sensing data curve based on the forward light-sensing data and the rearward light-sensing data, so that the processor 110 can determine whether the human body is close to the electronic device based on the acquired forward light-sensing data and the rearward light-sensing data, or based on the light-sensing data curve.

[0239] S802: The processor 110 determines that the front-camera light-sensing data is N times greater than the rear-camera light-sensing data within a first preset time period, and the rear-camera light-sensing data is less than a threshold value 1.

[0240] The first preset time length, N and threshold 1 are preset values. For example, the first preset time length may be 1 millisecond, N may be 2, and threshold 1 may be 5 lux.

[0241] It should be understood that the forward light sensing data is N times greater than the rearward light sensing data, for example, that within the first preset time period, the average value of the forward light sensing data is greater than the average value of the rearward light sensing data. The rearward light sensing data is less than threshold 1, which means that the average value of the rearward light sensing data is less than threshold 1.

[0242] Optionally, S802 may also be replaced by: the processor 110 determines that at time a, the front-camera light-sensing data is greater than N times the rear-camera light-sensing data, and the rear-camera light-sensing data is less than a threshold value 1.

[0243] Combination Figure 7As shown, the first preset duration may be a duration in time period 1. Alternatively, it can be understood that the processor 110 detects in time period 1 that the front-view light sensing data is greater than N times the rear-view light sensing data and the rear-view light sensing data is less than threshold 1 within the first preset duration.

[0244] Within the first preset time period, if the processor 110 determines that the front camera light sensitive data is N times greater than the rear camera light sensitive data, and the rear camera light sensitive data is less than the threshold 1, it means that within the first preset time period, the front camera of the electronic device detects that it is currently in an environment with light source (i.e., the front camera light sensitive data is larger), while the rear camera detects that it is currently in a very dark environment or is blocked (i.e., the rear camera light sensitive data is smaller), which corresponds to the size and change trend of the front camera light sensitive data and the rear camera light sensitive data in the stage where the electronic device is placed face up in the first scenario.

[0245] Therefore, the fact that the front-camera light-sensing data is N times greater than the rear-camera light-sensing data and the rear-camera light-sensing data is less than a threshold value 1 may indicate that the electronic device is placed face up on any object in an environment with a light source.

[0246] It is understandable that the processor 110 may be in the stage where the electronic device is placed face up in the first scenario, for example Figure 7 In time period 1, it is detected that the forward-camera light-sensing data is greater than N times the rear-camera light-sensing data within the first preset time period and the rear-camera light-sensing data is less than threshold 1.

[0247] S803: The processor 110 determines whether there is any increase in the rear-camera light-sensing data within a second preset time period that is greater than a threshold value 2.

[0248] If the increase in the rear-camera light-sensing data within the second preset time period is greater than the threshold 2, the processor 110 executes S804;

[0249] If there is no increase in the rear-camera light-sensing data within the second preset time period that is greater than the threshold 2, the processor 110 executes S801.

[0250] Among them, the second preset time length and threshold 2 are preset values. For example, the second preset time length may be 1 millisecond, and threshold 2 may be 2lux. Whether there is an increase in the rear-camera light-sensing data within the second preset time length that is greater than threshold 2 can also be understood as: determining whether there is a period of time (the second preset time length) and the increase in the rear-camera light-sensing data within the period of time is greater than threshold 2.

[0251] Alternatively, S803 may also be replaced by: the processor 110 determines whether there is a second preset time length, the rear-camera light-sensing data shows an increasing trend within the second preset time length, and the increased rear-camera light-sensing data is greater than the threshold a. The increased rear-camera light-sensing data may be the last rear-camera light-sensing data in the second preset time length, or may be the average of the last few rear-camera light-sensing data.

[0252] Alternatively, S803 may also be replaced by: the processor 110 determines whether there is a second preset time period, and the rear-camera light-sensing data shows an increasing trend within the second preset time period.

[0253] In addition, it should be noted that if the electronic device is in the stage where the user is picking up the electronic device, the change in the front-camera light-sensitive data is small. Therefore, if the increase in the rear-camera light-sensitive data within the second preset time is greater than threshold 2, the processor 110 executes S804, which can be replaced by: if the increase in the rear-camera light-sensitive data within the second preset time is greater than threshold 2, and the change in the front-camera light-sensitive data is less than threshold a, the processor executes S804. Otherwise, the processor 110 executes S801.

[0254] Combination Figure 7 As shown, the second preset duration may be a duration in time period 2. Alternatively, it can be understood that the processor 110 detects in time period 2 that the increase in the rear-camera light-sensing data within the second preset duration is greater than threshold 2.

[0255] Taking the second preset time length as 1 millisecond and the threshold 2 as 2lux as an example, if the processor 110 detects that the increase in the rear-camera light-sensing data within 1 millisecond is greater than 2lux, it means that the rear camera is changing from being in a very dark environment or being blocked to a light environment (that is, the rear-camera light-sensing data changes from a small value to a large value), which corresponds to the size and change trend of the front-camera light-sensing data and the rear-camera light-sensing data in the first scenario when the user is picking up the electronic device. Therefore, the increase in the rear-camera light-sensing data greater than the threshold 2 can indicate that the electronic device is in the process of being picked up by the user.

[0256] It is understandable that the processor 110 may be in the stage where the user is picking up the electronic device in the first scenario, for example Figure 7 In time period 2, it is detected that the increase in rear-camera light-sensing data within the second preset time period is greater than threshold 2.

[0257] In addition, the photosensitive data curve can also reflect the degree of change of the front-camera photosensitive data and the rear-camera photosensitive data within a certain period of time.

[0258] For example, in Figure 7 In the schematic diagram of the photosensitive data curve shown, the horizontal axis represents time, and the vertical axis represents the value of the photosensitive data. The slope of the photosensitive data curve can represent the rate of change of the photosensitive data over time. That is, the larger the slope, the faster the rate of change of the photosensitive data over time. Therefore, in another implementation, the processor 110 can also determine whether the electronic device is in the process of being picked up by the user based on the slope of the photosensitive data curve.

[0259] For example, Figure 7As shown, if in time period 2, the slope of the rear-camera light-sensitive data curve within a second preset time period is greater than threshold 3, it can be understood that the electronic device is currently in the stage where the user is picking up the electronic device.

[0260] The threshold 3 is a preset value, for example, 0.5, etc. The slope of the rear-camera light-sensing data curve within the second preset time period may be an approximate value calculated by the processor 110 based on the rear-camera light-sensing data within the second preset time period.

[0261] Optionally, in order to increase the accuracy of the judgment, the processor 110 may also obtain data measured by the A+G sensor, and determine the motion state of the electronic device based on the data obtained from the A+G sensor. For example, in time period 2, the processor 110 determines that the electronic device is in motion based on the data obtained from the A+G sensor, and determines that the increase in the rear-camera light-sensing data within the second preset time period is greater than the threshold 2, then the processor 110 may determine that the electronic device is currently in the stage where the user is picking up the electronic device.

[0262] On the other hand, if the processor 110 determines that there is no increase in the rear-camera light-sensitive data greater than the threshold 2 within the second preset time period, the processor 110 continues to loop S801 and the steps after S801, that is, continues to acquire new front-camera light-sensitive data and new rear-camera light-sensitive data, and continues to determine whether the user has picked up the electronic device based on the new front-camera light-sensitive data and the new rear-camera light-sensitive data.

[0263] It should be understood that in order to achieve the electronic device entering the false touch prevention state when the human body approaches the electronic device in the call scenario, it is necessary to continuously determine whether the human body is close to the electronic device based on the front-camera light-sensing data and the rear-camera light-sensing data. Therefore, when the electronic device is about to enter the call scenario or enters the call scenario, the processor 110 can continuously obtain the front-camera light-sensing data and the rear-camera light-sensing data until the call ends, the voice message ends, or the voice call ends.

[0264] S804, the processor 110 determines whether there is a third preset time length, within which the forward-viewing light-sensing data shows a decreasing trend and the reduced forward-viewing light-sensing data is less than a threshold value 5, and within which the rear-viewing light-sensing data tends to be stable (the change is less than a threshold value b).

[0265] If the third preset time period exists, the processor 110 executes S805, that is, the processor 110 sets the electronic device to enter the false touch prevention state.

[0266] If the third preset time does not exist, the processor 110 executes S804 in a loop, that is, the processor 110 continues to obtain new front-camera light-sensing data and new rear-camera light-sensing data, and determines whether to set the electronic device to enter the anti-mistouch state based on the new front-camera light-sensing data and the new rear-camera light-sensing data.

[0267] Optionally, the decreasing trend of the proactive light-sensing data can also be understood as the decrease in the proactive light-sensing data within the third preset time period is greater than a threshold value 4.

[0268] The reduced forward-viewing light-sensitive data may be light-sensitive data within the third preset time period, for example, the forward-viewing light-sensitive data continues to decrease within the third preset time period, and the reduced forward-viewing light-sensitive data may be the last forward-viewing light-sensitive data within the third preset time period or the average value of the last plurality of forward-viewing light-sensitive data, etc. The reduced forward-viewing light-sensitive data may also be light-sensitive data after the third preset time period, for example, the forward-viewing light-sensitive data continues to decrease within the third preset time period, and after the third preset time period, the forward-viewing light-sensitive data stabilizes at a value, and the one value is the reduced forward-viewing light-sensitive data.

[0269] Combination Figure 7 As shown, the third preset duration may be a duration in time period 3. Alternatively, it can be understood that the processor 110 detects in time period 3 that the reduction in the forward light-sensing data in the third preset duration is greater than threshold 4, and the reduced forward light-sensing data is less than threshold 5.

[0270] The third preset time length, threshold 4 and threshold 5 may be preset values. For example, the third preset time length may be 1 millisecond, threshold 4 may be 2 lux, and threshold 5 may be 5 lux.

[0271] Taking the third preset time length as 1 millisecond, threshold 4 as 2lux, and threshold 5 as 5lux as an example, the processor 110 determines that the reduction in the front camera light-sensing data within 1 millisecond is greater than 2lux, which can be understood as the brightness of the current environment of the front camera is reduced, that is, the electronic device is in the stage where the user is holding the electronic device and gradually approaching the human body. In addition, if the reduced front camera light-sensing data is less than threshold 5, it can be understood that the electronic device has approached the human body, and the processor 110 sets the electronic device to enter the anti-mistouch state.

[0272] It can be understood that through S804, it can be determined that the electronic device is in the stage where the user holds the electronic device and gradually approaches the human body in the first scenario within the third preset time period, and it is determined that the electronic device has approached the human body after the third preset time period, and the processor 110 needs to set the electronic device to enter the anti-mistouch state.

[0273] Optionally, entering the false touch prevention state may be that the processor 110 controls the screen to turn off, or controls the screen to not execute screen touch logic.

[0274] It should be understood that when the processor 110 determines that the third preset time length does not exist, the processor 110 continues to loop S801 and the steps after S801, that is, continues to acquire new forward-camera light-sensitive data and new rear-camera light-sensitive data, and continues to determine whether the electronic device is close to the human body based on the new forward-camera light-sensitive data and the new rear-camera light-sensitive data.

[0275] In another implementation, the processor 110 may also determine whether the electronic device is close to the human body based on the slope of the light-sensitive data curve. For example, if the processor 110 determines that the slope of the forward-photosensitive data curve within the third preset time is less than a threshold value of 6 (e.g., -0.5), it can be understood that the electronic device is in a stage where the user is gradually approaching the human body with the electronic device in hand, and if the forward-photosensitive data after the third preset time is determined to be less than the threshold value of 5, the processor 110 may determine that the electronic device is close to the human body, and the processor 110 sets the electronic device to enter the anti-mistouch state.

[0276] S806. After the electronic device enters the false touch prevention state, the processor 110 determines whether there is a fourth preset time period, and the increase in the front camera light-sensing data within the fourth preset time period exceeds a threshold value 6.

[0277] If the fourth preset time period exists, the processor 110 executes S807, ie, sets the electronic device to return to a normal state.

[0278] Alternatively, after the electronic device enters the false touch prevention state, if the processor 110 determines that the electronic device exits the call scene, for example, the processor 110 determines that the call ends, the voice call ends, or the voice message playback ends, the processor 110 may also execute S807.

[0279] If the fourth preset time duration does not exist, the processor 110 continues to execute S806 in a loop, that is, continues to obtain new forward-camera light-sensing data, and continues to determine whether to set the electronic device to return to a normal state based on the new forward-camera light-sensing data.

[0280] The fourth preset time length and the threshold 6 are preset values. For example, the fourth preset time length may be 1 millisecond, and the threshold 6 may be 2 lux.

[0281] It should be understood that if the increase in the front-camera photosensitive data within the fourth preset time period exceeds the threshold 6, that is, the brightness of the environment in which the front camera is located increases rapidly, it can be understood that the electronic device has left the human body, and the processor 110 sets the electronic device to return to normal state, that is, the processor 110 controls the screen to light up or controls the screen to restore touch feedback.

[0282] Alternatively, S806 may also be replaced by: determining whether there is a fourth preset time period, the front-camera light-sensing data shows an increasing trend within the fourth preset time period, and the increased front-camera light-sensing data is greater than a threshold value c. Moreover, the change amount of the rear-camera light-sensing data within the fourth preset time period may be less than a threshold value d. That is, in this way, the electronic device may also determine that the human body is away from the electronic device.

[0283] It can be understood that the fourth preset time period can be a period after time period 3. If after time period 3, the processor 110 determines that the increase in the forward-viewing light-sensing data within the fourth preset time period exceeds the threshold 6, it can be understood that the electronic device has moved away from the human body after approaching the human body, and the processor 110 sets the electronic device to return to a normal state.

[0284] Alternatively, the fourth preset time period may be a time period after time period 4. If, after time period 4, the processor 110 determines that the increase in the forward-viewing light-sensing data within the fourth preset time period exceeds the threshold value 6, it can be understood that the electronic device moves away from the human body after being close to the human body, and the processor 110 sets the electronic device to return to a normal state.

[0285] In another implementation, it is also possible to determine whether the electronic device has left the human body based on the slope of the light-sensitive data curve. For example, if after time period 3 or time period 4, the slope of the forward-camera light-sensitive data curve within a fourth preset time period is greater than a threshold value 7 (e.g., 0.5), it can be understood that the electronic device is leaving the human body, and the processor 110 sets the electronic device to return to a normal state.

[0286] Second scenario

[0287] In the second scenario, that is, the electronic device is placed with its back facing upward in a light environment, the changing trends of the front-camera light-sensing data and the rear-camera light-sensing data can be shown in Table 2. Similar to the first scenario, the process corresponding to the second scenario is divided into the following stages in chronological order: the stage where the electronic device is placed with its back facing upward; the stage where the user is picking up the electronic device; the stage where the user is holding the electronic device and gradually approaching the human body; and the stage where the electronic device is close to the human body.

[0288] Combined with Table 2, when the electronic device is placed with its back facing upward, the rear camera light sensing data of the electronic device is 24lux or 25lux, indicating that the electronic device is currently in an environment with light. However, since the electronic device is placed with its back facing upward, the front camera is close to the object on which the electronic device is placed, and the front camera light sensing data continues to be 0, indicating that the front camera is in a completely dark environment.

[0289] It can be understood that when the electronic device is in an environment with light and is placed with its back facing upward, the rear-camera photosensitive data is higher and the front-camera photosensitive data is close to 0; and because the electronic device is almost in a stationary state during the stage when the back of the electronic device is placed upward, the change trends of the front-camera photosensitive data and the rear-camera photosensitive data during the stage when the back of the electronic device is placed upward are stable.

[0290] When the user is picking up the electronic device, as the electronic device switches from the back-up position to the picked-up state, the front camera is gradually exposed to the light source, and the front camera light sensitivity data are 13lux, 21lux and 21lux respectively; and as the human body does not block the light source of the rear camera, the rear camera light sensitivity data is stable, and the rear camera light sensitivity data is between 22-23lux.

[0291] It should be understood that the stage in the second scenario where the user holds the electronic device and gradually approaches the human body and the stage where the electronic device is close to the human body are similar to the relative sizes and changing trends of the forward-facing photosensitive data and the rearward-facing photosensitive data in the corresponding stages in the first scenario. Please refer to the above description and will not be repeated here.

[0292] Table 2

[0293]

[0294]

[0295] Optionally, in the second scenario, the electronic device may also convert the acquired front-camera photosensitive data and rear-camera photosensitive data (such as the photosensitive data in Table 2) into the following: Fig.10 The photosensitive data curve shown is used to determine the change trend and relative size of the front-camera photosensitive data and the rear-camera photosensitive data in combination with the photosensitive data curve.

[0296] The curve 1001 may be a front-camera light-sensing data curve, and the curve 1002 may be a rear-camera light-sensing data curve. Figure 7 Similar to the embodiment, curve 1001 and curve 1002 can be divided into: a stage where the electronic device is placed with its back facing upward (corresponding to time period 1); a stage where the user is picking up the electronic device (corresponding to time period 2); a stage where the user is holding the electronic device and gradually approaching the human body (corresponding to time period 3); and a stage where the electronic device is close to the human body (corresponding to time period 4).

[0297] from Fig.10It can be seen that when the electronic device is placed with its back facing upward, the rear-camera photosensitive data is much larger than the front-camera photosensitive data, and the front-camera photosensitive data is 0; when the user is picking up the electronic device, the front-camera photosensitive data gradually increases to a value close to the rear-camera photosensitive data; when the user holds the electronic device and gradually approaches the human body, the front-camera photosensitive data drops sharply and the rear-camera photosensitive data tends to stabilize; when the electronic device is close to the human body, the rear-camera photosensitive data is much larger than the front-camera photosensitive data, and the front-camera photosensitive data is 0.

[0298] Based on the above analysis process, the screen control method 1100 provided in the embodiment of the present application can be applied to the second scenario.

[0299] For example, Fig.11 1 is a flow chart of a screen control method 1100 provided in an embodiment of the present application. The method 1100 may be executed by the processor 110, for example, Figure 6 The anti-false touch module shown is executed. Fig.11 As shown, method 1100 includes the following steps:

[0300] S1101. Based on establishing a call through a call application, or based on playing a voice message or establishing a voice call through a social application, the processor 110 obtains front-camera light-sensing data and rear-camera light-sensing data.

[0301] It should be understood that the implementation of S1101 is similar to the implementation of S1101, and reference may be made to the above description, which will not be repeated here.

[0302] S1102: The processor 110 determines that the rear-camera light-sensing data is N times greater than the front-camera light-sensing data within a first preset time period, and the front-camera light-sensing data is less than a threshold value of 8.

[0303] Similar to S802, the rear-camera light-sensing data is N times greater than the front-camera light-sensing data, for example, that within the first preset time period, the average value of the rear-camera light-sensing data is greater than the average value of the front-camera light-sensing data. The front-camera light-sensing data is less than the threshold 8, which means that the average value of the front-camera light-sensing data is less than the threshold 8.

[0304] Optionally, S1102 may also be replaced by: the processor 110 determines that at time b, the rear-view photosensitive data is greater than N times the forward-view photosensitive data, and the forward-view photosensitive data is less than a threshold value 1.

[0305] and Figure 8Similar to the embodiment, within the first preset time period, if the processor 110 determines that the rear-camera light-sensitive data is N times greater than the front-camera light-sensitive data and the front-camera light-sensitive data is less than the threshold value 8, it can be understood that: within the first preset time period, the rear camera of the electronic device is in an environment with light (i.e., the rear-camera light-sensitive data is larger), and the front camera is in a very dark environment or is blocked (i.e., the front-camera light-sensitive data is smaller), which corresponds to the size and change trend of the front-camera light-sensitive data and the rear-camera light-sensitive data in the stage where the electronic device is placed with its back facing up in the second scenario.

[0306] Therefore, the rear-view photosensitive data is N times greater than the front-view photosensitive data, and the front-view photosensitive data is less than the threshold 8, which can indicate that the electronic device is placed with its back facing up on any object in an environment with light.

[0307] It is understandable that the processor 110 may be placed at a stage where the electronic device is placed with its back facing upwards in the second scenario, for example Fig.10 In the time period 1, it is detected that the rear-view light sensing data is greater than N times the front-view light sensing data within the first preset time period and the front-view light sensing data is less than the threshold 8.

[0308] S1103. The processor 110 determines whether there is any increase in the forward-facing light-sensing data within a second preset time period that is greater than a threshold value 9.

[0309] If the increase in the forward-view light-sensing data within the second preset time period is greater than the threshold 9, the processor 110 executes S1104;

[0310] If there is no increase in the forward-view light-sensing data within the second preset time period that is greater than the threshold 9, the processor 110 executes S1101.

[0311] Among them, the second preset time length and the threshold value 9 are preset values. For example, the second preset time length can be 1 millisecond, and the threshold value 9 can be 2lux. In addition, within the second preset time length, the change in the rear-camera light-sensing data can be less than the threshold value e. That is, when the user picks up the electronic device, the rear camera is always in a light environment, and the change in the rear-camera light-sensing data is small.

[0312] Combination Fig.10 As shown, the second preset duration may be a duration in time period 2. Alternatively, it can be understood that the processor 110 detects in time period 2 that the increase in the forward-camera light-sensing data in the second preset duration is greater than the threshold value 9. Similar to the stage in which the user is picking up the electronic device in the first scenario, in the second scenario, when the electronic device is in the stage in which the user is picking up the electronic device, the rear-camera light-sensing data remains substantially unchanged, while the forward-camera light-sensing data increases to a value equal to or close to the rear-camera light-sensing data in a short time.

[0313] Taking the second preset time length of 1 millisecond and the threshold value 9 of 2lux as an example, if the processor 110 determines that the rear-camera light-sensing data is N times greater than the front-camera light-sensing data within the first preset time length and the front-camera light-sensing data is less than the threshold value 8 (S1102), and detects that the increase in the front-camera light-sensing data within 1 millisecond is greater than 2lux, it means that the front camera is changing from a very dark environment or an obscured state to a light environment (that is, the front-camera light-sensing data changes from a smaller value to a larger value), which corresponds to the size and change trend of the front-camera light-sensing data and the rear-camera light-sensing data in the second scenario when the user is picking up the electronic device. Therefore, the increase in the front-camera light-sensing data is greater than the threshold value 9, which can indicate that the electronic device is in the process of being picked up by the user.

[0314] It is understandable that the processor 110 may be in the stage where the user is picking up the electronic device in the second scenario, for example Fig.10 In time period 2, it is detected that the increase in the forward-facing light-sensing data within the second preset time period is greater than threshold 9.

[0315] Optionally, in another implementation, Fig.10 The slope of the photosensitive data curve shown determines whether the electronic device is in the stage where the user is picking up the electronic device.

[0316] For example, in Fig.10 In the schematic diagram of the photosensitive data curve shown, if in time period 2, the slope of the forward-facing photosensitive data curve within a second preset time length is greater than a threshold value 10 (for example, 0.5), it indicates that the electronic device is in the second scenario where the user is picking up the electronic device.

[0317] It should be understood that based on the above embodiments, Figure 8 Similar to the method described in the embodiment, in the second scenario, the processor 110 can also increase the accuracy of judging that the electronic device is in the stage where the user is picking up the electronic device in the second scenario based on the data measured by the A+G sensor. For details, please refer to the above description and will not be repeated here.

[0318] On the other hand, if the processor 110 determines that there is no increase in the forward-camera light-sensitive data within the second preset time period that is greater than the threshold value 9, the processor 110 continues to loop S1101 and the steps after S1101, that is, continues to acquire new forward-camera light-sensitive data and new rear-camera light-sensitive data, and continues to determine whether the user has picked up the electronic device based on the new forward-camera light-sensitive data and the new rear-camera light-sensitive data.

[0319] S1104, the processor 110 determines whether there is a third preset time length, within which the forward-viewing light-sensing data shows a decreasing trend and the reduced forward-viewing light-sensing data is less than a threshold value 12, and within which the rear-viewing light-sensing data tends to be stable (the amount of change is less than a threshold value f).

[0320] If the third preset time period exists, the processor 110 executes S1105, that is, the processor 110 sets the electronic device to enter an anti-mistouch state.

[0321] If the third preset time does not exist, the processor 110 executes S1104 in a loop, that is, the processor 110 continues to obtain new front-camera light-sensing data and new rear-camera light-sensing data, and determines whether to set the electronic device to enter the anti-mistouch state based on the new front-camera light-sensing data and the new rear-camera light-sensing data.

[0322] Optionally, the decreasing trend of the proactive light-sensing data can be understood as the decrease in the proactive light-sensing data within the third preset time period is greater than a threshold value 11.

[0323] The third preset time length, threshold 11 and threshold 12 may be preset values. For example, the third preset time length may be 1 millisecond, threshold 11 may be 2 lux, and threshold 12 may be 5 lux.

[0324] It should be understood that after the processor 110 determines that the increase in the forward-viewing light-sensing data within the second preset time period is greater than the threshold value 9 (S1103), the processor 110 may continue to execute S1104. Fig.10 For example, the processor 110 can determine within time period 3 that the forward-viewing light-sensitive data shows a decreasing trend and the rear-viewing light-sensitive data tends to be stable within a third preset time period, and the reduced forward-viewing light-sensitive data is less than a threshold value 12, indicating that the electronic device is currently in a stage where the electronic device is close to the human body.

[0325] The reduced forward-viewing light-sensing data may be, for example, the last data in the third preset time period, or one of the last multiple data, or a light-sensing data after the third preset time period. For example, within the third preset time period, the forward-viewing light-sensing data continues to decrease until after the third preset time period, the forward-viewing light-sensing data decreases to a minimum value, and the reduced forward-viewing light-sensing data may be the minimum value.

[0326] After the electronic device enters the false touch prevention state, it can continue to obtain new front-camera light sensing data and rear-camera light sensing data, and judge whether the human body is away from the electronic device based on the new front-camera light sensing data and rear-camera light sensing data. In this way, after the human body is away from the electronic device, the electronic device can also return to the normal state from the false touch prevention state.

[0327] S1106: After the electronic device enters the false touch prevention state, the processor 110 determines whether there is an increase in the front-camera light-sensing data exceeding a threshold value 13 within a fourth preset time period.

[0328] If the increase in the forward-camera light-sensing data within the fourth preset time period exceeds the threshold value 13, the processor 110 executes S1107, that is, the processor 110 sets the electronic device to return to a normal state.

[0329] Alternatively, after the electronic device enters the anti-mistouch state, if the processor 110 determines that the electronic device exits the call scene, for example, the processor 110 determines that the call ends, the voice call ends, or the voice message playback ends, the processor 110 may also execute S1107.

[0330] If there is no increase in the forward-viewing light-sensing data exceeding the threshold value 13 within the fourth preset time period, the processor 110 continues to execute S1106 in a loop, that is, continues to obtain new forward-viewing light-sensing data, and continues to determine whether to set the electronic device to return to normal state based on the new forward-viewing light-sensing data.

[0331] It can be understood that the fourth preset time duration is a preset shorter time duration. If the front camera light sensing data increases significantly within a short period of time, it means that the front camera of the electronic device switches from being blocked to being unblocked and having a light source, indicating that the human body is away from the electronic device. Then the electronic device can be restored to a normal state so that the user can perform input operations on the electronic device.

[0332] Alternatively, S1106 may also be replaced by: determining whether there is a fourth preset time period, the front-camera light-sensing data shows an increasing trend within the fourth preset time period, and the increased front-camera light-sensing data is greater than a threshold value c. Moreover, the change amount of the rear-camera light-sensing data within the fourth preset time period may be less than a threshold value d. That is, in this way, the electronic device may also determine that the human body is away from the electronic device.

[0333] It should be understood that the implementation of S1104 to S1107 is similar to the implementation of S804 to S807, and reference may be made to the above description, which will not be repeated here.

[0334] The third scenario

[0335] In the third scenario, the electronic device is placed in a light-free environment. It can be understood that there may be two situations in this scenario:

[0336] Case 1: Both the front camera and the rear camera of the electronic device are blocked. For example, the electronic device is in the user's pocket. It can be understood that the actual environment has a light source. However, since both the front and rear cameras are blocked by the pocket, when the user picks up the electronic device, the obstructions of the front and rear cameras are removed, and it is possible to obtain light-sensitive data in an environment with a light source.

[0337] Case 2: The electronic device is in a dark environment at night. It should be understood that if the electronic device is in a dark environment at night, the light-sensing data of the front and rear cameras will be very low, and even after the user picks up the electronic device, the light-sensing data may be close to zero, and it is impossible to judge whether the human body is close to the electronic device based on the changing trend of the front and rear camera light-sensing data.

[0338] Based on this, in the embodiment of the present application, when the processor 110 detects that the light-sensing data of the front and rear cameras are very low, and after detecting that the user picks up the electronic device, the light-sensing data value is still close to 0, the processor 110 increases the brightness of the screen of the electronic device to create an artificial light source, so that the front camera can detect the reflected light of the artificial light source irradiated on the human body, and judge whether the human body is close to the electronic device based on the detected reflected light. The details are as follows.

[0339] For ease of understanding, the following Fig.12 This chapter introduces the relative size and change trend of the front-camera light-sensing data and the rear-camera light-sensing data in two cases of the third scenario. Fig.12 (a) is the photosensitive data curve of case 1. Fig.12 (b) in the figure is the photosensitivity data curve of case 2.

[0340] like Fig.12 As shown in (a) of FIG. 1 , curve 1201 may be a front-camera light-sensing data curve, and curve 1202 may be a rear-camera light-sensing data curve. Figure 7 Similar to the embodiment, curve 1201 and curve 1202 can be divided into: the stage where the front and rear cameras of the electronic device are blocked (corresponding to time period 1); the stage where the user is picking up the electronic device (corresponding to time period 2); the stage where the user holds the electronic device and gradually approaches the human body (corresponding to time period 3); and the stage where the electronic device is close to the human body (corresponding to time period 4).

[0341] from Fig.12 As can be seen from (a) in the figure, when both the front and rear cameras of the electronic device are blocked, the front camera light-sensing data and the rear camera light-sensing data are close to 0, indicating that both the front and rear cameras are in a completely dark environment.

[0342] When the user is picking up the electronic device, the values ​​of the front-camera light-sensitive data and the rear-camera light-sensitive data of the electronic device gradually increase. It can be understood that since the obstructions of the front and rear cameras of the electronic device are removed, the front and rear cameras of the electronic device are gradually exposed to the light source.

[0343] When the user holds the electronic device and gradually approaches the human body, the front camera light source is blocked by the human body, causing the front camera light-sensing data to drop significantly, indicating that the light intensity detected by the front camera is greatly reduced. However, since the human body does not block the light source of the rear camera, the rear camera light-sensing data is stable, which means that the light intensity detected by the rear camera is higher.

[0344] When the electronic device is close to the human body, the front camera is blocked by the human body, so that the front camera light-sensing data is 0. However, when the electronic device is close to the human body, the rear camera is not blocked, so that the rear camera light-sensing data still maintains a high value.

[0345] On the other hand, Fig.12 As shown in (b) of FIG. 1 , curve 1203 may be a front-camera light-sensing data curve, and curve 1204 may be a rear-camera light-sensing data curve. Figure 7 Similar to the embodiment, curve 1203 and curve 1204 can be divided into the following stages in chronological order: the stage where the electronic device is in a light-free environment at night (corresponding to time period 1); the stage where the user is picking up the electronic device (corresponding to time period 2); the stage where the user is holding the electronic device and gradually approaches the human body (corresponding to time period 3); and the stage where the electronic device is close to the human body (corresponding to time period 4).

[0346] from Fig.12 As can be seen from (b) in the figure, when the electronic device is in a dark environment at night, the front camera light-sensing data and the rear camera light-sensing data are both close to 0, indicating that both the front and rear cameras are in a completely dark environment.

[0347] When the user is picking up the electronic device, there is no obvious change in the front-camera photosensitive data and the rear-camera photosensitive data of the electronic device.

[0348] When processor 110 detects that there is no obvious change in the front-camera light-sensing data and the rear-camera light-sensing data when the user picks up the electronic device, processor 110 adjusts the brightness of the screen of the electronic device to increase so that the front camera can detect the reflected light from the artificial light source shining on the human body.

[0349] As the user approaches the human body with the electronic device in hand, the front camera light-sensing data will first increase gradually because the reflected light on the human body detected by the front camera gradually increases. As the electronic device continues to approach the human body, the front camera is gradually blocked by the human body, and the reflected light on the human body gradually decreases, and the front camera light-sensing data gradually decreases. Therefore, it can be understood that in the third scenario, when the user approaches the human body with the electronic device in hand, the front camera light-sensing data will show a trend of first increasing and then decreasing.

[0350] When the electronic device is close to the human body, the front camera of the electronic device is blocked by the human body and cannot detect the reflected light on the human body, and the front camera photosensitivity data approaches 0.

[0351] It should be understood that in the third scenario, since the rear camera is always in an environment without light source at night and cannot detect the reflected light on the human body, the rear camera light sensing data is close to 0 in the above four stages.

[0352] Based on the above analysis process, the screen control method 1300 provided in the embodiment of the present application can be applied to the third scenario.

[0353] For example, Fig.13 1300 is a flowchart of a screen control method 1300 provided in an embodiment of the present application. The method 1300 is executed by the processor 110, for example, Figure 6 The anti-false touch module shown is executed. Fig.13 As shown, method 1300 includes the following steps:

[0354] S1301. Based on establishing a call through a call application, or based on playing a voice message or establishing a voice call through a social application, the processor 110 obtains front-camera light-sensing data and rear-camera light-sensing data.

[0355] It should be understood that the implementation of S1301 is similar to the implementation of S801, and reference may be made to the above description, which will not be repeated here.

[0356] S1302: The processor 110 determines that both the front-camera light-sensing data and the rear-camera light-sensing data are smaller than a threshold value 14 within a first preset time period.

[0357] The first preset time length and the threshold 14 are preset values. For example, the first preset time length may be 1 millisecond, and the threshold 14 may be 5 lux.

[0358] The forward-camera light-sensing data and the rear-camera light-sensing data are both less than the threshold value 14, for example: within the first preset time period, the average value of the forward-camera light-sensing data and the average value of the rear-camera light-sensing data are both less than the threshold value 14.

[0359] Optionally, S1302 may also be replaced by: the processor 110 determines that at the time c, both the forward-photographic data and the rearward-photographic data are less than a threshold value of 14.

[0360] Combination Fig.12 In (a) or (b), the first preset duration may be a duration in time period 1. Alternatively, it can be understood that the processor 110 detects in time period 1 that both the forward-camera light-sensing data and the rear-camera light-sensing data within the first preset duration are less than the threshold value 14.

[0361] Within the first preset time period, if the processor 110 determines that both the front camera light sensitive data and the rear camera light sensitive data are less than the threshold value 14, it may indicate that within the first preset time period, both the front and rear cameras of the electronic device detect that they are currently in a very dark environment or are blocked (i.e., both the front camera light sensitive data and the rear camera light sensitive data are small), which corresponds to the size and change trend of the front camera light sensitive data and the rear camera light sensitive data in the third scenario when both the front and rear cameras of the electronic device are blocked or the electronic device is in a light-free environment at night.

[0362] Therefore, the fact that both the front-camera light-sensing data and the rear-camera light-sensing data are less than the threshold value 14 may indicate that both the front and rear cameras of the electronic device are blocked or the electronic device is in a light-free environment at night.

[0363] It is understandable that the processor 110 may be in a stage where both the front and rear cameras of the electronic device in the third scenario are blocked or the electronic device is in a stage where there is no light source at night, for example Fig.12 In time period 1, it is detected that both the forward-camera light-sensing data and the rear-camera light-sensing data are less than threshold value 14 within the first preset time period.

[0364] S1303: The processor 110 obtains data measured by the A+G sensor, and determines whether the electronic device is in motion based on the data obtained from the A+G sensor.

[0365] If the electronic device is in motion, the processor 110 executes S1304.

[0366] If the electronic device is not in motion, the processor 110 executes S1303 in a loop, that is, continues to obtain new data measured by the A+G sensor, and continues to determine whether the electronic device is in motion based on the new data measured by the A+G sensor.

[0367] S1304: The processor 110 determines whether both the front-camera light-sensing data and the rear-camera light-sensing data are less than a threshold value of 14.

[0368] If both the front-camera light-sensing data and the rear-camera light-sensing data are less than the threshold value 14, the processor 110 executes S1305, that is, the processor 110 controls the screen to increase the highlight.

[0369] If the front-camera light-sensing data and the rear-camera light-sensing data are greater than the threshold value 14, the processor 110 executes S1307.

[0370] Optionally, if the forward-photographic data or the backward-photographic data is greater than a threshold value of 14, the processor 110 may execute S1302 and subsequent steps.

[0371] After determining that the electronic device is in the third scenario, in order to determine whether the electronic device is in a stage where both the front and rear cameras are blocked, or in a stage where there is no light source at night, further judgment is required based on the movement state of the electronic device.

[0372] If the front camera photosensitive data and the rear camera photosensitive data of the electronic device gradually increase during the movement, or the front camera photosensitive data and the rear camera photosensitive data are greater than the threshold value 14, it can mean that the electronic device is in a stage where both the front and rear cameras are blocked before the movement, and during the movement (that is, the stage when the user is picking up the electronic device), the obstructions of the front and rear cameras are removed (that is, the front camera photosensitive data and the rear camera photosensitive data can be changed from smaller values ​​to larger values), which corresponds to the changing trend of the front camera photosensitive data and the rear camera photosensitive data in Case 1 in the third scenario.

[0373] That is, if the processor 110 determines that both the front-camera light-sensitive data and the rear-camera light-sensitive data are less than the threshold value 14 (S1302) within the first preset time period, and detects that the electronic device is in motion, the front-camera light-sensitive data and the rear-camera light-sensitive data are not both less than the threshold value 14, it means that the front camera and / or the rear-camera light-sensitive data have changed from a very dark environment or an obstructed state to an environment with light (that is, the front-camera light-sensitive data and / or the rear-camera light-sensitive data have changed from a smaller value to a larger value), which corresponds to the size and change trend of the front-camera light-sensitive data and the rear-camera light-sensitive data in the stage where the user is picking up the electronic device in situation 1 in the third scenario.

[0374] It can be understood that through S1303 and S1304, it can be determined whether the front and rear cameras of the electronic device are both blocked or in a night environment with no light source in the third scenario.

[0375] If the forward-camera photosensitive data and / or the rear-camera photosensitive data of the electronic device is still close to 0 during movement, or both the forward-camera photosensitive data and the rear-camera photosensitive data are less than the threshold value 14, it may indicate that the electronic device belongs to situation 2 in the third scenario, that is, the electronic device is in a light-free environment at night, and the processor 110 needs to control the screen to increase the highlight and create artificial light.

[0376] S1306. The processor 110 determines whether there is an increasing trend of the forward-viewing light-sensing data within a second preset time period, and whether the increased forward-viewing light-sensing data is greater than a threshold value of 15.

[0377] If the second preset time period exists, the processor 110 executes S1307;

[0378] If the second preset time period does not exist, the processor 110 executes S1306 in a loop.

[0379] The second preset time length and the threshold 15 may be preset values. For example, the second preset time length may be 1 millisecond, and the threshold 15 may be 3 lux.

[0380] Based on the above Fig.12From the analysis of (b) in the figure, it can be understood that when the processor 110 controls the screen to increase the highlight, the forward-viewing light-sensitive data shows a trend of gradually increasing and then gradually decreasing as the user holds the electronic device and gradually approaches the human body. For ease of description, the stage in which the user holds the electronic device and gradually approaches the human body in the third scenario is divided into stage m and stage n. Among them, stage m is the stage in which the forward-viewing light-sensitive data gradually increases, and stage n is the stage in which the rear-viewing light-sensitive data gradually decreases.

[0381] It can be understood that the second preset time period can be a period of time in stage m. If the forward-viewing light-sensing data within the second preset time period is greater than the threshold value 15, it can indicate that the electronic device is in stage m, that is, the electronic device begins to gradually approach the human body.

[0382] Correspondingly, if there is no forward-viewing light-sensing data greater than the threshold value 15 within the second preset time period, the processor 110 executes S1306 in a loop, obtains new forward-viewing light-sensing data, and determines whether the electronic device is in stage m based on the new forward-viewing light-sensing data.

[0383] S1307, the processor 110 determines whether there is a third preset time length, within which the forward-viewing light-sensing data shows a decreasing trend and the reduced forward-viewing light-sensing data is less than a threshold value 17, and within which the rear-viewing light-sensing data tends to be stable (the amount of change is less than a threshold value g).

[0384] If the third preset time period exists, the processor 110 executes S1308, that is, the processor 110 sets the electronic device to enter an anti-mistouch state.

[0385] If the third preset time does not exist, the processor 110 executes S1307 in a loop, that is, the processor 110 continues to obtain new front-camera light-sensing data and new rear-camera light-sensing data, and determines whether to set the electronic device to enter the anti-mistouch state based on the new front-camera light-sensing data and the new rear-camera light-sensing data.

[0386] Optionally, the decreasing trend of the proactive light-sensing data within the third preset time period may also be replaced by the decrease amount of the proactive light-sensing data within the third preset time period being greater than a threshold value 16.

[0387] The third preset time length, threshold 16 and threshold 17 may be preset values. For example, the third preset time length may be 1 millisecond, threshold 16 may be 2 lux, and threshold 17 may be 5 lux.

[0388] It should be understood that after determining whether there is forward-viewing light-sensing data greater than the threshold value 15 within the second preset time period (S1306), the processor 110 may continue to execute S1307. Fig.12In (a), the processor 110 can, for example, determine within time period 3 that the forward-camera light-sensitive data shows a decreasing trend and the rear-camera light-sensitive data tends to be stable within a third preset time period, and the reduced forward-camera light-sensitive data is less than a threshold value 17, indicating that the electronic device is currently in a stage where it is close to the human body.

[0389] The reduced forward-viewing light-sensing data may be, for example, the last data in the third preset time period, or one of the last multiple data, or a light-sensing data after the third preset time period. For example, within the third preset time period, the forward-viewing light-sensing data continues to decrease until after the third preset time period, the forward-viewing light-sensing data decreases to a minimum value, and the reduced forward-viewing light-sensing data may be the minimum value.

[0390] It should be understood that if the electronic device is in a nighttime environment without light in the third scenario, the third preset duration may be a period of time in stage n (that is, Fig.12 (b) is the stage where the forward-facing photosensitivity curve gradually decreases in time period 3).

[0391] It can be understood that the processor 110 can be used in the third scenario where the electronic device is in a dark environment at night and a user is holding the electronic device and gradually approaches the human body, for example Fig.12 In time period 3 of (b), it is detected that the value of the forward-viewing photosensitivity data increases first and then decreases.

[0392] If the processor 110 determines that the amount of reduction in the front-camera light-sensing data within the third preset time period is greater than the threshold 16, it can be indicated that the reflected light on the human body detected by the front camera is gradually decreasing, that is, the electronic device is in stage n. And, if the reduced front-camera light-sensing data is less than the threshold 17, it can be indicated that the electronic device is close to the human body, and the processor 110 sets the electronic device to enter the anti-mistouch state.

[0393] It can be understood that through S1306, it can be determined that the electronic device is in stage m within the second preset time length, and through S1307, it can be determined that the electronic device is in stage n within the third preset time length, and the processor 110 determines that the electronic device is close to the human body after the third preset time length, and the processor 110 needs to set the electronic device to enter the anti-mistouch state.

[0394] In another implementation, the processor 110 may also determine whether the human body is close to the electronic device based on the slope of the light-sensitive data curve. For example, if the processor 110 determines that the slope of the forward-photographic light-sensitive data curve within the second preset time period is greater than a threshold value 18 (e.g., 0.5), it may indicate that the electronic device is in stage m of the stage where the user is holding the electronic device and gradually approaching the human body.

[0395] Further, if it is determined that the slope of the forward-camera light-sensitive data curve within the third preset time period is less than a threshold value 19 (for example, -0.5), it can indicate that the electronic device is in stage n in which the user is holding the electronic device and gradually approaching the human body. If it is determined that the forward-camera light-sensitive data after the third preset time period decreases to less than the threshold value 17, the processor 110 can determine that the electronic device is close to the human body, and the processor 110 sets the electronic device to enter an anti-mistouch state.

[0396] After the electronic device enters the false touch prevention state, it can continue to obtain new front-camera light sensing data and rear-camera light sensing data, and judge whether the human body is away from the electronic device based on the new front-camera light sensing data and rear-camera light sensing data. In this way, after the human body is away from the electronic device, the electronic device can also return to the normal state from the false touch prevention state.

[0397] S1309: After the electronic device enters the false touch prevention state, the processor 110 determines whether there is an increase in the forward-facing light-sensing data within a fourth preset time period that exceeds a threshold value of 20.

[0398] If the increase in the forward-camera light-sensing data within the fourth preset time period exceeds the threshold value 20, the processor 110 executes S1310, that is, setting the electronic device to return to a normal state.

[0399] Alternatively, after the electronic device enters the anti-mistouch state, if the processor 110 determines that the electronic device exits the call scene, for example, the processor 110 determines that the call ends, the voice call ends, or the voice message playback ends, the processor 110 may also execute S1310.

[0400] If there is no increase in the forward-viewing light-sensing data within the fourth preset time period that exceeds the threshold value 20, the processor 110 continues to execute S1309 in a loop, that is, continues to obtain new forward-viewing light-sensing data, and continues to determine whether to set the electronic device to return to normal state based on the new forward-viewing light-sensing data.

[0401] Alternatively, S1309 may also be replaced by: determining whether there is a fourth preset time period, the front-camera light-sensing data shows an increasing trend within the fourth preset time period, and the increased front-camera light-sensing data is greater than a threshold value c. Moreover, the change amount of the rear-camera light-sensing data within the fourth preset time period may be less than a threshold value d. That is, in this way, the electronic device may also determine that the human body is away from the electronic device.

[0402] It should be understood that the implementation of S1309 is similar to the implementation of S806, and reference may be made to the above description, which will not be repeated here.

[0403] The fourth scenario

[0404] In the fourth scenario, when the processor 110 detects that the electronic device is about to enter a call scene or enters a call scene, the electronic device may be in a state where both the front and rear cameras are not blocked. For example, the electronic device is mounted on a bracket or the user is holding the electronic device. At this time, the front-camera light-sensing data and the rear-camera light-sensing data obtained may be relatively close, and it is impossible to determine whether the electronic device is picked up by the user based on the change trend of the front-camera light-sensing data or the rear-camera light-sensing data.

[0405] Based on this, in the embodiment of the present application, the A+G sensor is combined to determine whether the electronic device is picked up, and then based on the change trend of the front-camera light-sensing data and the rear-camera light-sensing data, it is determined whether the human body is close to the electronic device. The specific process is as follows.

[0406] For ease of understanding, the following Fig.14 This section introduces the relative size and change trend of the front-camera light-sensing data and the rear-camera light-sensing data in the fourth scenario. Fig.14 As shown, curve 1401 may be a front-camera light-sensing data curve, and curve 1402 may be a rear-camera light-sensing data curve. According to the chronological order, curves 1401 and 1402 may be divided into a stage where the front and rear cameras are not blocked (corresponding to time period 1), a stage where the user holds the electronic device and gradually approaches the human body (corresponding to time period 2), and a stage where the electronic device is close to the human body (corresponding to time period 3).

[0407] from Fig.14 It can be seen that when the front and rear cameras of the electronic device are not blocked, the front camera light-sensing data and the rear camera light-sensing data are both large and relatively close, indicating that both the front and rear cameras can detect the light source, that is, they are both in a light environment.

[0408] When the user holds the electronic device and gradually approaches the human body, and when the electronic device is close to the human body, the relative size and change trend of the front-camera light-sensing data and the rear-camera light-sensing data are Figure 7 The relative sizes and changing trends of the forward-photographic data and the backward-photographic data in the corresponding stages in the embodiment are similar, and reference may be made to the above description, which will not be repeated here.

[0409] Based on the above analysis process, the screen control method 1500 provided in this embodiment can be applied to the fourth scenario.

[0410] For example, Fig.15 1500 is a flowchart of a screen control method 1500 provided in an embodiment of the present application. The method 1500 may be executed by the processor 110, for example, Figure 6 The anti-false touch module shown is executed. Fig.15 As shown, method 1500 includes the following steps:

[0411] S1501. Based on establishing a call through a call application, or based on playing a voice message or establishing a voice call through a social application, the processor 110 obtains front-camera light-sensing data and rear-camera light-sensing data.

[0412] It should be understood that the implementation of S1501 is similar to the implementation of S801, and reference may be made to the above description, which will not be repeated here.

[0413] S1502: The processor 110 determines that both the front-camera light-sensing data and the rear-camera light-sensing data are greater than a threshold value 21 within a first preset time period.

[0414] The first preset time length and the threshold 21 are preset values. For example, the first preset time length may be 1 millisecond, and the threshold 21 may be 10 lux.

[0415] It should be understood that both the forward-camera photosensitive data and the rear-camera photosensitive data are greater than the threshold value 21, for example, it can be that within the first preset time period, the average value of the forward-camera photosensitive data and the average value of the rear-camera photosensitive data are both greater than the threshold value 21.

[0416] Optionally, S1502 may also be replaced by: the processor 110 determines that there is a first moment when both the forward-camera light-sensing data and the rearward-camera light-sensing data are greater than a threshold value 21.

[0417] Combination Fig.14 As shown, the first preset duration may be a duration in time period 1. Alternatively, it can be understood that the processor 110 detects in time period 1 that both the forward-photographic data and the rear-photographic data within the first preset duration are greater than the threshold 21.

[0418] Within the first preset time, if the processor 110 determines that both the front-camera light-sensing data and the rear-camera light-sensing data are greater than the threshold value 21, it can be indicated that within the first preset time, the front and rear cameras of the electronic device detect that they are currently in an environment with a light source (i.e., both the front-camera light-sensing data and the rear-camera light-sensing data are large), which corresponds to the size and change trend of the front-camera light-sensing data and the rear-camera light-sensing data in the fourth scenario when the front and rear cameras of the electronic device are not blocked. Therefore, both the front-camera light-sensing data and the rear-camera light-sensing data are greater than the threshold value 21, which can indicate that the front and rear cameras of the electronic device are not blocked.

[0419] It is understandable that the processor 110 may be in the stage where the front and rear cameras in the fourth scenario are not blocked, for example Fig.14 In the time period 1, it is detected that both the forward-camera light-sensing data and the rear-camera light-sensing data within the first preset time length are greater than the threshold 21.

[0420] S1503: The processor 110 obtains data measured by the A+G sensor, and determines whether the electronic device is in motion based on the data obtained from the A+G sensor.

[0421] If the electronic device is in motion, the processor 110 executes S1504.

[0422] If the electronic device is not in motion, the processor 110 executes S1503 in a loop, that is, continues to obtain new data measured by the A+G sensor, and continues to determine whether the electronic device is in motion based on the new data measured by the A+G sensor.

[0423] Determining whether the electronic device is in motion may also be referred to as determining whether the electronic device is being picked up, for example.

[0424] It should be understood that since the front and rear cameras of the electronic device are not blocked, it is impossible to determine whether the user has picked up the electronic device based on the relative size and change trend of the front and rear camera light-sensing data. Therefore, it is necessary to combine the data measured by the A+G sensor to determine whether the electronic device is in motion. If the electronic device is in motion, it can be understood that the user has picked up the electronic device.

[0425] S1504, the processor 110 determines whether there is a third preset time period, within which the forward-viewing light-sensing data shows a decreasing trend and the reduced forward-viewing light-sensing data is less than a threshold value 23, and within which the rear-viewing light-sensing data tends to be stable (the amount of change is less than a threshold value k).

[0426] If the third preset time period exists, the processor 110 executes S1505, that is, the processor 110 sets the electronic device to enter an anti-mistouch state.

[0427] If it does not exist within the third preset time length, the processor 110 executes S1504, that is, the processor 110 continues to obtain new front-camera light-sensitive data and new rear-camera light-sensitive data, and determines whether to set the electronic device to enter the anti-mistouch state based on the new front-camera light-sensitive data and the new rear-camera light-sensitive data.

[0428] Optionally, the decreasing trend of the proactive light-sensing data within the third preset time period may also be replaced by the decrease amount of the proactive light-sensing data within the third preset time period being greater than a threshold value 22.

[0429] Among them, the decreasing trend of the forward-viewing light-sensing data can be understood as the decrease in the forward-viewing light-sensing data within the third preset time period is greater than the threshold 22. The third preset time period, the threshold 22, and the threshold 23 can be preset values. For example, the third preset time period can be 1 millisecond, the threshold 22 can be 2lux, and the threshold 23 can be 5lux.

[0430] It should be understood that after the processor 110 determines that the electronic device is in motion (S1503), the processor 110 may continue to execute S1504. Fig.14For example, the processor 110 can determine that the forward-viewing light-sensing data is decreasing and the rear-viewing light-sensing data is stabilizing within time period 2, and the reduced forward-viewing light-sensing data is less than a threshold value 23, indicating that the current electronic device is close to the human body.

[0431] The reduced forward-viewing light-sensing data may be, for example, the last data in the third preset time period, or one of the last multiple data, or a light-sensing data after the third preset time period. For example, within the third preset time period, the forward-viewing light-sensing data continues to decrease until after the third preset time period, the forward-viewing light-sensing data decreases to a minimum value, and the reduced forward-viewing light-sensing data may be the minimum value.

[0432] After the electronic device enters the false touch prevention state, it can continue to obtain new front-camera light sensing data and rear-camera light sensing data, and judge whether the human body is away from the electronic device based on the new front-camera light sensing data and rear-camera light sensing data. In this way, after the human body is away from the electronic device, the electronic device can also return to the normal state from the false touch prevention state.

[0433] S1506: After the electronic device enters the false touch prevention state, the processor 110 determines whether there is an increase in the forward-facing light-sensing data within a fourth preset time period that exceeds a threshold value 24.

[0434] If the increase in the forward-camera light-sensing data within the fourth preset time period exceeds the threshold value 24, the processor 110 executes S1507, that is, setting the electronic device to return to a normal state.

[0435] Alternatively, after the electronic device enters the anti-mistouch state, if the processor 110 determines that the electronic device exits the call scene, for example, the processor 110 determines that the call ends, the voice call ends, or the voice message playback ends, the processor 110 may also execute S1507.

[0436] If there is no increase in the forward-viewing light-sensing data within the fourth preset time period that exceeds the threshold value 24, the processor 110 continues to execute S1506 in a loop, that is, continues to obtain new forward-viewing light-sensing data, and continues to determine whether to set the electronic device to return to normal state based on the new forward-viewing light-sensing data.

[0437] Alternatively, S1506 may also be replaced by: determining whether there is a fourth preset time period, the front-camera light-sensing data shows an increasing trend within the fourth preset time period, and the increased front-camera light-sensing data is greater than a threshold value c. Moreover, the change amount of the rear-camera light-sensing data within the fourth preset time period may be less than a threshold value d. That is, in this way, the electronic device may also determine that the human body is away from the electronic device.

[0438] It should be understood that the implementation of S1504 to S1507 is similar to the implementation of S804 to S807, and reference may be made to the above description, which will not be repeated here.

[0439] It should be understood that in the embodiment of the present application, judging whether the reduction amount of the forward-camera photosensitive data and / or the rear-camera photosensitive data is greater than a threshold value can also be replaced by judging whether the reduction amount of the forward-camera photosensitive data and / or the rear-camera photosensitive data is greater than or equal to a threshold value. Similarly, judging whether the forward-camera photosensitive data and / or the rear-camera photosensitive data is less than a threshold value can also be replaced by judging whether the forward-camera photosensitive data and / or the rear-camera photosensitive data is less than or equal to a threshold value. That is, in the conditional judgment, when judging the relationship with the threshold value, when it is equal to the threshold value, it can be set to the branch of yes, or it can be set to the branch of no. The present application does not make specific limitations on this.

[0440] It should be understood that in the embodiments of the present application, the electronic device may be in different scenarios at different time points, so the implementation methods corresponding to the above four scenarios can be used in combination. For example, at a first moment, the electronic device may be in a third scenario, and the processor 110 may execute the method 1300 corresponding to the third scenario; at a second moment after the first moment, the electronic device is in the first scenario, and the electronic device may execute the method 800 corresponding to the first scenario. That is, the multiple embodiments shown above may also be implemented separately, or multiple embodiments may be implemented in combination. This application does not make specific limitations on this.

[0441] It should be understood that in the above embodiment, the relative size of the step numbers does not indicate the order in which the steps are executed, but is determined by the internal logic between the steps.

[0442] It should be noted that the module names involved in the embodiments of the present application can be defined as other names as long as the functions of each module can be achieved, and there is no specific restriction on the names of the modules.

[0443] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0444] The screen control method of the embodiment of the present application has been described above, and the device for executing the above method provided by the embodiment of the present application is described below. Those skilled in the art can understand that the method and the device can be combined and referenced with each other, and the relevant device provided by the embodiment of the present application can execute the steps in the above list sorting method.

[0445] Fig.16A schematic block diagram of a screen control device 1600 provided in an embodiment of the present application. The device 1600 includes a processor 1601, a communication interface 1602, and a memory 1603. Among them, the processor 1601, the communication interface 1602, and the memory 1603 communicate with each other through an internal connection path, the memory 1603 is used to store instructions, and the processor 1601 is used to execute the instructions stored in the memory 1603. The communication interface 1602 can be used to send signals to other devices (such as the processor 1601 or the touch screen of the terminal device), and can also be used to receive signals from other devices (such as the memory 1603). Exemplarily, the communication interface 1602 reads the instructions stored in the memory 1603 and sends the instructions to the processor 1601.

[0446] It should be understood that the device 1600 can be specifically a terminal device in the above embodiment, and can be used to execute the various steps and / or processes corresponding to the terminal device in the above method embodiment. Optionally, the memory 1603 may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type. The processor 1601 may be used to execute instructions stored in the memory, and when the processor 1601 executes instructions stored in the memory, the processor 1601 is used to execute the various steps and / or processes of the above method embodiment.

[0447] It should be understood that in the embodiments of the present application, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0448] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in a processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor executes the instructions in the memory, and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.

[0449] The screen control method provided in the embodiment of the present application can be applied to electronic devices with communication functions. The electronic devices include terminal devices, and the specific device form of the terminal devices can refer to the above related descriptions, which will not be repeated here.

[0450] An embodiment of the present application provides an electronic device, which terminal device includes: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the terminal device executes the above method.

[0451] The embodiment of the present application provides a chip. The chip includes a processor, and the processor is used to call a computer program in a memory to execute the technical solution in the above embodiment. Its implementation principle and technical effect are similar to those of the above related embodiments, and will not be repeated here.

[0452] The embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program. The above method is implemented when the computer program is executed by the processor. The method described in the above embodiment can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the function can be stored as one or more instructions or codes on a computer-readable medium or transmitted on a computer-readable medium. Computer-readable media can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium that can be accessed by a computer.

[0453] In one possible implementation, a computer-readable medium may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disk storage, disk storage or other magnetic storage devices, or any other medium that is intended to carry or store the required program code in the form of instructions or data structures and can be accessed by a computer. Moreover, any connection is appropriately referred to as a computer-readable medium. For example, if a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wireless technology (such as infrared, radio and microwave) is used to transmit software from a website, server or other remote source, the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology such as infrared, radio and microwave are included in the definition of medium. Disks and optical disks as used herein include optical disks, laser disks, optical disks, digital versatile disks (DVD), floppy disks and Blu-ray disks, where disks usually reproduce data magnetically, while optical disks reproduce data optically using lasers. Combinations of the above should also be included in the scope of computer-readable media.

[0454] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed, the computer executes the above method.

[0455] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable device to generate a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0456] The above specific implementation methods further illustrate the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the present invention should be included in the scope of protection of the present invention.

Claims

1. A screen control method, characterized in that: Applied to an electronic device provided with a front camera and a rear camera, the method comprises: At a first moment, the electronic device runs a first application in the foreground, and the electronic device is in an environment without light source; the first application includes an application that uses the front camera and / or the rear camera during operation; The electronic device is still in an environment without light source, and the electronic device moves to increase the screen brightness of the electronic device; After the screen brightness of the electronic device is increased, continuously acquiring light-sensing data through the front camera; When it is determined that the first light-sensing data acquired by the front camera within a first time period shows an increasing trend and the second light-sensing data acquired within a second time period after the first time period shows a decreasing trend, the electronic device is set not to execute the screen touch logic.

2. The method according to claim 1, characterized in that The electronic device is in a light-free environment, comprising: The electronic device acquires second light-sensing data through the front camera, and acquires third light-sensing data through the rear camera; It is determined that the second light-sensing data and the third light-sensing data are less than a first threshold.

3. The method according to claim 1 or 2, characterized in that: The setting of the electronic device not to execute the screen touch control logic includes: Determine whether the first time period exists and whether an increase in the first light-sensitive data within the first time period is greater than a second threshold; In the case where the first time duration exists, determining whether the second time duration exists, and the second light-sensing data within the second time duration shows a decreasing trend and decreases to less than a third threshold; When the second time period exists, the electronic device is set not to execute the screen touch logic.

4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: At a second moment, the electronic device runs a second application in the foreground, and the electronic device is in an environment with light; the second application includes an application that uses the front camera and / or the rear camera during operation, and the second moment is different from the first moment; The electronic device is still in an environment with light source, and the electronic device moves; After determining that the electronic device has moved, if it is determined that there is a third time period, the second light sensitivity data shows a decreasing trend during the third time period, and the second light sensitivity data decreases to be less than a fourth threshold, the electronic device is set not to execute the screen touch logic.

5. The method according to claim 4, characterized in that The electronic device is in an environment with a light source, and includes: Acquire fourth light-sensing data through the front camera, and acquire fifth light-sensing data through the rear camera; It is determined that the fourth light-sensing data and the fifth light-sensing data are greater than a fifth threshold.

6. The method according to claim 5, characterized in that The determining that the electronic device moves includes: The movement of the electronic device is determined by measuring data obtained through a combined sensor of an accelerometer and a gyroscope.

7. The method according to claim 4, characterized in that The electronic device is in an environment with a light source, and includes: Acquire sixth light-sensing data through the front camera, and acquire seventh light-sensing data through the rear camera; It is determined that the sixth photosensitive data is greater than N times the seventh photosensitive data, and the seventh photosensitive data is less than a sixth threshold, and N is greater than or equal to 2.

8. The method according to claim 7, characterized in that The determining that the electronic device moves includes: When it is determined that there is a fourth time period and an increase in the eighth photosensitive data within the fourth time period is greater than a seventh threshold, it is determined that the electronic device has moved, and the eighth photosensitive data is photosensitive data obtained by the rear camera.

9. The method according to claim 4, characterized in that The electronic device is in an environment with a light source, and includes: ninth light-sensing data acquired through the front camera, and tenth light-sensing data acquired through the rear camera; It is determined that the ninth photosensitive data is less than a sixth threshold, and the tenth photosensitive data is greater than N times the ninth photosensitive data, where N is greater than or equal to 2.

10. The method according to claim 9, characterized in that The determining that the electronic device moves includes: When it is determined that there is a fifth time period and an increase in the eleventh light-sensing data within the fifth time period is greater than a seventh threshold, it is determined that the electronic device has moved, and the eleventh light-sensing data is light-sensing data acquired by the front camera.

11. The method according to any one of claims 1 to 10, characterized in that After setting the electronic device not to execute the screen touch control logic, the method further includes: Determine whether there is a sixth time period, in which the twelfth light-sensing data shows an increasing trend and increases to a value greater than an eighth threshold, and the twelfth light-sensing data is acquired by the front camera; When the sixth time duration exists, the electronic device is configured to execute screen touch control logic.

12. An electronic device, characterized in that: The electronic device comprises: one or more processors, a memory, a front camera and a rear camera; The memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, the one or more processors call the computer instructions to enable the electronic device to perform the method as described in any one of claims 1 to 11, the front camera is used to execute the steps performed by the front camera as described in any one of claims 1 to 11, and the rear camera is used to execute the steps performed by the rear camera as described in any one of claims 1 to 11.

13. A chip system, characterized in that: The chip system is applied to an electronic device, and the chip system includes one or more processors, and the one or more processors are used to call computer instructions so that the electronic device executes the method as described in any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium comprises computer instructions, and when the computer instructions are executed on an electronic device, the electronic device is caused to perform the method according to any one of claims 1 to 11.

15. A computer program product, characterized in that The computer program product comprises a computer program code, and when the computer program code is run on an electronic device, the electronic device is caused to perform the method according to any one of claims 1 to 11.