CN114639364A - Control method and device of electronic equipment, electronic equipment and storage medium - Google Patents

Control method and device of electronic equipment, electronic equipment and storage medium Download PDF

Info

Publication number
CN114639364A
CN114639364A CN202210245710.5A CN202210245710A CN114639364A CN 114639364 A CN114639364 A CN 114639364A CN 202210245710 A CN202210245710 A CN 202210245710A CN 114639364 A CN114639364 A CN 114639364A
Authority
CN
China
Prior art keywords
channel
value
determining
state
coefficient
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210245710.5A
Other languages
Chinese (zh)
Inventor
辜林风
虢礼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202210245710.5A priority Critical patent/CN114639364A/en
Publication of CN114639364A publication Critical patent/CN114639364A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/10Intensity circuits

Abstract

The present disclosure proposes a method and an apparatus for controlling an electronic device, and a storage medium, wherein the method comprises: detecting the working state of an infrared transmitter in the electronic equipment; responding to the fact that the working state is the starting state, and obtaining first illuminance detected historically; and controlling the brightness of the screen of the electronic equipment according to the first illuminance. Therefore, under the condition that the working state of the infrared emitter is in the opening state, the brightness of the screen of the electronic equipment is controlled according to the first illuminance detected historically, instead of the illuminance calculated according to the channel value of each color channel collected by the current light sensing chip, the brightness of the screen of the electronic equipment is controlled, the condition that the light sensing chip is interfered by the emitted light of the infrared emitter and the ambient brightness is unmatched according to the illuminance calculated according to the channel value can be avoided, the accuracy of the brightness control of the screen of the electronic equipment is improved, and the use experience of a user is improved.

Description

