CN107404575B - Method and device for optimizing screen control, storage medium and mobile terminal - Google Patents

Method and device for optimizing screen control, storage medium and mobile terminal Download PDF

Info

Publication number
CN107404575B
CN107404575B CN201710585084.3A CN201710585084A CN107404575B CN 107404575 B CN107404575 B CN 107404575B CN 201710585084 A CN201710585084 A CN 201710585084A CN 107404575 B CN107404575 B CN 107404575B
Authority
CN
China
Prior art keywords
value
threshold value
proximity sensor
proximity
screen control
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710585084.3A
Other languages
Chinese (zh)
Other versions
CN107404575A (en
Inventor
周意保
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201710585084.3A priority Critical patent/CN107404575B/en
Publication of CN107404575A publication Critical patent/CN107404575A/en
Application granted granted Critical
Publication of CN107404575B publication Critical patent/CN107404575B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions

Landscapes

  • Engineering & Computer Science (AREA)
  • Environmental & Geological Engineering (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Geophysics And Detection Of Objects (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The embodiment of the invention discloses a method and a device for optimizing screen control, a storage medium and a mobile terminal. The method comprises the steps of determining a corrected proximity value related to a proximity sensor characteristic curve under a strong light environment; comparing the corrected approach value with a first high threshold value of the screen control for the strong light environment; and determining a second high threshold value and a second low threshold value according to the comparison result, and respectively using the second high threshold value and the second low threshold value as screen control threshold values of the proximity sensor so as to control the screen to be turned off or turned on according to the second high threshold value and the second low threshold value. By adopting the technical scheme, the screen control threshold value of the proximity sensor can be adjusted according to the corrected proximity value in an individualized way, and the situation that the screen is not turned off when people face or ears approach the screen in a strong light environment is prevented.

Description

Method and device for optimizing screen control, storage medium and mobile terminal
Technical Field
The embodiment of the invention relates to a mobile terminal technology, in particular to a method and a device for optimizing screen control, a storage medium and a mobile terminal.
Background
With the development of smart phones towards light and thin, the sizes of components of the smart phones are required to be smaller and smaller. In order to meet this requirement, a three-in-one sensor, which incorporates a proximity sensor, an ambient light brightness sensor, and an Infrared (IR) emitting Light Emitting Diode (LED), is widely used in smart phones.
Currently, a smart phone monitors the intensity of Ambient light through an Ambient Light Sensor (ALS) to automatically adjust the brightness of a Liquid Crystal Display (LCD) backlight, or controls the on and off of a key lamp. Proximity Sensor (PS) and infrared emission LED, wherein, infrared emission LED is as Proximity sensor's transmitting terminal for through infrared emission LED transmission infrared light when the conversation, and receive the intensity value of the infrared light through face reflection through Proximity sensor's receiving terminal, judge whether the smart mobile phone presses close to the face according to this intensity value, can close off liquid crystal display when pressing close to and be shaded, play the effect of power saving. Meanwhile, for the capacitive touch screen, the output of the driving signal can be closed when the capacitive touch screen is close to the face, so that misoperation is prevented.
However, the scenario in which the user uses the smartphone is complicated and varied. For example, when the intensity of sunlight is very large, infrared rays in sunlight are collected by the receiving end of the proximity sensor, so that the intensity value of infrared rays received by the receiving end reaches several ten thousand lux, and the proportion of infrared rays emitted by the infrared emitting LED is very small. Individual differences in the sensor chips result in individual characteristic curves for the individual sensors. If the same high and low threshold values are used without considering such differences of the sensor chips, the measurement accuracy of the sensor is affected. Meanwhile, the proximity sensor characteristic curve is nonlinear, and the linearity tends to be flat as the low noise value (e.g., infrared light in ambient light) becomes larger. Therefore, in a strong light environment, the approach value may become smaller, and at this time, even if the smartphone is close to the face, the screen cannot be controlled to be turned off.
Disclosure of Invention
The embodiment of the invention provides a method, a device, a storage medium and a mobile terminal for optimizing screen control, which can remove the interference of external environment light, improve the measurement precision of a sensor and realize normal screen lighting and screen extinguishing functions.
In a first aspect, an embodiment of the present invention provides a method for optimizing screen control, including:
determining a corrected proximity value related to a proximity sensor characteristic curve in a strong light environment;
comparing the modified proximity value to a first high threshold value of a screen control for a glare environment;
and determining a second high threshold value and a second low threshold value according to the comparison result, and respectively using the second high threshold value and the second low threshold value as screen control threshold values of the proximity sensor so as to control the screen to be turned off or turned on according to the second high threshold value and the second low threshold value.
In a second aspect, an embodiment of the present invention further provides an apparatus for optimizing screen control, where the apparatus includes:
the proximity value determining module is used for determining a corrected proximity value related to a proximity sensor characteristic curve under a strong light environment;
the threshold value comparison module is used for comparing the corrected approach value with a first high threshold value of the screen control aiming at the strong light environment;
and the threshold value determining module is used for determining a second high threshold value and a second low threshold value according to the comparison result, and respectively using the second high threshold value and the second low threshold value as screen control threshold values of the proximity sensor so as to control the screen to be turned off or turned on according to the second high threshold value and the second low threshold value.
In a third aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for optimizing screen state control according to the embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a mobile terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the method for optimizing screen state control according to the embodiment of the present invention.
According to the scheme for optimizing the screen control, the corrected proximity value related to the characteristic curve of the proximity sensor is determined in a strong light environment; comparing the modified proximity value to a first high threshold value of a screen control for a glare environment; and determining a second high threshold value and a second low threshold value according to the comparison result, and respectively using the second high threshold value and the second low threshold value as screen control threshold values of the proximity sensor to control the screen to be extinguished or lightened according to the second high threshold value and the second low threshold value, so that the screen control threshold values of the proximity sensor can be adjusted in an individualized manner according to the corrected proximity value, and the measurement accuracy of the sensor is improved. Meanwhile, the interference of external environment light is eliminated, the problem that the screen is not extinguished when being close to the screen under strong light is avoided, and the normal functions of screen lighting and screen extinguishing are realized.
Drawings
FIG. 1 is a schematic diagram of a proximity sensor of the prior art;
FIG. 2a is a schematic diagram of a proximity sensor of the prior art;
FIG. 2b is a schematic diagram of a control logic of an emitting end and a receiving end of a proximity sensor under strong light in the prior art;
FIG. 3a is a graph showing the relationship between the proximity sensor characteristic curve and the ideal curve under the influence of light ambient light;
FIG. 3b is a graph showing the relationship between the proximity sensor characteristic curve and the ideal curve under the influence of intense solar light;
FIG. 4 is a flow chart of a method for optimizing screen state control according to an embodiment of the present invention;
FIG. 5a is a flow chart of a method of determining a ratio of a proximity sensor characteristic to an ideal curve provided by an embodiment of the present invention;
FIG. 5b is a schematic diagram of a method of calculating a ratio of a proximity sensor characteristic curve to an ideal curve according to an embodiment of the present invention;
FIG. 6a is a flow chart of another method of determining a ratio of a proximity sensor characteristic to an ideal curve provided by an embodiment of the present invention;
FIG. 6b is a schematic diagram of another method of calculating a ratio of a proximity sensor characteristic curve to an ideal curve provided by embodiments of the present invention;
FIG. 7 is a flow chart of yet another method of determining a ratio of a proximity sensor characteristic to an ideal curve provided by an embodiment of the present invention;
FIG. 8 is a flow chart of another method for optimizing screen state control provided by an embodiment of the present invention;
FIG. 9 is a block diagram of an apparatus for optimizing screen control according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Generally, the proximity sensor functions to turn off the screen when the user makes a call and brings the mobile phone close to the face, so as to save power and prevent accidental touch. For example, when the user answers or makes a call and the face is close to the cell phone, the control screen goes off. And if the user takes the mobile phone away from the face, the proximity sensor is not shielded, and the screen is controlled to be lightened.
To better understand the working principle of the proximity sensor, fig. 1 provides a schematic structural diagram of the proximity sensor. As shown in fig. 1, the proximity sensor includes an emitting terminal 131 and a receiving terminal 132, emits infrared rays through an infrared LED lamp of the emitting terminal 131, and receives infrared rays through the receiving terminal 132. The proximity sensor 130 is disposed in a space formed by the display screen 120 and the housing, and may be disposed near the receiver. When the external obstruction 110 is close to the receiving end 132, the infrared rays emitted from the emitting end 131 are reflected by the external obstruction 110 and then partially incident on the receiving end. The chip processor inside the receiver 132 includes an analog-to-digital converter (ADC) that processes the intensity value of the infrared light entering the receiver 132. When there is no object to block, the intensity value of the infrared ray collected by the receiving end 132 is the minimum, and when the object is approaching, the intensity value of the infrared ray collected by the receiving end 132 is increasing continuously until the full range. Wherein, the measuring range of the proximity sensor is related to the digit of the register in the receiving end chip. For example, for an 8-bit register, the full scale is 256; for a 10-bit register, the full scale is 1024, for a 12-bit register, the full scale is 4096, and so on. And then, comparing the intensity value of the infrared rays collected by the receiving end with a preset threshold value, and controlling the display screen to be turned on or turned off according to the comparison result. For example, in the case of a proximity sensor having a 10-bit register, the proximity value is 50 when there is no object occlusion, and when the face is close to the proximity sensor, all infrared rays are reflected to the receiving end, and the proximity value is close to the full range, which is about 1024.
In a non-strong light mode, when the distance from a shielding object is generally specified to be 3-5 cm, the screen is turned off; the same is true when far away, i.e. the approach threshold and the far away threshold are set. In the bright screen state, when the approach value is larger than the approach threshold value (such as 400), the screen is turned off; in the black screen state, the screen starts to be lightened when the approach value is smaller than the far threshold (such as 300).
In order to more visually represent the operation of the proximity sensor, fig. 2a provides an operation diagram of the proximity sensor. As shown in fig. 2a, the emitting end 210, i.e., the infrared LED lamp and the receiving end 220, are disposed on the printed circuit board 230 (or the flexible circuit board), and are isolated from each other, i.e., infrared rays cannot be directly emitted from the infrared LED to the receiving end 220. The printed circuit board 230 is provided with a first driving circuit (not shown). The control pulse for controlling the infrared LED to be in the sleep mode, ON (LED ON) and OFF (LED OFF) and the sleep mode as shown in FIG. 2b is output through the driving circuit according to the set control period. Meanwhile, the printed circuit board 230 is further provided with a second driving circuit (not shown), and the second driving circuit controls the receiving terminal 220 to collect infrared rays according to a sleep-sampling-sleep mode according to a control period identical to the set period, and transmits the collected infrared signals to the analog-to-digital converter.
Illustratively, as shown in FIGS. 2a and 2b, infrared light emitted from the emitting end 210 is reflected by the obstruction into the receiving end 220. The receiving end 220 samples during the LED ON and LED OFF phases. For example, in the bright light mode, the receiving end 220 performs two sampling operations, and the first sampling operation is to read the infrared intensity value of the receiving end 220 without turning on the LED lamp of the emitting end 210; the second sampling is to turn on the LED lamp of the emitting end 210 to read the infrared intensity value of the receiving end 220. And inputting the infrared intensity value sampled and read for the first time into an analog-to-digital converter of a receiving end chip to obtain a first intensity value a. And inputting the infrared intensity value read by the second sampling into an analog-to-digital converter of the receiving end chip to obtain a second intensity value b. Then the true infrared signal intensity value is b-a. And comparing the real infrared signal intensity value with a preset threshold value, so that the mobile terminal can be judged to be in a close state or a far state.
Illustratively, when a telephone receiver is used for communication, infrared rays emitted by the infrared emission LED lamp enter a receiving end through face reflection, the mobile terminal calculates a proximity value by reading an infrared intensity value of the receiving end in the above manner, and whether the mobile terminal is close to the face is judged according to the proximity value. When the liquid crystal display screen is closed, the backlight of the liquid crystal display screen can be turned off, and the effect of saving electricity is achieved. Meanwhile, for the capacitive touch screen, the output of the driving signal to the touch screen is stopped, so that misoperation can be prevented. In addition, a plurality of proximity sensors can be used for simple gesture recognition and other applications. However, since the linearity of the proximity sensor chip (proximity sensor characteristic curve, i.e., solid line in fig. 3a and 3 b) is limited by technology and cannot reach an ideal state (ideal curve, i.e., dotted line in fig. 3a and 3 b), when the user uses the smartphone in strong light, the proximity value becomes smaller as the low noise value becomes larger. I.e. fig. 3a and 3b, the approach value under the influence of strong solar light (i.e. PS _ ON-PS _ OFF) is smaller than under the influence of light ambient light. Moreover, the stronger the ambient infrared ray intensity is, the higher the low noise is, and the closer value becomes. At this time, even if the mobile terminal is close to the face, the approach value is still less than the first threshold value, resulting in failure to turn off the screen. The screen state control scheme provided by the embodiment of the invention can well solve the problem that the screen is not turned off when the screen is close to the screen under strong light.
Fig. 4 is a flowchart of a method for optimizing screen state control according to an embodiment of the present invention, which may be performed by an apparatus for optimizing screen state control, where the apparatus may be implemented by software and/or hardware, and may be generally integrated in a mobile terminal. As shown in fig. 4, the method includes:
and step 410, determining a corrected proximity value related to the proximity sensor characteristic curve in a strong light environment.
The proximity sensor characteristic curve represents the relationship between the infrared intensity value input to an analog-to-digital converter (ADC) and the proximity value output by the ADC. Ideally, the characteristic curve is linear, as shown by the dotted line in fig. 3a and 3b, however, since the linearity of the proximity sensor is limited by technology, the characteristic curve of the proximity sensor cannot be made to coincide with the ideal curve, the actual characteristic curve of the proximity sensor is a solid line as shown in fig. 3a and 3b, and the slope of the characteristic curve of the proximity sensor decreases instead as the electrical signal (analog quantity) corresponding to the infrared ray input to the analog-to-digital converter increases. Especially in a strong light environment, the higher the intensity value of the ambient infrared light, the higher the low noise value of the proximity sensor. Wherein the strong light environment is an operating environment of the mobile terminal when the light intensity value exceeds a set light intensity threshold (for example, 6000 lux). The current light intensity value of the ambient light can be obtained and compared with the set light intensity threshold. And if the light intensity value of the current environment light exceeds the set light intensity threshold value, judging that the current mobile terminal is in a strong light environment.
The corrected proximity value may be a proximity value calculated from the compensated PS _ ON and PS _ OFF after compensating the infrared ray intensity values (PS _ ON and PS _ OFF) read by the receiving side based ON the difference between the proximity sensor characteristic curve and the ideal curve. For example, the difference between the proximity sensor characteristic curve and the ideal curve may be a ratio. In order to determine the ratio relationship between the proximity sensor characteristic curve and the ideal curve, the input infrared ray intensity value is taken as an object, the infrared ray intensity value is equally divided into a plurality of set intervals at equal intervals, and sub-line sections of the proximity sensor characteristic curve and the ideal curve in each set interval are respectively obtained. The smaller the range of the set interval is, the higher the accuracy of the proximity sensor characteristic curve fitting to the ideal curve is. In order to more accurately determine the ratio relationship, the interval between the setting sections may be reduced, that is, the interval between the setting sections is reduced, and the fitting accuracy is higher. The ratio between the ideal curve and the proximity sensor characteristic curve can be determined by comparing the sub-line segment of the proximity sensor characteristic curve in each set interval with the sub-line segment of the ideal curve. For example, the scale of the input infrared intensity value is divided into 0-500, 500-1000, …, 2500-3000, 3000-3500, 3500-4000 scale intervals by taking 500 as an interval, and the approaching value characteristic curve and the ideal curve have a ratio relation in each scale interval range. Taking a scale interval of 2500-3000 as an example, the following ratio relationship can be determined by comparing an ideal curve with a proximity sensor characteristic curve: the proximity sensor characteristic curve 3.5 is an ideal curve.
It is to be understood that when the proximity sensor characteristic curve and the ideal curve do not change according to the change of the environment, the range of the set interval may be specified in advance, for example, one scale interval may be formed every 500 scales, or one scale interval may be formed every 200 scales. The proximity sensor characteristic curve and the ideal curve may be divided according to a preset scale interval, and a ratio of the proximity sensor characteristic curve to the ideal curve in each set interval may be determined. And storing the corresponding relation between the ratio and the scale interval for direct query during use.
Alternatively, different fitting accuracy levels may be set according to the use environment (e.g., ambient light intensity values). For example, a first fitting accuracy level is set, which forms a scale interval corresponding to every 100 scales and is suitable for a first environment light intensity value range; the second fitting precision grade forms a scale interval corresponding to every 300 scales and is suitable for a second ambient light intensity value range; and a third fitting accuracy grade, which corresponds to every 500 scales to form a scale interval and is suitable for a third environment light intensity value range. Under each fitting accuracy level, the proximity sensor characteristic curve and the ideal curve can be divided according to each scale interval, and the ratio of the proximity sensor characteristic curve to the ideal curve in each set interval can be determined. When the device is used, the corresponding fitting precision grade can be determined according to the current ambient light intensity value, and the corresponding scale interval can be determined according to the currently read intensity values of the receiving end signals corresponding to the transmitting end in the opening state and the closing state, so that the ratio required for compensating the intensity value is determined.
If at least one of the proximity sensor characteristic curve and the ideal curve changes with the change of the environment, the sensor characteristic curve and the ideal curve need to be compared again before use, the ratio relationship between the proximity sensor characteristic curve and the ideal curve is determined, and the corresponding relationship between the stored scale interval and the ratio is updated.
And obtaining the intensity values of the receiving end signals corresponding to the opening state and the closing state of the transmitting end of the proximity sensor, respectively compensating the obtained intensity values according to the ratio of the characteristic curve and the ideal curve of the proximity sensor, and then calculating the corrected proximity value of the proximity sensor. For example: and turning on an LED lamp at the emitting end of the proximity sensor at a preset sampling time, and reading a first signal intensity value a from an analog-to-digital converter in the receiving end. And determining a ratio b for compensating the first signal intensity value a according to the set interval to which the first signal intensity value a belongs and the corresponding relation between the ratio and the set interval. And turning off an LED lamp at the emitting end of the proximity sensor at a preset sampling time, and reading a second signal intensity value c from an analog-to-digital converter in the receiving end. And determining the ratio d for compensating the second signal intensity value c according to the setting interval to which the second signal intensity value c belongs and the corresponding relation between the ratio and the setting interval. After compensation, the resulting corrected approach value PS Data is a b c d. The intensity of a first signal value corresponding to the on state of the LED lamp is larger than that of a second signal value corresponding to the off state of the LED lamp, and both b and d are natural numbers larger than 1, so that the value of the corrected approach value PS Data-a-b-c-d is a positive number.
Step 420, comparing the modified proximity value with a first high threshold value of the screen control for a strong light environment.
The first high threshold value is a screen control threshold value used for controlling the screen to be switched from the bright screen to the off screen under the strong light environment. In addition, the screen control threshold further comprises a first low threshold, and the screen control threshold is used for controlling the screen to be switched from the screen-off state to the screen-on state in the strong light environment.
The first high threshold value and the first low threshold value of the screen control for the strong light environment can be respectively calculated by the following formulas:
the first high threshold value is equal to the minimum indoor proximity value + X;
the first lower threshold value is equal to the indoor proximity value minimum value + Y;
the minimum value of the indoor proximity value may be in a non-proximity state, and the proximity value obtained in a non-highlight environment is updated in real time, and the minimum value of the indoor proximity value is the minimum value of the proximity values updated in real time. However, an abnormally small approach value may sometimes occur due to an abnormality of the proximity sensor chip. At this time, if the abnormally small approach value is set as the minimum value of the indoor approach values, the threshold value setting is affected. In order to solve the problem, indoor proximity values of set times can be continuously acquired according to a set period within a set time length, and the average values of the indoor proximity values of the set times are respectively calculated; and comparing the average values obtained in the set time length to determine a minimum average value, and taking the minimum average value as a reference approximate value. For example, 5 values may be continuously obtained from the proximity value updated in real time at set time intervals over a period of time, and the average value may be taken. Then, the smallest of these average values is taken as the reference proximity value, i.e., the true indoor proximity value minimum. X is a preset first parameter and represents a threshold value close to the screen-off, and Y is a preset second parameter and represents a threshold value far from the screen-on. The values of X and Y can be set by the developer according to the experimental results, for example, X can be set to 80, and Y can be set to 50.
And comparing the determined correction proximity value with the first high threshold value, and determining the magnitude relation between the correction proximity value and the first high threshold value.
And 430, determining a second high threshold value and a second low threshold value according to the comparison result, and respectively using the second high threshold value and the second low threshold value as screen control threshold values of the proximity sensor so as to control the screen to be turned off or turned on according to the second high threshold value and the second low threshold value.
And when the corrected proximity value is larger than a first high threshold value of the screen control aiming at the strong light environment, correcting the screen control threshold value of the proximity sensor according to the corrected proximity value. For example, the screen control threshold value of the proximity sensor may be determined by subtracting the corrected proximity value from a set fixed parameter. The set fixed parameters comprise a third parameter and a fourth parameter, and are marked as A and B, wherein the third parameter A represents a threshold value close to the screen-off state, and the fourth parameter B represents a threshold value far from the screen-on state. The values of a and B may also be set by the developer according to the experimental results, for example, a may be set to 100, and B may be set to 140. At this time, the method of correcting the screen control threshold value of the proximity sensor according to the corrected proximity value may be: and subtracting the third parameter from the corrected approach value to obtain a second high threshold value of the corrected screen control for the strong light environment. And subtracting the fourth parameter from the corrected approach value to obtain a second low threshold value of the corrected screen control for the strong light environment. And respectively taking the second high threshold value and the second low threshold value as the screen control threshold values of the proximity sensor.
In practical application, since the ambient light intensity changes in real time, the real-time correction proximity value PS Data in the high-light environment can be calculated by the above-mentioned method. When the corrected approach value PS Data is larger than a first high threshold value of the screen control aiming at the strong light environment, the screen control threshold value is automatically corrected to a second high threshold value and a second low threshold value. And then, when the mobile terminal is in a bright screen state, comparing the corrected approach value with a second high threshold value, and if the corrected approach value is greater than the second high threshold value, outputting an interrupt signal for controlling the screen to be off so as to control the screen to be off. And when the mobile terminal is in a screen-off state, comparing the corrected approach value with a second low threshold value, and if the corrected approach value is smaller than the second low threshold value, outputting an interrupt signal for controlling the screen to be lightened so as to control the screen to be lightened.
According to the technical scheme of the embodiment, a corrected proximity value related to a characteristic curve of a proximity sensor is determined in a strong light environment; comparing the modified proximity value to a first high threshold value of a screen control for a glare environment; and determining a second high threshold value and a second low threshold value according to the comparison result, and respectively using the second high threshold value and the second low threshold value as screen control threshold values of the proximity sensor to control the screen to be extinguished or lightened according to the second high threshold value and the second low threshold value, so that the screen control threshold values of the proximity sensor can be adjusted in an individualized manner according to the corrected proximity value, and the measurement accuracy of the sensor is improved. Meanwhile, the interference of external environment light is eliminated, the problem that the screen is not extinguished when being close to the screen under strong light is avoided, and the normal functions of screen lighting and screen extinguishing are realized.
Optionally, when the light intensity value of the current ambient light is smaller than the set light intensity threshold, the operation of optimizing the screen control is not performed. The advantage of setting up like this is in the environment that distinguishes mobile terminal and is located, uses the ratio compensation receiving terminal that obtains of calculation to open in the highlight environment and the intensity value that reads under the closed state of transmitting terminal to consider the difference of the characteristic curve of different proximity sensor chips, improve the measurement accuracy of sensor, avoid under the highlight being close to not putting out the condition emergence of shielding, and in non-highlight environment, adopt normal processing flow, reduce the operation of compensation, simplified the operation flow.
Fig. 5a is a flow chart of a method for determining a ratio of a proximity sensor characteristic curve to an ideal curve according to an embodiment of the present invention. As shown in fig. 5a, the method comprises:
and step 510, setting a scale interval with equal intervals, and dividing the characteristic curve and the ideal curve of the proximity sensor into at least two sub-line segments through the scale interval.
Figure 5b illustrates one method of calculating the ratio of the proximity sensor characteristic to the ideal curve. As shown in fig. 5b, a scale interval is set with a scale pitch of 500, 0 to 4000 are divided into 8 scale intervals, and each scale interval is provided with a sub-line segment close to the sensor characteristic curve and the ideal curve. The sub-line segments of the proximity sensor characteristic curve (i.e., the sub-line segments of the proximity sensor characteristic curve in each scale interval) and the sub-line segments of the ideal curve (i.e., the sub-line segments of the ideal curve in each scale interval) in each scale interval have a certain ratio relationship.
And 520, respectively determining a first difference value of the end points of the sub-line segments of the proximity sensor characteristic curve in each scale interval and a second difference value of the end points of the sub-line segments of the ideal curve in each scale interval.
As shown in fig. 5b, the end points of the sub-segments of the proximity sensor characteristic curve and the ideal curve in the respective graduation intervals are determined separately. Taking a 2500-3000 scale interval as an example, respectively inquiring a proximity sensor characteristic curve and an ideal curve, determining four points taking 2500 and 3000 as abscissa, and taking the four points as endpoints of sub-line segments of the proximity sensor characteristic curve and the ideal curve in the 2500-3000 scale interval. For example, in this scale interval, the end points of the proximity sensor characteristic curve are B1 and B2; also, the endpoints of the ideal curve are A1 and A2. The absolute value of the difference between the ordinate values of a1 and a2 is taken as the second difference. The absolute value of the difference between the ordinates of B1 and B2 was taken as the first difference. In the same way, the difference of the end points of the sub-line segments of the characteristic curve of the proximity sensor in the rest of the scale intervals can be calculated, and the difference of the end points of the sub-line segments of the ideal curve in the rest of the scale intervals can be calculated.
And step 530, determining the ratio of the proximity sensor characteristic curve to the ideal curve in each scale interval according to the ratio of the first difference to the second difference in each scale interval.
The ratio of the proximity sensor characteristic curve to the ideal curve in each scale interval is calculated by dividing the first difference value by the second difference value in each scale interval. For example, in the 2500-3000 scale interval, the ratio of the proximity sensor characteristic curve to the ideal curve is 1:3.5, that is, the proximity sensor characteristic curve 3.5 is equal to the ideal curve.
According to the technical scheme of the embodiment, the characteristic curve and the ideal curve of the proximity sensor are divided into a plurality of sub-line segments through the set equally-spaced scale interval; respectively determining a first difference value of the end points of the sub-line segments of the proximity sensor characteristic curve in each scale interval and a second difference value of the end points of the sub-line segments of the ideal curve in each scale interval; and determining the ratio of the proximity sensor characteristic curve to the ideal curve in each scale interval according to the ratio of the first difference to the second difference in each scale interval, and respectively compensating the read intensity value according to the ratio. The technical scheme of the embodiment can realize that the compensated intensity value basically coincides with an ideal curve, and normal reading of the approach value cannot be influenced no matter how large the low noise value is and how strong infrared light interference of the external environment is.
Fig. 6a is a flow chart of another method for determining a ratio of a proximity sensor characteristic to an ideal curve provided by an embodiment of the present invention. As shown in fig. 6a, the method comprises:
and step 610, setting a scale interval with equal intervals, and dividing the characteristic curve and the ideal curve of the proximity sensor into at least two sub-line segments through the scale interval.
Figure 6b illustrates another method of calculating the ratio of the proximity sensor characteristic to the ideal curve. As shown in fig. 6b, a scale interval is set with 500 as a scale interval, 0-4000 is divided into 8 scale intervals, and the sub-line segment of the proximity sensor characteristic curve and the sub-line segment of the ideal curve in each scale interval have a certain ratio relation.
And step 620, determining sub-line segments of the characteristic curve of the proximity sensor in each scale interval and a first graph formed by orthographic projection of the sub-line segments on the abscissa axis.
And determining the sub-line segments of the characteristic curve of the proximity sensor in each scale interval, and carrying out orthographic projection on the sub-line segments of the characteristic curve of the proximity sensor on the abscissa axis to respectively obtain the projection line segments of the sub-line segments of the characteristic curve of the proximity sensor. And respectively connecting the end points of the sub-line segments of the proximity sensor characteristic curve in the same scale interval and the end points of the projection line segments to form a first graph. As shown in fig. 6B, taking a scale interval of 2500-3000 as an example, the endpoints of the sub-segments of the proximity sensor characteristic curve in the scale interval can be determined as B1 and B2. And performing orthographic projection on the abscissa axis of the sub-line segments taking B1 and B2 as endpoints to obtain a line segment taking C1 and C2 as endpoints, wherein the line segment is a projection line segment close to the sub-line segment of the characteristic curve of the sensor in a 2500-3000 scale interval. The first pattern is constituted by connecting B1, B2, C2, C1 and B1 in this order.
Step 630, determining sub-line segments of the ideal curve in each scale interval, and a second graph formed by orthographic projection of the sub-line segments on the abscissa axis.
And determining sub-line segments of the ideal curve in each scale interval, and performing orthographic projection on the ideal curve sub-line segments on the abscissa axis to respectively obtain projection line segments of the sub-line segments close to the ideal curve. And respectively connecting the end points of the ideal curve sub-line segments and the end points of the projection line segments in the same scale interval to form a second graph. As shown in fig. 6b, taking a scale interval of 2500-3000 as an example, the endpoints of the sub-line segments of the ideal curve in the scale interval can be determined as a1 and a 2. And performing orthographic projection on the abscissa axis of the sub-line segments taking A1 and A2 as endpoints to obtain a line segment taking C1 and C2 as endpoints, wherein the line segment is a projection line segment of the ideal curve sub-line segment in the 2500-3000 scale interval. A1, A2, C2, C1 and A1 are connected in this order to constitute a second pattern.
And step 640, determining the ratio of the proximity sensor characteristic curve to the ideal curve in each scale interval according to the area ratio of the first graph to the second graph in each scale interval.
Taking the scale interval of 2500-3000 as an example, as shown in fig. 6b, the second graph is a right trapezoid, and the area of the second graph can be calculated according to the area calculation formula of the right trapezoid. Then, the area of the first pattern is calculated by means of integration. And dividing the area of the first graph by the area of the second graph to obtain the ratio of the proximity sensor characteristic curve to the ideal curve in a 2500-3000 scale interval.
According to the technical scheme of the embodiment, the characteristic curve and the ideal curve of the proximity sensor are divided into a plurality of sub-line segments through the set equally-spaced scale interval; respectively determining sub-line segments of the proximity sensor characteristic curve and the ideal curve in each scale interval and a graph formed by orthographic projection of the sub-line segments on the abscissa axis; and determining the ratio of the proximity sensor characteristic curve to the ideal curve in each scale interval according to the ratio of the graph areas in each scale interval, and respectively compensating the read intensity values according to the ratio. The technical scheme of the embodiment can realize that the compensated intensity value basically coincides with an ideal curve, and normal reading of the approach value cannot be influenced no matter how large the low noise value is and how strong infrared light interference of the external environment is.
Fig. 7 is a flow chart of yet another method for determining a ratio of a proximity sensor characteristic to an ideal curve provided by an embodiment of the present invention. As shown in fig. 7, the method includes:
and 710, setting a scale interval with equal intervals, and dividing the characteristic curve and the ideal curve of the proximity sensor into at least two sub-line segments through the scale interval.
As shown in fig. 5b, a scale interval is set with 500 as a scale interval, 0-4000 is divided into 8 scale intervals, and the sub-line segment of the proximity sensor characteristic curve and the sub-line segment of the ideal curve in each scale interval have a certain ratio relation.
And 720, respectively determining a first mean value of the ordinate of the sampling point of the proximity sensor characteristic curve in each scale interval and a second mean value of the ordinate of the sampling point of the ideal curve in the scale interval.
And sampling is carried out in each scale interval according to the scale interval of the set abscissa axis. For example, taking a scale interval of 2500 to 3000 as an example, if the scale interval of the abscissa axis is set to 50, the sub-line segment of the characteristic curve of the proximity sensor in the scale interval of 2500 to 3000 has 10 sampling points, the abscissa of each sampling point is 2550, 2600, …, 2950 and 3000, and the average value of the ordinate of each sampling point is calculated as the first average value. Similarly, the ideal curve sub-line segment in the scale interval of 2500-3000 has 10 sampling points, the abscissa of each sampling point is 2550, 2600, …, 2950 and 3000, and the average value of the ordinate values of each sampling point is calculated as the second average value.
And step 730, determining the ratio of the proximity sensor characteristic curve to the ideal curve in each scale interval according to the difference value of the first average value and the second average value in each scale interval.
According to the technical scheme of the embodiment, the characteristic curve and the ideal curve of the proximity sensor are divided into a plurality of sub-line segments through the set equally-spaced scale interval; respectively determining a first mean value and a second mean value of the vertical coordinates of sampling points of the proximity sensor characteristic curve and the ideal curve in each scale interval; and determining the ratio of the proximity sensor characteristic curve to the ideal curve in each scale interval according to the difference value of the first average value and the second average value in each scale interval, and respectively compensating the read intensity value according to the ratio. The technical scheme of the embodiment can realize that the compensated intensity value basically coincides with an ideal curve, and normal reading of the approach value cannot be influenced no matter how large the low noise value is and how strong infrared light interference of the external environment is.
Fig. 8 is a flowchart of another method for optimizing screen state control according to an embodiment of the present invention. As shown in fig. 8, the method includes:
and step 810, judging the strong light environment.
And acquiring the current ambient light intensity value, and comparing the current ambient light intensity value with a set light intensity threshold value. If the current ambient light intensity value exceeds the set light intensity threshold, step 820 is executed, otherwise, it indicates that the strong light environment is not entered.
And step 820, determining a threshold value of the screen control for the strong light environment.
Wherein the threshold value of the screen control for the high light environment comprises a first high threshold value and a first low threshold value. The first upper threshold value and the first lower threshold value may be calculated using the following equations:
the first high threshold value is the reference proximity value + X;
a first low threshold value of + Y;
as described above, the reference proximity values may be obtained continuously for a set period of time, and the average values of the indoor proximity values for the set number of times may be calculated. And comparing the average values obtained in the set time length to determine a minimum average value, and determining the minimum average value as a reference approximate value. For example, the indoor approximation value is continuously acquired 5 times per minute in a cycle of 1 minute for 10 minutes. The mean values of the indoor approximation values within 5 times per minute are calculated respectively, and the mean values of the 10 indoor approximation values within the 10 minutes are compared, and the minimum mean value is determined as the reference approximation value.
At step 830, a corrected proximity value PS Data associated with the proximity sensor characteristic is determined.
And comparing the proximity sensor characteristic curve with the ideal curve, and determining the ratio of the proximity sensor characteristic curve to the ideal curve in each set interval. It is to be understood that the embodiment of the present invention is only a partial implementation manner of determining the ratio of the proximity sensor characteristic curve to the ideal curve in each setting interval by comparing the proximity sensor characteristic curve to the ideal curve, and is not a limitation to determine the ratio of the proximity sensor characteristic curve to the ideal curve.
And obtaining the intensity values of the receiving end signals corresponding to the opening state and the closing state of the transmitting end of the proximity sensor, respectively compensating the intensity values according to the ratio, and then calculating the corrected proximity value PS Data of the proximity sensor. Illustratively, the transmitting end of the proximity sensor is started at a preset sampling time, and a first signal strength value is read from the receiving end of the proximity sensor. And closing the transmitting end of the proximity sensor at a preset sampling time, and reading a second signal intensity value from the receiving end of the proximity sensor. And correcting the first signal intensity value and the second signal intensity value according to the ratio corresponding to the set interval to which the first signal intensity value and the second signal intensity value belong respectively. And calculating the difference value of the first signal strength value and the second signal strength value, and taking the difference value as a correction approximate value PS Data.
And 840, judging whether the corrected approaching value PS Data exceeds a first high threshold value, if so, executing 850, otherwise, executing 860.
Step 850, modify the screen control threshold value of the proximity sensor.
Wherein the modified screen control threshold value comprises a second upper threshold value and a second lower threshold value. And when the corrected approach value PS Data is larger than the first high threshold value, subtracting a set third parameter from the corrected approach value to obtain a second high threshold value, and subtracting a fourth parameter from the corrected approach value to obtain a second low threshold value. Illustratively, the modified screen control threshold value may be calculated according to the following formula:
the second high threshold value is the corrected approach value PS Data-A;
the second lower threshold value is the modified approximation value PS Data-B.
And outputting an interrupt signal for controlling the screen to be extinguished or lightened in a mode of comparing the corrected approach value with a second high threshold value and a second low threshold value.
And step 860, taking the first high threshold value and the first low threshold value of the screen control aiming at the strong light environment as the screen control threshold value of the proximity sensor.
And when the screen control threshold value of the proximity sensor is a first high threshold value and a first low threshold value, outputting an interrupt signal for controlling the screen to be turned off or turned on in a mode of comparing the corrected proximity value with the first high threshold value and the first low threshold value.
According to the technical scheme of the embodiment, when the corrected approach value exceeds the first high threshold value of the screen control for the strong light environment, the screen control threshold value of the approach sensor is modified according to the corrected approach value, and the measurement accuracy of the sensor is improved. Meanwhile, the interference of external environment light is eliminated, the problem that the screen is not extinguished when being close to the screen under strong light is avoided, and the normal functions of screen lighting and screen extinguishing are realized.
Fig. 9 is a block diagram of an apparatus for optimizing screen control according to an embodiment of the present invention. The apparatus may be implemented by software and/or hardware, typically integrated in a mobile terminal. As shown in fig. 9, the apparatus may include:
a proximity value determining module 910, configured to determine a modified proximity value associated with a proximity sensor characteristic curve in a strong light environment;
a threshold value comparing module 920, configured to compare the modified proximity value with a first high threshold value of the screen control for the highlight environment;
a threshold value determining module 930, configured to determine a second high threshold value and a second low threshold value according to the comparison result, and respectively use the second high threshold value and the second low threshold value as screen control threshold values of the proximity sensor, so as to control the screen to be turned off or turned on according to the second high threshold value and the second low threshold value.
The technical scheme of this embodiment provides a device for optimizing screen control, which compares a modified proximity value with a first high threshold value of the screen control for a strong light environment, modifies a screen control threshold value into a second high threshold value and a second low threshold value according to a comparison result, and controls a screen to be turned off or turned on according to the second high threshold value and the second low threshold value, so as to realize personalized adjustment of the screen control threshold value of a proximity sensor according to the modified proximity value, and improve the measurement accuracy of the sensor. Meanwhile, the interference of external environment light is eliminated, the problem that the screen is not extinguished when being close to the screen under strong light is avoided, and the normal functions of screen lighting and screen extinguishing are realized.
Optionally, the method further includes:
the light intensity judging module is used for acquiring the light intensity value of the current ambient light before determining the corrected approach value related to the characteristic curve of the proximity sensor, and judging whether the light intensity value exceeds a set light intensity threshold value or not;
and if so, judging that the current mobile terminal is in a strong light environment, and executing the determination operation of correcting the proximity value.
Optionally, the proximity value determining module 910 includes:
the proportion determining submodule is used for comparing the characteristic curve of the proximity sensor with the ideal curve and determining the ratio of the characteristic curve of the proximity sensor to the ideal curve in each set interval;
and the signal compensation submodule is used for acquiring the strength values of the receiving end signals corresponding to the opening state and the closing state of the transmitting end of the proximity sensor, respectively compensating the strength values according to the ratio and then calculating the corrected proximity value of the proximity sensor.
Optionally, the proportion determining submodule is specifically configured to:
setting a scale interval with equal intervals, and dividing a characteristic curve and an ideal curve of the proximity sensor into at least two sub-line segments through the scale interval;
respectively determining a first difference value of the end points of the sub-line segments of the proximity sensor characteristic curve in each scale interval and a second difference value of the end points of the sub-line segments of the ideal curve in each scale interval;
and determining the ratio of the proximity sensor characteristic curve to the ideal curve in each scale interval according to the ratio of the first difference to the second difference in each scale interval.
Optionally, the signal compensation submodule is specifically configured to:
starting a transmitting end of the proximity sensor at a preset sampling time, and reading a first signal intensity value from a receiving end of the proximity sensor;
closing the transmitting end of the proximity sensor at preset sampling time, and reading a second signal intensity value from the receiving end of the proximity sensor;
correcting the first signal intensity value and the second signal intensity value according to the ratio corresponding to the set interval to which the first signal intensity value and the second signal intensity value belong respectively;
and calculating the difference value of the first signal strength value and the second signal strength value, and taking the difference value as a correction approximate value.
Optionally, the method further includes:
a reference threshold determining module, configured to continuously obtain indoor proximity values for a set number of times according to a set period within a set time length before comparing the corrected proximity value with a first high threshold value of a screen control for a highlight environment, and respectively calculate a mean value of the indoor proximity values for the set number of times;
comparing the average values obtained within a set time length to determine a minimum average value, and taking the minimum average value as a reference approximate value;
accumulating the reference approximate value to set a first parameter to obtain a first high threshold value of the screen control aiming at the strong light environment;
and accumulating the reference approximate value to set a second parameter to obtain a first low threshold value of the screen control aiming at the strong light environment.
Optionally, the threshold determining module 930 is specifically configured to:
and when the comparison result shows that the corrected approach value exceeds the first high threshold value, subtracting a set third parameter from the corrected approach value to obtain a second high threshold value, and subtracting a fourth parameter from the corrected approach value to obtain a second low threshold value.
Optionally, the method further includes:
and the threshold modification module is used for respectively taking the first high threshold value and the first low threshold value of the screen control aiming at the strong light environment as the screen control threshold value of the proximity sensor when the corrected proximity value does not exceed the first high threshold value of the screen control aiming at the strong light environment.
Embodiments of the present invention also provide a storage medium containing computer-executable instructions which, when executed by a computer processor, perform a method of optimizing screen control, the method comprising:
determining a corrected proximity value related to a proximity sensor characteristic curve in a strong light environment;
comparing the modified proximity value to a first high threshold value of a screen control for a glare environment;
and determining a second high threshold value and a second low threshold value according to the comparison result, and respectively using the second high threshold value and the second low threshold value as screen control threshold values of the proximity sensor so as to control the screen to be turned off or turned on according to the second high threshold value and the second low threshold value.
Storage medium-any of various types of memory devices or storage devices. The term "storage medium" is intended to include: mounting media such as CD-ROM, floppy disk, or tape devices; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, Lanbas (Rambus) RAM, etc.; non-volatile memory such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system connected to the first computer system through a network (such as the internet). The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations, such as in different computer systems that are connected by a network. The storage medium may store program instructions (e.g., embodied as a computer program) that are executable by one or more processors.
Of course, the storage medium containing the computer-executable instructions provided by the embodiments of the present invention is not limited to the response operation of optimizing the screen state control as described above, and may also perform related operations in the method of optimizing the screen state control provided by any embodiments of the present invention.
The embodiment of the invention provides a mobile terminal, and the device for optimizing screen control provided by the embodiment of the invention can be integrated in the mobile terminal. Fig. 10 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention. As shown in fig. 10, the mobile terminal may include: a casing (not shown), a touch screen (not shown), touch keys (not shown), a memory 1001, a Central Processing Unit (CPU) 1002 (also called as a processor, hereinafter referred to as CPU), a circuit board (not shown), and a power circuit (not shown). The circuit board is arranged in a space enclosed by the shell; the CPU1002 and the memory 1001 are provided on the circuit board; the power supply circuit is used for supplying power to each circuit or device of the electronic equipment; the memory 1001 for storing executable program code; the CPU1002 executes a computer program corresponding to the executable program code by reading the executable program code stored in the memory 1001, to realize the steps of:
determining a corrected proximity value related to a proximity sensor characteristic curve in a strong light environment;
comparing the modified proximity value to a first high threshold value of a screen control for a glare environment;
and determining a second high threshold value and a second low threshold value according to the comparison result, and respectively using the second high threshold value and the second low threshold value as screen control threshold values of the proximity sensor so as to control the screen to be turned off or turned on according to the second high threshold value and the second low threshold value.
The mobile terminal further includes: peripheral interface 1003, RF (Radio Frequency) circuitry 1005, audio circuitry 1006, speaker 1011, power management chip 1008, input/output (I/O) subsystem 1009, touch screen 1012, other input/control devices 1010, and external port 1004, which communicate over one or more communication buses or signal lines 1007.
It should be understood that the illustrated mobile terminal 1000 is merely one example of a mobile terminal and that the mobile terminal 1000 may have more or fewer components than shown, may combine two or more components, or may have a different configuration of components. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
The following describes the mobile terminal for optimizing screen control provided in this embodiment in detail, and the mobile terminal is exemplified by a mobile phone.
A memory 1001, the memory 1001 being accessible by the CPU1002, the peripheral interface 1003, or the like, the memory 1001 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other volatile solid state storage devices.
A peripheral interface 1003, said peripheral interface 1003 being capable of connecting input and output peripherals of the device to the CPU1002 and the memory 1001.
I/O subsystem 1009, which may connect input and output peripherals on the device, such as touch screen 1012 and other input/control devices 1010, to peripheral interface 1003. The I/O subsystem 1009 may include a display controller 10091 and one or more input controllers 10092 for controlling other input/control devices 1010. Among other things, one or more input controllers 10092 receive electrical signals from or transmit electrical signals to other input/control devices 1010, which other input/control devices 1010 may include physical buttons (push buttons, rocker buttons, etc.), dials, slide switches, joysticks, click wheels. It is worth mentioning that the input controller 10092 can be connected to any one of the following: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
Touch screen 1012, which is an input interface and an output interface between the user electronic device and the user, displays visual output to the user, which may include graphics, text, icons, video, and the like.
The display controller 10091 in the I/O subsystem 1009 receives electrical signals from the touch screen 1012 or transmits electrical signals to the touch screen 1012. The touch screen 1012 detects a contact on the touch screen, and the display controller 10091 converts the detected contact into an interaction with a user interface object displayed on the touch screen 1012, that is, implements a human-computer interaction, and the user interface object displayed on the touch screen 1012 may be an icon for running a game, an icon networked to a corresponding network, or the like. It is worth mentioning that the device may also comprise a light mouse, which is a touch sensitive surface that does not show visual output, or an extension of the touch sensitive surface formed by the touch screen.
The RF circuit 1005 is mainly used to establish communication between the mobile phone and the wireless network (i.e., the network side), and implement data reception and transmission between the mobile phone and the wireless network. Such as sending and receiving short messages, e-mails, etc. In particular, RF circuitry 1005 receives and transmits RF signals, also referred to as electromagnetic signals, through which RF circuitry 1005 converts electrical signals to or from electromagnetic signals and communicates with communication networks and other devices. RF circuitry 1005 may include known circuitry for performing these functions, including but not limited to an antenna system, an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a CODEC (CODEC) chipset, a Subscriber Identity Module (SIM), and so forth.
The audio circuit 1006 is mainly configured to receive audio data from the peripheral interface 1003, convert the audio data into an electrical signal, and transmit the electrical signal to the speaker 1011.
The speaker 1011 is configured to restore the voice signal received by the mobile phone from the wireless network through the RF circuit 1005 to sound and play the sound to the user.
And the power management chip 1008 is used for supplying power and managing power to the hardware connected with the CPU1002, the I/O subsystem, and the peripheral interfaces.
The mobile terminal provided by the embodiment of the invention can adjust the screen control threshold value of the proximity sensor in a personalized manner according to the corrected proximity value, so that the situation that the screen is not turned off when people face or ears approach the screen in a strong light environment is prevented.
The device for optimizing screen control, the storage medium and the mobile terminal provided in the above embodiments can execute the method for optimizing screen control provided in any embodiment of the present invention, and have corresponding functional modules and beneficial effects for executing the method. For technical details not described in detail in the above embodiments, reference may be made to a method of optimizing screen control provided by any embodiment of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for optimizing screen control, comprising:
determining a modified proximity value associated with a proximity sensor characteristic in a high light environment, comprising: comparing the characteristic curve of the proximity sensor with the ideal curve, and determining the ratio of the characteristic curve of the proximity sensor to the ideal curve in each set interval;
acquiring intensity values of receiving end signals corresponding to the state that the transmitting end of the proximity sensor is in an opening state and a closing state, respectively compensating the intensity values according to the ratio, and then calculating a corrected proximity value of the proximity sensor;
comparing the modified proximity value to a first high threshold value of a screen control for a glare environment;
and determining a second high threshold value and a second low threshold value according to the comparison result, and respectively using the second high threshold value and the second low threshold value as screen control threshold values of the proximity sensor so as to control the screen to be turned off or turned on according to the second high threshold value and the second low threshold value.
2. The method of claim 1, further comprising, prior to determining the modified proximity value associated with the proximity sensor profile:
acquiring a light intensity value of current ambient light, and judging whether the light intensity value exceeds a set light intensity threshold value;
and if so, judging that the current mobile terminal is in a strong light environment, and executing the determination operation of correcting the proximity value.
3. The method of claim 1, wherein comparing the proximity sensor characteristic curve to the ideal curve to determine a ratio of the proximity sensor characteristic curve to the ideal curve for each of the set intervals comprises:
setting a scale interval with equal intervals, and dividing a characteristic curve and an ideal curve of the proximity sensor into at least two sub-line segments through the scale interval;
respectively determining a first difference value of the end points of the sub-line segments of the proximity sensor characteristic curve in each scale interval and a second difference value of the end points of the sub-line segments of the ideal curve in each scale interval;
and determining the ratio of the proximity sensor characteristic curve to the ideal curve in each scale interval according to the ratio of the first difference to the second difference in each scale interval.
4. The method of claim 1, wherein obtaining strength values of signals of a receiving end corresponding to an on state and an off state of a transmitting end of a proximity sensor, respectively compensating the strength values according to the ratios, and then calculating a corrected proximity value of the proximity sensor comprises:
starting a transmitting end of the proximity sensor at a preset sampling time, and reading a first signal intensity value from a receiving end of the proximity sensor;
closing the transmitting end of the proximity sensor at preset sampling time, and reading a second signal intensity value from the receiving end of the proximity sensor;
correcting the first signal intensity value and the second signal intensity value according to the ratio corresponding to the set interval to which the first signal intensity value and the second signal intensity value belong respectively;
and calculating the difference value of the first signal strength value and the second signal strength value, and taking the difference value as a correction approximate value.
5. The method of claim 1, further comprising, prior to comparing the modified proximity value to a first high threshold value of screen control for a high light environment:
continuously acquiring indoor proximity values of set times according to a set period within a set time length, and respectively calculating the average value of the indoor proximity values of the set times;
comparing the average values obtained within a set time length to determine a minimum average value, and taking the minimum average value as a reference approximate value;
accumulating the reference approximate value to set a first parameter to obtain a first high threshold value of the screen control aiming at the strong light environment;
and accumulating the reference approximate value to set a second parameter to obtain a first low threshold value of the screen control aiming at the strong light environment.
6. The method of any of claims 1 to 5, wherein determining the second upper threshold value and the second lower threshold value based on the comparison comprises:
and when the comparison result shows that the corrected approach value exceeds the first high threshold value, subtracting a set third parameter from the corrected approach value to obtain a second high threshold value, and subtracting a fourth parameter from the corrected approach value to obtain a second low threshold value.
7. The method of claim 1, further comprising:
and when the corrected approach value does not exceed the first high threshold value of the screen control for the strong light environment, respectively taking the first high threshold value and the first low threshold value of the screen control for the strong light environment as the screen control threshold values of the approach sensor.
8. An apparatus for optimizing screen control, comprising:
the proximity value determining module is used for determining a corrected proximity value related to a proximity sensor characteristic curve under a strong light environment;
the proximity value determination module includes: the proportion determining submodule is used for comparing the characteristic curve of the proximity sensor with the ideal curve and determining the ratio of the characteristic curve of the proximity sensor to the ideal curve in each set interval;
the signal compensation submodule is used for acquiring the strength values of receiving end signals corresponding to the state that the transmitting end of the proximity sensor is opened and closed, respectively compensating the strength values according to the ratio and then calculating the corrected proximity value of the proximity sensor;
the threshold value comparison module is used for comparing the corrected approach value with a first high threshold value of the screen control aiming at the strong light environment;
and the threshold value determining module is used for determining a second high threshold value and a second low threshold value according to the comparison result, and respectively using the second high threshold value and the second low threshold value as screen control threshold values of the proximity sensor so as to control the screen to be turned off or turned on according to the second high threshold value and the second low threshold value.
9. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the method of optimizing screen control of one of claims 1 to 7.
10. A mobile terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of optimizing screen control according to any of claims 1 to 7 when executing the computer program.
CN201710585084.3A 2017-07-18 2017-07-18 Method and device for optimizing screen control, storage medium and mobile terminal Active CN107404575B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710585084.3A CN107404575B (en) 2017-07-18 2017-07-18 Method and device for optimizing screen control, storage medium and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710585084.3A CN107404575B (en) 2017-07-18 2017-07-18 Method and device for optimizing screen control, storage medium and mobile terminal

Publications (2)

Publication Number Publication Date
CN107404575A CN107404575A (en) 2017-11-28
CN107404575B true CN107404575B (en) 2020-04-17

Family

ID=60400943

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710585084.3A Active CN107404575B (en) 2017-07-18 2017-07-18 Method and device for optimizing screen control, storage medium and mobile terminal

Country Status (1)

Country Link
CN (1) CN107404575B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109375855B (en) * 2018-09-26 2020-09-04 Oppo广东移动通信有限公司 Terminal state determination method and device, terminal equipment and storage medium
CN109547629A (en) * 2018-11-07 2019-03-29 华为技术有限公司 A kind of control method and electronic equipment close to optical sensor

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102265252A (en) * 2011-06-24 2011-11-30 华为终端有限公司 A method and a device for adjusting a sensing threshold value of an infrared proximity sensor
CN105071807A (en) * 2015-07-20 2015-11-18 浙江大学 Analog-to-digital converter adjustment and calibration method and system
CN105959492A (en) * 2016-07-06 2016-09-21 广东欧珀移动通信有限公司 Control method and device for infrared proximity sensor and mobile terminal
CN106506794A (en) * 2016-09-05 2017-03-15 广东欧珀移动通信有限公司 The state monitoring method of terminal unit, device and terminal unit
CN106686222A (en) * 2016-12-19 2017-05-17 广东欧珀移动通信有限公司 Ambient light sensor control method, ambient light sensor control device and terminal
CN106940633A (en) * 2017-03-06 2017-07-11 广东欧珀移动通信有限公司 Display screen condition control method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140140891A (en) * 2013-05-30 2014-12-10 삼성전자주식회사 Apparatus and Method for operating a proximity sensor function in an electronic device having touch screen

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102265252A (en) * 2011-06-24 2011-11-30 华为终端有限公司 A method and a device for adjusting a sensing threshold value of an infrared proximity sensor
CN105071807A (en) * 2015-07-20 2015-11-18 浙江大学 Analog-to-digital converter adjustment and calibration method and system
CN105959492A (en) * 2016-07-06 2016-09-21 广东欧珀移动通信有限公司 Control method and device for infrared proximity sensor and mobile terminal
CN106506794A (en) * 2016-09-05 2017-03-15 广东欧珀移动通信有限公司 The state monitoring method of terminal unit, device and terminal unit
CN106686222A (en) * 2016-12-19 2017-05-17 广东欧珀移动通信有限公司 Ambient light sensor control method, ambient light sensor control device and terminal
CN106940633A (en) * 2017-03-06 2017-07-11 广东欧珀移动通信有限公司 Display screen condition control method and device

Also Published As

Publication number Publication date
CN107404575A (en) 2017-11-28

Similar Documents

Publication Publication Date Title
US10761642B2 (en) Method, mobile terminal and non-transitory computer-readable storage medium for adjusting scanning frequency of touch screen
US11159672B2 (en) Method for controlling proximity sensor, device, and mobile terminal
CN106782431B (en) Screen backlight brightness adjusting method and device and mobile terminal
CN107943345B (en) Method and device for calibrating proximity sensor, storage medium and electronic equipment
CN107257415B (en) Control method and device of proximity sensor, storage medium and mobile terminal
CN107966209B (en) Ambient light detection method, ambient light detection device, storage medium, and electronic apparatus
CN108510963B (en) Screen brightness adjusting method and device, storage medium and intelligent terminal
CN107942306B (en) Method and device for calibrating proximity sensor, storage medium and electronic equipment
CN106303023B (en) Screen state adjusting method and device
CN106060284B (en) The method, device and mobile terminal of backlight control
CN111179861A (en) Brightness calibration method and device, storage medium and terminal
CN107527048B (en) Fingerprint identification method and device, storage medium and mobile terminal
CN109343066B (en) Control method and device of proximity sensor, storage medium and mobile terminal
EP3654624B1 (en) Screen state control method and device, storage medium, and mobile terminal
CN107404575B (en) Method and device for optimizing screen control, storage medium and mobile terminal
CN106101402B (en) Method and system for adjusting sensing threshold of proximity sensor
CN103837910A (en) Method for determining threshold value of proximity sensor and terminal
CN112968985A (en) Infrared sensor compensation method and device and electronic equipment
CN105788568B (en) A kind of screen luminance adjustment method and device
CN106768311A (en) A kind of environment light detection method, device and terminal
US20230325034A1 (en) Proximity sensor and proximity sensing method
CN107764406A (en) The management method and electronic equipment of a kind of infrared detection
CN109510896B (en) Proximity sensor selection method and device, storage medium and electronic device
CN106686222A (en) Ambient light sensor control method, ambient light sensor control device and terminal
CN110913040A (en) Terminal equipment

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., Ltd.

GR01 Patent grant
GR01 Patent grant