Control method and device of electronic equipment, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of terminal technologies, and in particular, to a method and an apparatus for controlling an electronic device, and a storage medium.
Background
Infrared remote control is a wireless and non-contact control technology, has the obvious advantages of strong anti-interference capability, reliable information transmission, low power consumption, low cost, easy realization and the like, and is increasingly applied to electronic equipment.
In the related art, the screen brightness of the electronic device can be automatically adjusted according to the channel values of the color channels collected by the light sensing chip in the electronic device.
However, for the electronic device configured with the infrared remote control function, in the using process of the infrared transmitter, light emitted by an infrared lamp in the infrared transmitter may be irradiated onto the light sensing chip from the inside of the electronic device, the channel value of each color channel acquired by the light sensing chip is the superposition of energy of the infrared lamp and energy irradiated onto the light sensing chip by the external environment through the electronic device screen, at this time, if the channel value of each color channel acquired by the light sensing chip is used, the screen brightness of the electronic device is automatically adjusted, which may cause the adjusted screen brightness to be mismatched with the external environment brightness, and affect the use experience of the user.
Disclosure of Invention
The present disclosure is directed to solving, at least to some extent, one of the technical problems in the related art.
Therefore, the following technical scheme is provided in the disclosure:
an embodiment of a first aspect of the present disclosure provides a screen control method for an electronic device, including:
detecting the working state of an infrared transmitter in the electronic equipment;
responding to the working state as an opening state, and acquiring first illumination historically detected;
and controlling the brightness of the screen of the electronic equipment according to the first illuminance.
An embodiment of a second aspect of the present disclosure provides a screen control device of an electronic device, including:
the detection module is used for detecting the working state of an infrared transmitter in the electronic equipment;
the acquisition module is used for responding to the starting state of the working state and acquiring the first illuminance detected by history;
and the first control module is used for controlling the brightness of the screen of the electronic equipment according to the first illuminance.
An embodiment of a third aspect of the present disclosure provides an electronic device, including:
a processor;
a memory for storing executable instructions of the processor; wherein the processor is configured to call and execute the executable instructions stored in the memory to implement the control method of the electronic device as set forth in the embodiment of the first aspect of the present disclosure.
A fourth aspect of the present disclosure provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a control method of an electronic device as set forth in the first aspect of the present disclosure.
A fifth aspect of the present disclosure provides a computer program product, where instructions of the computer program product, when executed by a processor, perform the control method of an electronic device as set forth in the first aspect of the present disclosure.
According to the technical scheme, the working state of an infrared emitter in the electronic equipment is detected; responding to the fact that the working state is the opening state, and obtaining first illumination historically detected; and controlling the brightness of the screen of the electronic equipment according to the first illuminance. Therefore, under the condition that the working state of the infrared emitter is in the opening state, the brightness of the screen of the electronic equipment is controlled according to the first illuminance detected historically, instead of the illuminance calculated according to the channel value of each color channel collected by the current light sensing chip, the brightness of the screen of the electronic equipment is controlled, the situation that the light sensing chip is interfered by the emitted light of the infrared emitter and the illuminance calculated according to the channel value is not matched with the ambient brightness can be avoided, the accuracy of the brightness control of the screen of the electronic equipment is improved, and the use experience of a user is improved.
Additional aspects and advantages of the disclosure will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the disclosure.
Drawings
The foregoing and/or additional aspects and advantages of the present disclosure will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a flowchart illustrating a control method of an electronic device according to an embodiment of the disclosure;
fig. 2 is a flowchart illustrating a control method of an electronic device according to another embodiment of the disclosure;
fig. 3 is a flowchart illustrating a control method of an electronic device according to another embodiment of the disclosure;
fig. 4 is a flowchart illustrating a control method of an electronic device according to another embodiment of the disclosure;
fig. 5 is a flowchart illustrating a control method of an electronic device according to another embodiment of the disclosure;
fig. 6 is a schematic structural diagram of a control device of an electronic device according to an embodiment of the present disclosure;
fig. 7 is a flowchart illustrating a control method of an electronic device according to another embodiment of the disclosure;
fig. 8 is a schematic structural diagram of a control device of an electronic apparatus according to an embodiment of the present disclosure;
FIG. 9 illustrates a block diagram of an exemplary electronic device suitable for use in implementing embodiments of the present disclosure.
Detailed Description
Reference will now be made in detail to the embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary and intended to be illustrative of the present disclosure, and should not be construed as limiting the present disclosure.
Currently, for an electronic device configured with an infrared remote control function, correct reporting of illuminance (or referred to as a light sensation value) may be affected during the use of an infrared emitter, so that the screen brightness of the electronic device may not match the brightness of the external environment. The fundamental reason for this is the influence of the structural design of the electronic device.
Specifically, in the structural design of the electronic device, the infrared transmitter and the light sensing chip are stacked together, and the infrared lampshade of the infrared transmitter plays a role in supporting the light sensing chip. When the infrared remote control function in the electronic device is used, Light emitted by an infrared lamp (i.e., a Light Emitting Diode (LED)) in the infrared transmitter may be irradiated onto the Light sensing chip from the inside of the electronic device, and channel values corresponding to color channels (e.g., a Clear channel, a Red channel, a Green channel, and a Blue channel) collected by the Light sensing chip are obtained by superimposing energy of the infrared lamp and energy irradiated onto the Light sensing chip from an external environment through a screen of the electronic device, and at this time, illuminance (lux) calculated according to the channel values of the color channels collected by the Light sensing chip is not matched with brightness of the external environment. If the screen brightness of the electronic device is automatically adjusted by adopting the illuminance, the normal use of a user is influenced.
For example, in a normal situation, when the screen brightness of the electronic device is automatically adjusted, if the external environment is dark, the screen is controlled to display at a low brightness according to a low illuminance. However, when there is infrared interference, the light sensing chip calculates a relatively large illuminance, so that the screen is controlled to display with high brightness according to the relatively high illuminance, which affects the user experience.
Therefore, in order to solve the existing problems, the present disclosure provides a control method and apparatus for an electronic device, and a storage medium.
A control method of an electronic device, an apparatus, an electronic device, and a storage medium of the embodiments of the present disclosure are described below with reference to the drawings.
Fig. 1 is a flowchart illustrating a control method of an electronic device according to an embodiment of the disclosure.
The control method of the electronic device is exemplified by being configured in a control device of the electronic device, and the control device of the electronic device can be applied to any electronic device, so that the electronic device can execute the control function of the electronic device.
The electronic device may be any device with computing capability, for example, a Personal Computer (PC), a mobile terminal, a server, and the like, and the mobile terminal may be a hardware device with various operating systems, touch screens, and/or display screens, such as a mobile phone, a tablet Computer, a Personal digital assistant, and a wearable device.
As shown in fig. 1, the control method of the electronic device may include the steps of:
step 101, detecting the working state of an infrared emitter in electronic equipment.
In the embodiment of the present disclosure, the operating state of the infrared transmitter may be an on state, or may also be an off state.
In the disclosed embodiments, the operating state of an infrared emitter in an electronic device may be detected to determine whether the infrared emitter is in an on state or an off state.
And 102, responding to the starting state of the working state, and acquiring the first illuminance detected in history.
In the embodiment of the present disclosure, the first illuminance detected in the history may be the illuminance detected when the infrared emitter is in the off state, for example, the first illuminance may be the illuminance detected last time (when the infrared emitter is in the off state), that is, the illuminance detected last time by the driving of the photo sensor chip when the infrared emitter is off (Hardware Abstraction Layer) is reported to the HAL (Hardware Abstraction Layer), or may be the illuminance detected last time (last time in the present disclosure) when the infrared emitter is off (when the infrared emitter is in the off state), that is, the illuminance detected last time by the driving of the photo sensor chip when the infrared emitter is off (last time in the present disclosure) is reported to the HAL Layer, or may be the illuminance detected last time (last time in the present disclosure) and so on, the present disclosure is not so limited.
In the embodiment of the disclosure, in the case that the operating state of the infrared transmitter is the on state, the first illuminance detected in the history may be acquired.
And 103, performing brightness control on the screen of the electronic equipment according to the first illuminance.
In the embodiment of the present disclosure, the brightness of the screen of the electronic device may be controlled according to the first illuminance.
It should be noted that, the screen brightness of the electronic device is in a forward relationship with the first illuminance, and when the first illuminance is relatively low, the screen brightness of the electronic device is relatively low; when the first illuminance is relatively high, the screen brightness of the electronic device is high. It is understood that, at this time, the electronic device does not perform brightness control on the screen according to the currently acquired (or detected) illuminance, but performs brightness control on the screen according to the previously stored first illuminance.
According to the control method of the electronic equipment, the working state of the infrared emitter in the electronic equipment is detected; responding to the fact that the working state is the opening state, and obtaining first illumination historically detected; and controlling the brightness of the screen of the electronic equipment according to the first illuminance. Therefore, under the condition that the working state of the infrared emitter is in the opening state, the brightness of the screen of the electronic equipment is controlled according to the first illuminance detected historically, instead of the illuminance calculated according to the channel value of each color channel collected by the current light sensing chip, the brightness of the screen of the electronic equipment is controlled, the situation that the light sensing chip is interfered by the emitted light of the infrared emitter and the illuminance calculated according to the channel value is not matched with the ambient brightness can be avoided, the accuracy of the brightness control of the screen of the electronic equipment is improved, and the use experience of a user is improved.
In order to clearly illustrate how the working state of the infrared emitter in the electronic device is detected in the above embodiments of the present disclosure, the present disclosure also provides a control method of the electronic device.
Fig. 2 is a flowchart illustrating a control method of an electronic device according to another embodiment of the disclosure.
As shown in fig. 2, the control method of the electronic device may include the steps of:
step 201, acquiring a channel value of each color channel collected by a light sensing chip in the electronic device.
In the embodiments of the present disclosure, the color channels may include a red R channel, a green G channel, and a blue B channel, or the color channels may include a transparent C channel, a red R channel, a green G channel, and a blue B channel, which is not limited by the present disclosure.
In the embodiment of the disclosure, after the light sensing chip in the electronic device acquires the channel value of each color channel, the channel value of each color channel acquired by the light sensing chip in the electronic device may be acquired. It should be noted that the channel value of the color channel is collected by the light sensing chip at the current time.
As an example, when the color channels include a red R channel, a green G channel, and a blue B channel, the light sensing chip in the electronic device may collect channel values of the R channel, the G channel, and the B channel, so that channel values corresponding to the color channels collected by the light sensing chip in the electronic device may be obtained.
As another example, when the color channels include a transparent C channel, a red R channel, a green G channel, and a blue B channel, the light sensing chip in the electronic device may collect channel values of the C channel, the R channel, the G channel, and the B channel, so that channel values corresponding to the color channels collected by the light sensing chip in the electronic device may be obtained.
And step 202, determining the working state of the infrared emitter according to the channel value of each color channel.
In the disclosed embodiment, the operating state of the infrared emitter may be determined according to the channel value of each color channel.
As an example, taking the light sensing chip to collect R, G, B the channel values of the three channels, in a normal environment (i.e. the infrared emitter is in the off state, and there is no infrared interference), the channel value of the G channel and the channel value of the B channel are relatively close and relatively small, and the channel value of the R channel is relatively large, among the channel values of the color channels collected by the light sensing chip. When the infrared emitter is turned on, the light emitted by the infrared emitter directly influences the light sensing chip from the inside of the electronic device, so that the channel values of the R, G, B channels collected by the light sensing chip are increased greatly, wherein the increase value of the channel value of the G channel and the increase value of the channel value of the B channel are larger than the increase value of the channel value of the R channel, namely under the condition of infrared interference, the influence on the G channel and the B channel is larger than that on the R channel. Based on the above features, the operating state of the infrared device can be determined.
As another example, taking the channel values of the four channels collected C, R, G, B by the light sensing chip as an example, in a normal environment, the channel value of the G channel and the channel value of the B channel are relatively close and relatively small, and the channel value of the C channel and the channel value of the R channel are relatively close and relatively large, among the channel values of the color channels collected by the light sensing chip. When the infrared emitter is turned on, the light emitted by the infrared emitter directly influences the light sensing chip from the inside of the electronic device, so that the channel values of the C, R, G, B channels collected by the light sensing chip are greatly increased, wherein the increase value of the channel value of the G channel and the increase value of the channel value of the B channel are larger than the increase value of the channel value of the C channel and the increase value of the channel value of the R channel, namely under the condition of infrared interference, the influence on the G channel and the B channel is larger than that on the C channel and the R channel. Based on the above features, the operating state of the infrared device can be determined.
Step 203, responding to the on state of the working state, and acquiring the first illumination detected in the history.
And 204, performing brightness control on a screen of the electronic equipment according to the first illuminance.
The execution process of steps 203 and 204 may refer to the execution process of any embodiment of the present disclosure, and is not described herein again.
According to the control method of the electronic equipment, the channel values of the color channels acquired by the light sensing chip in the electronic equipment are acquired, so that the working state of the infrared emitter can be effectively determined according to the channel values of the color channels.
In a possible implementation manner of the embodiment of the present disclosure, in order to clearly illustrate how to determine the operating state of the infrared emitter according to the channel value of each color channel in the above implementation of the present disclosure in the case that the color channel includes a red R channel, a green G channel, and a blue B channel, the present disclosure further provides a control method of an electronic device.
Fig. 3 is a flowchart illustrating a control method of an electronic device according to another embodiment of the disclosure.
As shown in fig. 3, the control method of the electronic device may include the steps of:
step 301, obtaining channel values of each color channel collected by a light sensing chip in the electronic device.
The execution process of step 301 may refer to the execution process of any embodiment of the present disclosure, and is not described herein again.
Step 302, determining a first coefficient according to channel values corresponding to the R channel, the G channel, and the B channel.
In the embodiment of the present disclosure, the first coefficient may be determined according to the channel value of the R channel, the channel value of the G channel, and the channel value of the B channel.
To clearly illustrate how the first coefficient is determined according to the channel values corresponding to the R channel, the G channel, and the B channel, in one possible implementation manner of the embodiment of the present disclosure, a first sum of the channel value of the G channel and the channel value of the B channel may be determined, and a first ratio of the first sum to the channel value of the R channel may be determined, so that the first coefficient may be determined according to the first ratio. The first coefficient and the first ratio are in a positive relationship, that is, the first coefficient increases with the increase of the first ratio, and conversely, the first coefficient decreases with the decrease of the first ratio.
Specifically, after the channel values corresponding to the R channel, the G channel, and the B channel collected by the light sensing chip are obtained, a sum of the channel value of the G channel and the channel value of the B channel may be obtained by using a statistical algorithm, and is recorded as a first sum in the present disclosure. After the first sum is determined, a ratio of the first sum to the channel value of the R channel may be found, which is denoted as a first ratio in the present disclosure, so that a first coefficient may be determined according to the first ratio, where the first coefficient and the first ratio are in a forward relationship.
For example, the channel value of the R channel is labeled L1And the channel value of the G channel is L2And the channel value of the B channel is L3The first coefficient may then be determined according to the following formula:
H1=L2+L3;(1)
Figure BDA0003541564260000071
wherein H1Is a first sum of the channel value of the G channel and the channel value of the B channel,
Figure BDA0003541564260000072
is a first ratio of the first sum to the channel value of the R channel, K1Is the first coefficient.
It should be noted that, formula (2) is only exemplified by that the first coefficient is equal to the first ratio, and in practical application, the first coefficient may be a set multiple of the first ratio, for example, the first coefficient may be 1.1 × first ratio, 1.2 × first ratio, and the like, which is not limited in this disclosure.
Step 303, determining the working state of the infrared transmitter according to the first coefficient.
In the disclosed embodiment, the operating state of the infrared emitter may be determined based on the first coefficient.
It should be explained that, in a practical application scenario, the inventor can determine, based on analysis of a large amount of data: illustratively, the first coefficient is equal to the first ratio, and the first coefficients are all less than 1.5 when the electronic device is used in a low infrared environment; in particular, in a high infrared light source environment, for example, when the electronic device is used in a simulated tungsten halogen lamp light (also called A light), the first coefficient is less than 0.9; as another example, when the electronic device is used in analog horizontal daylight (also known as H-light), the first coefficient is less than 1.3. However, when the operating state of the infrared emitter is the on state, the channel values of the color channels collected by the light sensing chip are interfered by the infrared light of the infrared emitter, so that the first coefficients are all larger than 1.6. Therefore, in the present disclosure, it may be determined whether the channel value of each color channel collected by the light sensing chip is affected by the infrared light, that is, the operating state of the infrared emitter, according to the first coefficient.
In a possible implementation manner of the embodiment of the present disclosure, in a case that the first coefficient is less than or equal to a first set threshold (for example, when the first coefficient is equal to the first ratio, the first set threshold may be 1.5 or 1.6, and the like), the operating state of the infrared emitter may be determined to be an off state; in the case where the first coefficient is greater than the first set threshold, the operating state of the infrared transmitter may be determined to be the on state.
And 304, responding to the on state of the working state, and acquiring the first illumination historically detected.
And 305, performing brightness control on a screen of the electronic device according to the first illuminance.
The execution process of steps 304 to 305 may refer to the execution process of any embodiment of the present disclosure, and is not described herein again.
According to the control method of the electronic equipment, a first coefficient is determined according to channel values corresponding to an R channel, a G channel and a B channel; and determining the working state of the infrared transmitter according to the first coefficient. Therefore, the working state of the infrared transmitter can be effectively determined based on the channel values corresponding to the R channel, the G channel and the B channel.
It should be explained that, in the practical application scenario, the first coefficient is equal to the first ratio for exemplary illustration, and when the electronic device is used in a low infrared environment, the first coefficient is less than 1.5; when the working state of the infrared emitter is the opening state, the channel values of the color channels collected by the light sensing chip are interfered by the infrared light of the infrared emitter, and the first coefficients are all larger than 1.6. However, since the value 1.5 is close to the value 1.6, it may be disadvantageous to definitely judge the operating state of the infrared emitter.
Therefore, in order to solve the above-described problem, in the present disclosure, the operating state of the infrared emitter may also be determined based on the channel value of the transparent C-channel. The above process is described in detail below with reference to fig. 4.
Fig. 4 is a flowchart illustrating a control method of an electronic device according to another embodiment of the disclosure.
As shown in fig. 4, the control method of the electronic device may include the steps of:
step 401, obtaining channel values of each color channel collected by a light sensing chip in the electronic device.
Wherein, the color channel includes: c channel, R channel, G channel, and B channel.
Step 402, determining a first coefficient according to channel values corresponding to the R channel, the G channel and the B channel.
The execution process of steps 401 to 402 may refer to the execution process of any embodiment of the present disclosure, and is not described herein again.
At step 403, a second sum of the channel value of the R channel, the channel value of the G channel, and the channel value of the B channel is determined.
In the embodiment of the present disclosure, a statistical algorithm may be adopted to obtain a second sum of the channel value of the R channel, the channel value of the G channel, and the channel value of the B channel.
For example, the channel value of the R channel is labeled L1And the channel value of the G channel is L2And the channel value of the B channel is L3The second sum value may be determined according to the following formula:
H2=L1+L2+L3;(3)
wherein H2Is a second sum of the channel value of the R channel, the channel value of the G channel, and the channel value of the B channel.
At step 404, a difference between the second sum and the channel value of the C channel is determined.
In the disclosed embodiment, after determining the second sum, the difference between the second sum and the channel value of the C channel may be found.
For example, the second sum is H2And the channel value of the C channel is L4And the difference T between the second sum and the channel value of the C channel is as follows:
T=H1-L4;(4)
at step 405, a second ratio of the difference to the channel value of the C channel is determined.
In an embodiment of the present disclosure, a ratio between the difference and the channel value of the C channel may be determined, which is denoted as a second ratio in the present disclosure.
For example, the difference is T, and the channel value of C channel is L4Second ratio K of the difference to the channel value of the C channel2Comprises the following steps:
Figure BDA0003541564260000101
in step 406, a second coefficient is determined according to the second ratio.
In the embodiment of the present disclosure, the second coefficient may be determined according to a second ratio, where the second coefficient and the second ratio are in a positive relationship, that is, the second coefficient increases with the increase of the second ratio, and conversely, the second coefficient decreases with the decrease of the second ratio. For example, the second coefficient may be one-half of the second ratio (i.e., K)22), 0.6 second ratio, etc., to which the disclosure is not limited.
Step 407, determining the working state of the infrared transmitter according to the first coefficient and the second coefficient.
In the disclosed embodiment, the operating state of the infrared emitter may be determined based on the first coefficient and the second coefficient.
It should be noted that, in an actual application scenario, on the basis of analyzing a large amount of data, it may be determined that: illustratively, the second coefficient is half of a second ratio, the second coefficient being less than 0.1 when the electronic device is used in a low infrared environment; when the working state of the infrared emitter is an opening state, the channel values of the color channels acquired by the light sensing chip are interfered by infrared light of the infrared emitter, so that the second coefficient is far greater than 0.1. Therefore, in a possible implementation manner of the embodiment of the present disclosure, it may be determined whether a value of the first coefficient is greater than a first set threshold (for example, when the first coefficient is equal to the first ratio, the first set threshold may be 1.6, 1.5, and the like), and whether a value of the second coefficient is greater than a second set threshold (for example, when the second coefficient is equal to half of the second ratio, the second set threshold may be 0.1, 02, and the like), where the first coefficient is greater than the first set threshold and the second coefficient is greater than the second set coefficient, the operating state of the infrared emitter may be determined to be the on state, and where the first coefficient is less than or equal to the first set threshold, or the second coefficient is less than or equal to the second set threshold, the operating state of the infrared emitter may be determined to be the off state.
It should be noted that, when the external environment is low in brightness, the first coefficient is equal to the first ratio, and the second coefficient is half of the second ratio, for example, the channel values of the color channels (the channel value of the R channel, the channel value of the G channel, the channel value of the B channel, and the channel value of the C channel) acquired by the light sensing chip are relatively close to each other, and at this time, not only the first coefficient is greater than 1.6 and the second coefficient is greater than 0.1, but also the channel value of the C channel is far greater than 50 due to the interference of the infrared light on the light sensing chip.
Therefore, in order to accurately determine the operating state of the infrared emitter and exclude the interference of low brightness on determining the operating state of the infrared emitter, in a possible implementation manner of the embodiment of the disclosure, in a case where the first coefficient is greater than the first set threshold and the second coefficient is greater than the second set threshold, it may be further determined whether the channel value of the C channel is greater than a set value (e.g., 50, 45, etc.), in a case where the channel value of the C channel is greater than the set value, it may be determined that the operating state of the infrared emitter is an on state, and in a case where the first coefficient is less than or equal to the first set threshold, and/or the second coefficient is less than or equal to the second set threshold, and/or in a case where the channel value of the C channel is less than or equal to the set value, it may be determined that the operating state of the infrared emitter is an off state.
In the embodiment of the present disclosure, the first set threshold is preset, for example, the first set threshold may be 1.55, 1.6, and the like, which is not limited by the present disclosure.
In the embodiment of the present disclosure, the second set threshold is preset, for example, the second set threshold may be 0.1, 0.2, and the like, which is not limited by the present disclosure.
In the embodiment of the present disclosure, the setting value is preset, for example, the setting value may be 50, 60, and the like, which is not limited by the present disclosure.
And step 408, responding to the on state of the working state, and acquiring the first illumination historically detected.
And step 409, performing brightness control on the screen of the electronic equipment according to the first illuminance.
The execution process of steps 408 to 409 may refer to the execution process of any embodiment of the present disclosure, and is not described herein again.
As an application scenario, the first coefficient is equal to the first ratio, the second coefficient is half of the second ratio, the first set threshold is 1.6, the second set threshold is 0.1, and the set value is 50, after the photo sensor chip acquires the channel value corresponding to the C, R, G, B channel, if the first coefficient is greater than 1.6, the second coefficient is greater than 0.1, and the channel value of the C channel is greater than 50, it is determined that the channel value of each color channel collected by the light sensing chip is affected by the infrared light, and at this time, the drive of the light sensing chip can calculate the illuminance without the channel value corresponding to the C, R, G, B channel collected by the light sensing chip at this time, and does not report the illuminance to a HAL (Hardware Abstraction Layer), therefore, the electronic equipment can control the brightness of the screen of the electronic equipment according to the illuminance reported to the HAL layer by the driving of the last light sensing chip.
The control method of the electronic device in the embodiment of the disclosure determines a second sum of a channel value of an R channel, a channel value of a G channel and a channel value of a B channel; determining a difference value between the second sum value and the channel value of the C channel; determining a second ratio of the difference value to the channel value of the C channel; determining a second coefficient according to the second ratio; and determining the working state of the infrared transmitter according to the first coefficient and the second coefficient. Therefore, the working state of the infrared transmitter is determined based on the channel value of the R channel, the channel value of the G channel, the channel value of the B channel and the channel value of the C channel, and the accuracy and reliability of the determination result can be improved.
In order to clearly illustrate how the working state of the infrared emitter in the electronic device is detected in the above embodiments of the present disclosure, the present disclosure also provides a control method of the electronic device.
Fig. 5 is a flowchart illustrating a control method of an electronic device according to another embodiment of the disclosure.
As shown in fig. 5, the control method of the electronic device may include the steps of:
step 501, inquiring power supply parameters of an infrared lamp in an infrared transmitter through a Power Management Integrated Circuit (PMIC).
In the embodiment of the present disclosure, the Power supply parameter of the infrared lamp in the infrared transmitter may be queried through a PMIC (Power Management Integrated Circuit). For example, the power supply parameters may include voltage, current, and the like.
And 502, determining that the working state of the infrared transmitter is the starting state under the condition that the infrared lamp is determined to be in the power supply state according to the power supply parameters.
In the disclosed embodiment, the power supply parameter is used for determining whether the infrared lamp is in a power supply state or a power off state.
As an example, in the case where the power supply parameter is greater than or equal to a third set threshold (such as 0, 0.1, etc.), it may be determined that the infrared lamp is in the power supply state.
In the embodiment of the disclosure, whether the infrared lamp is in the power supply state or not can be determined according to the power supply parameter, and under the condition that the infrared lamp is in the power supply state according to the power supply parameter, the working state of the infrared transmitter can be determined to be in the on state.
And 503, under the condition that the infrared lamp is determined to be in the power-off state according to the power supply parameters, determining that the working state of the infrared transmitter is in the off state.
Still illustratively described in the above example, in the case where the power supply parameter is smaller than a third set threshold (e.g., 0, 0.1, etc.), it may be determined that the infrared lamp is in the power-off state.
In the embodiment of the disclosure, whether the infrared lamp is in the power-off state or not can be determined according to the power supply parameter, and under the condition that the infrared lamp is in the power-off state according to the power supply parameter, the working state of the infrared transmitter can be determined to be the off state.
It should be noted that step 502 and step 503 are executed alternatively, and when step 502 is executed, step 504 and the subsequent execution processes thereof may be continued.
And step 504, responding to the on state of the working state, and acquiring the first illumination historically detected.
And 505, performing brightness control on a screen of the electronic device according to the first illuminance.
The execution process of steps 504 to 505 may refer to the execution process of any embodiment of the present disclosure, and is not described herein again.
As an application scenario, in a sampling function of the drive of the light sensing chip, a power supply parameter of an infrared lamp in the infrared transmitter may be queried through the PMIC, and if it is determined that the infrared lamp is in a power supply state according to the power supply parameter, the illuminance may not be calculated according to a channel value corresponding to the C, R, G, B channel collected by the light sensing chip this time, but the illuminance reported to the HAL layer according to the drive of the light sensing chip last time is adopted to perform brightness control on the screen of the electronic device.
According to the control method of the electronic equipment, power supply parameters of an infrared lamp in an infrared transmitter are inquired through a Power Management Integrated Circuit (PMIC); under the condition that the infrared lamp is determined to be in a power supply state according to the power supply parameters, determining that the working state of the infrared transmitter is in an opening state; and under the condition that the infrared lamp is determined to be in the power-off state according to the power supply parameters, determining that the working state of the infrared transmitter is in the off state. Therefore, the working state of the infrared transmitter can be effectively and accurately determined based on the working state of the infrared lamp in the infrared transmitter.
In order to clearly illustrate how the working state of the infrared emitter in the electronic device is detected in the above embodiments of the present disclosure, the present disclosure also provides a control method of the electronic device.
Fig. 6 is a flowchart illustrating a control method of an electronic device according to another embodiment of the disclosure.
As shown in fig. 6, the control method of the electronic device may include the steps of:
step 601, obtaining a value of a set flag bit, wherein the set flag bit is used for identifying the on-off state of an infrared remote control corresponding to an infrared transmitter.
In the embodiment of the present disclosure, the setting flag is used to identify the on-off state of the infrared remote control corresponding to the infrared emitter, that is, the value of the setting flag may be used to indicate the on-off state of the infrared remote control corresponding to the infrared emitter.
In the embodiment of the disclosure, the value of the set flag may be obtained, so as to determine the on-off state of the infrared remote control corresponding to the infrared emitter according to the value of the set flag.
Step 602, determining that the working state of the infrared emitter is an on state under the condition that the value of the set flag bit is the first value.
In the embodiment of the present disclosure, the first value is preset, for example, the first value may be 0, 1, 01, 10, and the like, which is not limited by the present disclosure.
In the embodiment of the present disclosure, under the condition that the value of the setting flag is the first value, it may be determined that the operating state of the infrared emitter is the on state.
For example, if the first value is 1, when the flag bit is set to have a value of 1, it may be determined that the infrared remote control corresponding to the infrared emitter is in an on state.
It should be noted that the above example of the first value is only an example, and in practical application, the first value may be set according to practical requirements, which is not limited in this disclosure.
Step 603, determining that the working state of the infrared transmitter is a closed state under the condition that the value of the set flag bit is the second value.
In the embodiment of the present disclosure, the second value is preset, for example, the second value may be 1, 0, 10, 11, and the like, which is not limited by the present disclosure.
It should be noted that the first value is different from the second value, so as to ensure that the working state of the infrared emitter can be accurately judged according to the set flag bit.
In the embodiment of the present disclosure, under the condition that the value of the setting flag is the second value, it may be determined that the operating state of the infrared emitter is the on state.
For example, if the second value is 0, when the flag bit is set to be 0, it may be determined that the infrared remote control corresponding to the infrared transmitter is in an off state.
It should be noted that, the above example of setting the second value is only exemplary, and in practical applications, the second value may be set according to actual requirements, which is not limited by the present disclosure.
Step 604, in response to the operating state being the on state, obtaining the first illuminance detected historically.
Step 605, performing brightness control on a screen of the electronic device according to the first illuminance.
The execution process of steps 604 to 605 may refer to the execution process of any embodiment of the present disclosure, and is not described herein again.
As an application scenario, taking the first value as 1 and the second value as 0 for an exemplary illustration, an upper layer (for example, a frame layer (application framework layer)) may record a flag (denoted as a set flag in this disclosure) being used by an infrared transmitter, where after a user presses an infrared remote control (for example, a button) corresponding to the infrared transmitter, the set flag may be set to 1, and after the use of the infrared transmitter is finished, the set flag may be set to 0. When the setting flag bit is 1, even if the drive of the light sensing chip calculates the illuminance according to the channel value of each color channel acquired by the light sensing chip this time, and reports the illuminance to the HAL layer, the upper layer does not use the illuminance, but directly loses the illuminance. For example, the upper layer may perform brightness control on the screen of the electronic device according to the illuminance of the last use.
The control method of the electronic equipment comprises the steps of obtaining a value of a set flag bit, wherein the set flag bit is used for identifying the on-off state of an infrared remote control corresponding to an infrared emitter; under the condition that the value of the set flag bit is the first value, determining that the working state of the infrared transmitter is an on state; and under the condition that the value of the set zone bit is the second value, determining that the working state of the infrared transmitter is a closed state. Therefore, the working state of the infrared emitter can be effectively acquired according to the value of the set flag bit, and the accuracy and reliability of the working state determination result are improved.
It should be noted that in the control methods of the electronic device provided in the embodiments of fig. 1 to 6 of the present disclosure, any embodiment of the present disclosure implements brightness control on a screen of the electronic device when detecting that the operating state of the infrared emitter is the on state.
Correspondingly, in order to clearly illustrate how the brightness control of the screen of the electronic device is realized in the present disclosure when the operating state of the infrared emitter is detected as the off state, the present disclosure further provides a control method of the electronic device.
Fig. 7 is a flowchart illustrating a control method of an electronic device according to another embodiment of the disclosure.
As shown in fig. 7, the control method of the electronic device may include the steps of:
step 701, detecting the working state of an infrared emitter in electronic equipment.
The execution process of step 701 may refer to the execution process of any embodiment of the present disclosure, and is not described herein again.
In step 702, in response to the operating state being the off state, a second illuminance is determined according to the channel values of the color channels collected by the light sensing chip.
In the embodiment of the disclosure, when the operating state of the infrared emitter is the off state, it may be determined that the light sensing chip is not interfered by infrared light, and at this time, the second illuminance may be determined according to the channel value of each color channel currently acquired by the light sensing chip.
And 703, performing brightness control on the screen of the electronic device according to the second illuminance.
In the embodiment of the present disclosure, the brightness of the screen of the electronic device may be controlled according to the second illuminance.
It should be noted that, the screen brightness of the electronic device and the second illuminance are in a forward relationship, and when the second illuminance is relatively low, the screen brightness of the electronic device is relatively low; when the second illumination is relatively high, the screen brightness of the electronic device is high.
In the embodiment of the disclosure, in response to the working state being the closed state, determining a second illuminance according to the channel value of each color channel acquired by the light sensing chip; and controlling the brightness of the screen of the electronic equipment according to the second illuminance. Therefore, when the infrared emitter is in a closed state, the light sensing chip is not interfered by infrared light, so that the brightness of the screen of the electronic equipment can be controlled according to the second illuminance determined by the channel value of each color channel currently acquired by the light sensing chip, the brightness of the screen can be matched with the ambient brightness of the external environment, and the use experience of a user is improved.
Corresponding to the control method of the electronic device provided in the embodiments of fig. 1 to 7, the present disclosure also provides a control apparatus of the electronic device, and since the control apparatus of the electronic device provided in the embodiments of the present disclosure corresponds to the control method of the electronic device provided in the embodiments of fig. 1 to 7, the implementation manner of the control method of the electronic device is also applicable to the control apparatus of the electronic device provided in the embodiments of the present disclosure, and is not described in detail in the embodiments of the present disclosure.
Fig. 8 is a schematic structural diagram of a control device of an electronic device according to an embodiment of the present disclosure.
As shown in fig. 8, the control apparatus 800 of the electronic device may include: a detection module 801, an acquisition module 802, and a first control module 803.
The detecting module 801 is configured to detect an operating state of an infrared emitter in an electronic device.
The obtaining module 802 is configured to obtain a first illuminance detected historically in response to the operating state being an on state.
The first control module 803 is configured to perform brightness control on a screen of the electronic device according to the first illuminance.
In a possible implementation manner of the embodiment of the present disclosure, the detecting module 801 is configured to: acquiring channel values of all color channels acquired by a light sensing chip in electronic equipment; and determining the working state of the infrared emitter according to the channel value of each color channel.
In a possible implementation manner of the embodiment of the present disclosure, the color channels include a red R channel, a green G channel, and a blue B channel, and the detection module 801 is configured to: determining a first coefficient according to channel values corresponding to an R channel, a G channel and a B channel; and determining the working state of the infrared transmitter according to the first coefficient.
In a possible implementation manner of the embodiment of the present disclosure, the detecting module 801 is configured to: determining a first sum of the channel value of the G channel and the channel value of the B channel; determining a first ratio of the first sum to a channel value of the R channel; and determining a first coefficient according to the first ratio, wherein the first coefficient and the first ratio are in a positive relation.
In a possible implementation manner of the embodiment of the present disclosure, the color channel further includes a transparent C channel, and the detection module 801 is configured to: determining a second sum of the channel value of the R channel, the channel value of the G channel and the channel value of the B channel; determining a difference value between the second sum value and the channel value of the C channel; determining a second ratio of the difference to the channel value of the C channel; determining a second coefficient according to the second ratio, wherein the second coefficient and the second ratio are in a forward relation; and determining the working state of the infrared transmitter according to the first coefficient and the second coefficient.
In a possible implementation manner of the embodiment of the present disclosure, the detecting module 801 is configured to: determining that the working state of the infrared transmitter is an open state under the condition that the first coefficient is greater than a first set threshold, the second coefficient is greater than a second set threshold, and the channel value of the C channel is greater than a set value, wherein the first set threshold is greater than the second set threshold; and determining that the working state of the infrared transmitter is a closed state under the condition that the first coefficient is less than or equal to a first set threshold value, and/or the second coefficient is less than or equal to a second set threshold value, and/or the channel value of the C channel is less than or equal to a set value.
In a possible implementation manner of the embodiment of the present disclosure, the detecting module 801 is configured to: inquiring power supply parameters of an infrared lamp in an infrared transmitter through a PMIC (integrated power management circuit); under the condition that the infrared lamp is determined to be in a power supply state according to the power supply parameters, determining that the working state of the infrared transmitter is in an opening state; and under the condition that the infrared lamp is determined to be in the power-off state according to the power supply parameters, determining that the working state of the infrared transmitter is in the off state.
In a possible implementation manner of the embodiment of the present disclosure, the detecting module 801 is configured to: obtaining a value of a set flag bit, wherein the set flag bit is used for identifying the on-off state of an infrared remote control corresponding to an infrared transmitter; under the condition that the value of the set flag bit is the first value, determining that the working state of the infrared transmitter is an on state; and under the condition that the value of the set flag bit is the second value, determining that the working state of the infrared transmitter is the closed state.
In a possible implementation manner of the embodiment of the present disclosure, the control apparatus 800 of the electronic device may further include:
and the determining module is used for determining the second illuminance according to the channel value of each color channel acquired by the light sensing chip in response to the fact that the working state is the closed state.
And the second control module is used for controlling the brightness of the screen of the electronic equipment according to the second illuminance.
The control device of the electronic equipment of the embodiment of the disclosure detects the working state of the infrared emitter in the electronic equipment; responding to the fact that the working state is the opening state, and obtaining first illumination historically detected; and controlling the brightness of the screen of the electronic equipment according to the first illuminance. Therefore, under the condition that the working state of the infrared emitter is in the opening state, the brightness of the screen of the electronic equipment is controlled according to the first illuminance detected historically, instead of the illuminance calculated according to the channel value of each color channel collected by the current light sensing chip, the brightness of the screen of the electronic equipment is controlled, the situation that the light sensing chip is interfered by the emitted light of the infrared emitter and the illuminance calculated according to the channel value is not matched with the ambient brightness can be avoided, the accuracy of the brightness control of the screen of the electronic equipment is improved, and the use experience of a user is improved.
In order to implement the above embodiments, the present disclosure also provides an electronic device, including: the electronic device comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the control method of the electronic device as set forth in any one of the preceding embodiments of the disclosure.
In order to achieve the above embodiments, the present disclosure also proposes a non-transitory computer-readable storage medium on which a computer program is stored, which when executed by a processor implements a control method of an electronic device as proposed in any of the preceding embodiments of the present disclosure.
In order to implement the above embodiments, the present disclosure also proposes a computer program product, wherein when the instructions in the computer program product are executed by a processor, the control method of the electronic device as proposed in any of the foregoing embodiments of the present disclosure is executed.
FIG. 9 is a block diagram illustrating an electronic device in accordance with an example embodiment. For example, the electronic device 900 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 9, electronic device 900 may include one or more of the following components: a processing component 902, a memory 904, a power component 906, a multimedia component 908, an audio component 910, an input/output (I/O) interface 912, a sensor component 914, and a communications component 916.
The processing component 902 generally controls overall operation of the electronic device 900, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. Processing component 902 may include one or more processors 920 to execute instructions to perform all or a portion of the steps of the methods described above. Further, processing component 902 can include one or more modules that facilitate interaction between processing component 902 and other components. For example, the processing component 902 can include a multimedia module to facilitate interaction between the multimedia component 908 and the processing component 902.
The memory 904 is configured to store various types of data to support operation at the electronic device 900. Examples of such data include instructions for any application or method operating on the electronic device 900, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 904 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power component 906 provides power to the various components of the electronic device 900. Power components 906 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for electronic device 900.
The multimedia components 908 include a screen that provides an output interface between the electronic device 900 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 908 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 900 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 910 is configured to output and/or input audio signals. For example, the audio component 910 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 900 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 904 or transmitted via the communication component 916. In some embodiments, audio component 910 also includes a speaker for outputting audio signals.
I/O interface 912 provides an interface between processing component 902 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 914 includes one or more sensors for providing status evaluations of various aspects of the electronic device 900. For example, sensor assembly 914 may detect an open/closed state of electronic device 900, the relative positioning of components, such as a display and keypad of electronic device 900, sensor assembly 914 may also detect a change in the position of electronic device 900 or a component of electronic device 900, the presence or absence of user contact with electronic device 900, orientation or acceleration/deceleration of electronic device 900, and a change in the temperature of electronic device 900. The sensor assembly 914 may include a proximity sensor configured to detect the presence of a nearby object in the absence of any physical contact. The sensor assembly 914 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 914 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 916 is configured to facilitate wired or wireless communication between the electronic device 900 and other devices. The electronic device 900 may access a wireless network based on a communication standard, such as WiFi, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 916 receives a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 916 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 900 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as memory 904 comprising instructions, executable by processor 920 of electronic device 900 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Moreover, various embodiments or examples and features of various embodiments or examples described in this specification can be combined and combined by one skilled in the art without being mutually inconsistent.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present disclosure, "a plurality" means at least two, e.g., two, three, etc., unless explicitly specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present disclosure in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present disclosure.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are well known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present disclosure have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present disclosure, and that changes, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present disclosure.

Claims (18)

1. A method of controlling an electronic device, the method comprising:
detecting the working state of an infrared transmitter in the electronic equipment;
responding to the fact that the working state is an opening state, and obtaining first illuminance detected historically;
and controlling the brightness of the screen of the electronic equipment according to the first illuminance.
2. The method of claim 1, wherein the detecting the operating status of the infrared emitter in the electronic device comprises:
acquiring channel values of all color channels acquired by a light sensing chip in the electronic equipment;
and determining the working state of the infrared emitter according to the channel value of each color channel.
3. The method of claim 2, wherein the color channels comprise a red R channel, a green G channel, and a blue B channel;
determining the operating state of the infrared emitter according to the channel value of each color channel, including:
determining a first coefficient according to channel values corresponding to the R channel, the G channel and the B channel;
and determining the working state of the infrared transmitter according to the first coefficient.
4. The method of claim 3, wherein determining the first coefficient according to the channel values corresponding to the R channel, the G channel, and the B channel comprises:
determining a first sum of the channel value of the G channel and the channel value of the B channel;
determining a first ratio of the first sum to a channel value of the R channel;
and determining the first coefficient according to the first ratio.
5. The method of claim 3 or 4, wherein the color channel further comprises a transparent C channel, and wherein determining the operating state of the infrared emitter from the first coefficient comprises:
determining a second sum of the channel value of the R channel, the channel value of the G channel, and the channel value of the B channel;
determining a difference value of the second sum value and a channel value of the C channel;
determining a second ratio of the difference to a channel value of the C channel;
determining a second coefficient according to the second ratio;
and determining the working state of the infrared transmitter according to the first coefficient and the second coefficient.
6. The method of claim 5, wherein determining the operating state of the infrared emitter based on the first coefficient and the second coefficient comprises:
determining that the working state of the infrared emitter is an on state under the condition that the first coefficient is greater than a first set threshold, the second coefficient is greater than a second set threshold, and the channel value of the C channel is greater than a set value, wherein the first set threshold is greater than the second set threshold;
and determining that the working state of the infrared emitter is a closed state under the condition that the first coefficient is smaller than or equal to the first set threshold, and/or the second coefficient is smaller than or equal to the second set threshold, and/or the channel value of the C channel is smaller than or equal to a set value.
7. The method of claim 1, wherein the detecting the operating status of the infrared emitter in the electronic device comprises:
inquiring power supply parameters of an infrared lamp in the infrared transmitter through a PMIC (integrated power management circuit);
under the condition that the infrared lamp is determined to be in the power supply state according to the power supply parameters, determining that the working state of the infrared transmitter is in the starting state;
and determining that the working state of the infrared transmitter is a closed state under the condition that the infrared lamp is determined to be in a power-off state according to the power supply parameters.
8. The method of claim 1, wherein the detecting the operating status of the infrared emitter in the electronic device comprises:
obtaining a value of a set flag bit, wherein the set flag bit is used for identifying the on-off state of an infrared remote control corresponding to the infrared transmitter;
under the condition that the value of the set flag bit is a first value, determining that the working state of the infrared transmitter is an on state;
and under the condition that the value of the set flag bit is the second value, determining that the working state of the infrared transmitter is a closed state.
9. The method of claim 1, further comprising:
responding to the working state of the light sensing chip, and determining a second illuminance according to the channel value of each color channel acquired by the light sensing chip;
and controlling the brightness of the screen of the electronic equipment according to the second illuminance.
10. An apparatus for controlling an electronic device, the apparatus comprising:
the detection module is used for detecting the working state of an infrared transmitter in the electronic equipment;
the acquisition module is used for responding to the starting state of the working state and acquiring the first illuminance detected historically;
and the first control module is used for controlling the brightness of the screen of the electronic equipment according to the first illuminance.
11. The apparatus of claim 10, wherein the detection module is configured to:
acquiring channel values of all color channels acquired by a light sensing chip in the electronic equipment;
and determining the working state of the infrared emitter according to the channel value of each color channel.
12. The apparatus of claim 11, wherein the color channels comprise a red R channel, a green G channel, and a blue B channel, and wherein the detection module is configured to:
determining a first coefficient according to channel values corresponding to the R channel, the G channel and the B channel;
and determining the working state of the infrared transmitter according to the first coefficient.
13. The apparatus of claim 12, wherein the detection module is configured to:
determining a first sum of the channel value of the G channel and the channel value of the B channel;
determining a first ratio of the first sum to a channel value of the R channel;
and determining the first coefficient according to the first ratio.
14. The apparatus of claim 11 or 12, wherein the color channel further comprises a transparent C-channel, the detection module to:
determining a second sum of the channel value of the R channel, the channel value of the G channel, and the channel value of the B channel;
determining a difference value of the second sum value and a channel value of the C channel;
determining a second ratio of the difference to a channel value of the C channel;
determining a second coefficient according to the second ratio;
and determining the working state of the infrared transmitter according to the first coefficient and the second coefficient.
15. The apparatus of claim 14, wherein the detection module is configured to:
determining that the working state of the infrared emitter is an on state under the condition that the first coefficient is greater than a first set threshold, the second coefficient is greater than a second set threshold, and the channel value of the C channel is greater than a set value, wherein the first set threshold is greater than the second set threshold;
and determining that the working state of the infrared emitter is a closed state under the condition that the first coefficient is smaller than or equal to the first set threshold, and/or the second coefficient is smaller than or equal to the second set threshold, and/or the channel value of the C channel is smaller than or equal to the set value.
16. The apparatus of claim 10, wherein the detection module is configured to:
inquiring power supply parameters of an infrared lamp in the infrared transmitter through a PMIC (integrated power management circuit);
under the condition that the infrared lamp is determined to be in a power supply state according to the power supply parameters, determining that the working state of the infrared transmitter is in an opening state;
and under the condition that the infrared lamp is determined to be in the power-off state according to the power supply parameters, determining that the working state of the infrared transmitter is in the off state.
17. An electronic device, comprising:
a processor;
a memory for storing executable instructions of the processor; wherein the processor is configured to invoke and execute the memory-stored executable instructions to implement the control method of the electronic device of any one of claims 1-9.
18. A non-transitory computer-readable storage medium on which a computer program is stored, the program, when executed by a processor, implementing a control method of an electronic device according to any one of claims 1 to 9.
CN202210245710.5A 2022-03-10 2022-03-10 Control method and device of electronic equipment, electronic equipment and storage medium Pending CN114639364A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210245710.5A CN114639364A (en) 2022-03-10 2022-03-10 Control method and device of electronic equipment, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210245710.5A CN114639364A (en) 2022-03-10 2022-03-10 Control method and device of electronic equipment, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114639364A true CN114639364A (en) 2022-06-17

Family

ID=81947577

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210245710.5A Pending CN114639364A (en) 2022-03-10 2022-03-10 Control method and device of electronic equipment, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114639364A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001103369A (en) * 1999-09-30 2001-04-13 Fujitsu General Ltd Image sensor system
CN109257507A (en) * 2018-11-19 2019-01-22 Oppo(重庆)智能科技有限公司 A kind of method, mobile terminal and storage medium adjusting screen intensity
CN109951594A (en) * 2017-12-20 2019-06-28 广东欧珀移动通信有限公司 Intelligent adjusting method, device, storage medium and the mobile terminal of screen intensity
CN110750772A (en) * 2019-09-12 2020-02-04 华为技术有限公司 Electronic equipment and sensor control method
CN110930945A (en) * 2019-12-20 2020-03-27 西安易朴通讯技术有限公司 Method, device and system for adjusting brightness of display screen
CN112447132A (en) * 2019-08-27 2021-03-05 北京小米移动软件有限公司 Terminal device, display control method, display control device, and computer-readable storage medium
CN113495629A (en) * 2021-09-08 2021-10-12 艾伯资讯(深圳)有限公司 Notebook computer display screen brightness adjusting system and method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001103369A (en) * 1999-09-30 2001-04-13 Fujitsu General Ltd Image sensor system
CN109951594A (en) * 2017-12-20 2019-06-28 广东欧珀移动通信有限公司 Intelligent adjusting method, device, storage medium and the mobile terminal of screen intensity
CN109257507A (en) * 2018-11-19 2019-01-22 Oppo(重庆)智能科技有限公司 A kind of method, mobile terminal and storage medium adjusting screen intensity
CN112447132A (en) * 2019-08-27 2021-03-05 北京小米移动软件有限公司 Terminal device, display control method, display control device, and computer-readable storage medium
CN110750772A (en) * 2019-09-12 2020-02-04 华为技术有限公司 Electronic equipment and sensor control method
CN110930945A (en) * 2019-12-20 2020-03-27 西安易朴通讯技术有限公司 Method, device and system for adjusting brightness of display screen
CN113495629A (en) * 2021-09-08 2021-10-12 艾伯资讯(深圳)有限公司 Notebook computer display screen brightness adjusting system and method

Similar Documents

Publication Publication Date Title
US9913340B2 (en) Method and device for controlling illumination levels
EP2991067B1 (en) Backlight brightness control method and device
KR102508108B1 (en) Image acquisition module, electronic equipment, image acquisition method and storage medium
US10234924B2 (en) Method and apparatus for displaying time on mobile device
CN104919515A (en) Apparatus and method for controlling display of mobile terminal
CN103917023A (en) Illumination method and terminal
US11011124B2 (en) Method and device for adjusting current of backlight, and storage medium
CN112016344A (en) State detection method and device of signal indicator lamp and driving control method and device
CN111210792A (en) Method and device for determining ambient light brightness, terminal and storage medium
CN112764659B (en) Information processing method and device, electronic device and storage medium
CN113074812B (en) Ambient light intensity detection method and device, electronic equipment and storage medium
CN108847199B (en) Brightness determination method and device
CN114639364A (en) Control method and device of electronic equipment, electronic equipment and storage medium
CN107809545B (en) Control method and device of intelligent equipment and storage medium
CN111883040B (en) Display effect adjusting method and device of display screen, terminal equipment and medium
CN112087539A (en) Screen light adjusting method for terminal equipment and terminal equipment
CN112565521B (en) Information processing method, device, terminal and storage medium
CN111292690B (en) Screen backlight brightness adjusting method and device
JP7127105B2 (en) Optical fingerprint module and signal processing method
CN115266035A (en) Method and device for detecting damage of display screen
CN115511843A (en) Breathing lamp detection method and device, electronic equipment and readable storage medium
CN115876436A (en) Brightness detection method and device, electronic equipment and storage medium
CN110990230A (en) State display method and device and electronic equipment
CN115718681A (en) Screen display method, display state determination method, calibration method and device
CN113821116A (en) Screen control method and device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination