CN116704928A - Display screen adjusting method and electronic equipment - Google Patents

Display screen adjusting method and electronic equipment Download PDF

Info

Publication number
CN116704928A
CN116704928A CN202210191816.1A CN202210191816A CN116704928A CN 116704928 A CN116704928 A CN 116704928A CN 202210191816 A CN202210191816 A CN 202210191816A CN 116704928 A CN116704928 A CN 116704928A
Authority
CN
China
Prior art keywords
ambient light
electronic device
data
display screen
sensor
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
CN202210191816.1A
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202210191816.1A priority Critical patent/CN116704928A/en
Publication of CN116704928A publication Critical patent/CN116704928A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G3/00Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
    • G09G3/20Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters
    • 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/02Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the way in which colour is displayed
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The embodiment of the application is suitable for the technical field of terminals, and provides a display screen adjusting method and electronic equipment, wherein the method comprises the following steps: the electronic equipment determines the current equipment gesture; the electronic equipment acquires first ambient light data output by an ambient light sensor; the electronic equipment determines second ambient light data according to the equipment gesture and the first ambient light data; and the electronic equipment adjusts the display screen according to the second ambient light data. By adopting the method, the performance of the ambient light sensor can be improved, and the problem that the backlight brightness, the color temperature and the like of the display screen of the electronic equipment are inaccurately regulated due to the influence of the performance of the ambient light sensor in the prior art is solved.

Description

Display screen adjusting method and electronic equipment
Technical Field
The embodiment of the application relates to the technical field of terminals, in particular to a display screen adjusting method and electronic equipment.
Background
When a user uses electronic equipment such as a mobile phone, a tablet and the like, whether the backlight brightness and the color temperature displayed by a display screen of the electronic equipment are accurately regulated directly influences the comfort level of eyes. Generally, the electronic device can adjust the brightness and display color of its display screen according to the light intensity of the surrounding environment, so the electronic device needs to detect the current ambient light. A module in an electronic device having this function is called an ambient light detection module. The electronic equipment can adjust the backlight brightness and the color temperature displayed by the display screen according to the ambient light parameters reported by the ambient light detection module.
In an electronic device, an ambient light detection module includes a light intake path and an ambient light sensor. The performance of an ambient light sensor can be expressed by a field of view (FOV), which describes the case where the output value of the ambient light sensor decays with angle, and typically, an angle at which the output value of the ambient light sensor decays to half is used as the field of view of the ambient light sensor. In general, a larger field angle indicates a better field of view of the ambient light sensor and better adaptability.
Currently, electronic devices typically place an ambient light sensor in a position in front of a display screen. The layout structure of the light inlet path of the ambient light sensor is also various due to the influence of the layout of the display screen of the electronic device, for example, the electronic device adopts a layout mode such as a full screen. When the layout structure of the ambient light sensor and the light inlet channel in the electronic equipment is poor, the influence of different degrees is brought to the view angle, and then the normal adjustment of the backlight brightness and the color temperature of the display screen of the electronic equipment is influenced.
Disclosure of Invention
The display screen adjusting method and the electronic device provided by the embodiment of the application are used for solving the problem that the adjustment of the backlight brightness, the color temperature and the like of the display screen of the electronic device is inaccurate due to the influence of the performance of an ambient light sensor in the prior art.
In order to achieve the above purpose, the application adopts the following technical scheme:
in a first aspect, a method for adjusting a display screen is provided, where the method is applied to an electronic device, and the method includes: the electronic equipment determines the current equipment gesture; the electronic equipment acquires first ambient light data output by an ambient light sensor; the electronic equipment determines second ambient light data according to the equipment gesture and the first ambient light data; and the electronic equipment adjusts the display screen according to the second ambient light data.
According to the display screen adjusting method, the first ambient light data output by the ambient light sensor is compensated according to the current equipment posture of the electronic equipment, the influence on the visual angle performance of the ambient light sensor caused by the reasons of layout, architecture and the like can be made up, the response curve formed based on the compensated second ambient light data approximates to the response curve formed by the ambient light data output by the ambient light sensor with stronger visual angle performance, the purpose of enhancing the visual angle performance of the ambient light sensor is achieved, the accuracy of the ambient light data reported to the system is improved, the accuracy of the electronic equipment for adjusting the backlight brightness, color temperature and other parameters of the display screen based on the compensated second ambient light data is facilitated, and the adjusted display screen is ensured to be more suitable for human eyes to watch.
With reference to the first aspect, in some possible implementations, the determining, by the electronic device, the current device pose may be implemented based on a pose sensor in the electronic device. Specifically, the electronic device may determine a current device posture according to posture data by reading the posture data output by the posture sensor. Among other things, the gesture sensors in the electronic device may include any one or more of the following sensors: acceleration sensor, magnetic sensor, gyroscope; wherein the magnetic sensor comprises a magnetometer.
It can be appreciated that the electronic device may determine the current device gesture using any gesture data output by any gesture sensor, or may determine the current device gesture using any gesture data output by any of a plurality of gesture sensors.
The electronic device may read data output by the acceleration sensor, determine a current device posture according to the data output by the acceleration sensor, read data output by the magnetic sensor or the gyroscope, determine the current device posture according to the data output by the magnetic sensor or the gyroscope, and read data output by the acceleration sensor and the magnetic sensor simultaneously, and determine the current device posture according to the data output by the two posture sensors.
With reference to the first aspect and the foregoing implementation manner, in some possible implementation manners, each gesture sensor may have a corresponding weight value. When the electronic equipment determines the current equipment gesture according to gesture data output by a plurality of gesture sensors, the equipment gesture can be calculated by adopting the gesture data output by each gesture sensor, and then the equipment gesture calculated by each gesture sensor is fused based on the weight value, so that the fused equipment gesture is obtained.
For example, the electronic device may calculate the current device pose using pose data output by the acceleration sensor and the magnetic sensor, respectively. In this way, the electronic device may obtain two different resulting device poses. Then, the electronic device can fuse the device gestures of the two different results, and the fused result is used as the current device gesture of the electronic device.
With reference to the first aspect and the foregoing implementation manner, in some possible implementation manners, the determining, by the electronic device, the second ambient light data according to the device gesture and the first ambient light data may mean that the electronic device compensates the first ambient light data according to the device gesture, so as to obtain compensated second ambient light data. The process specifically may include: the electronic equipment acquires a pre-generated compensation function; and compensating the first ambient light data according to the equipment posture and the compensation function to obtain second ambient light data.
With reference to the first aspect and the foregoing implementation manner, in some possible implementation manners, the electronic device may generate the compensation function in advance by adopting the following steps: the electronic device records test data output by the ambient light sensor under test conditions, wherein the test data can comprise output values of the ambient light sensor corresponding to different device attitudes. Then, the electronic device may generate an actual response curve of the ambient light sensor using the test data, and fit the actual response curve to a preset ideal response curve to obtain a compensation function, where the ideal response curve may be used to characterize a correspondence between different device poses and an output value of the ambient light sensor in an ideal state.
For example, since both the actual response curve and the ideal response curve may represent a relationship between the output values of the ambient light sensor corresponding to different device poses, for the same device pose, the electronic device may fit the output values on both the actual response curve and the ideal response curve in that device pose, thereby obtaining the compensation function.
With reference to the first aspect and the foregoing implementation manner, in some possible implementation manners, the compensation function includes any one of the following function types: a linear function, a nonlinear function; the nonlinear function may include, among other things, a polynomial function, a logarithmic function, an exponential function, a power function, and the like.
With reference to the first aspect and the foregoing implementation manner, in some possible implementation manners, the first ambient light data used for compensation by the electronic device may be ambient light original data output by an ambient light sensor, or may be data obtained by converting the ambient light original data.
For example, the ambient light raw data output by the ambient light sensor may be values of respective color components in the RGB color mode, and the data of actual ambient light intensity, color temperature, and the like of the current environment may be obtained by performing conversion processing on the respective color components in the RGB color mode. Therefore, the electronic device may compensate the first ambient light data by compensating the values of the respective color components in the RGB color mode, or may compensate the data such as the actual ambient light intensity and the color temperature of the current environment obtained after the conversion.
With reference to the first aspect and the foregoing implementation manner, in some possible implementation manners, the adjusting, by the electronic device, the display screen according to the second ambient light data may specifically include: and the electronic equipment determines display parameters of the display screen corresponding to the compensated second ambient light data, and adjusts the display screen according to the display parameters.
With reference to the first aspect and the foregoing implementation manner, in some possible implementation manners, after the electronic device determines the current device posture, compensation may be directly performed on original display parameters of the display screen instead of compensating for the first ambient light data output by the ambient light sensor. Specifically, the electronic device may determine an original display parameter of the display screen according to the first ambient light data, and then compensate the original display parameter according to the device gesture to obtain a compensated display parameter; and the display screen is adjusted by adopting the compensated display parameters.
With reference to the first aspect and the foregoing implementation manner, in some possible implementation manners, the device gesture may include a pitch angle or a gesture angle of the electronic device.
In a second aspect, a display screen adjustment apparatus is provided, which may be applied to an electronic device, where the electronic device may include a device gesture determination module, a first ambient light data acquisition module, a second ambient light data determination module, and a display screen adjustment module; wherein:
the equipment posture determining module is used for determining the current equipment posture;
the first ambient light data acquisition module is used for acquiring first ambient light data output by the ambient light sensor;
A second ambient light data determining module configured to determine second ambient light data according to the device pose and the first ambient light data;
and the display screen adjusting module is used for adjusting the display screen according to the second ambient light data.
With reference to the second aspect, in some possible implementations, the device posture determining module may specifically be configured to: reading attitude data output by an attitude sensor; and determining the current equipment gesture according to the gesture data.
With reference to the second aspect and the foregoing implementation manner, in some possible implementation manners, the gesture sensor may include any one or more of the following sensors:
acceleration sensor, magnetic sensor, gyroscope; wherein the magnetic sensor may comprise a magnetometer.
With reference to the second aspect and the foregoing implementation manner, in some possible implementation manners, the device gesture determining module may further be configured to: calculating the equipment gesture by adopting the gesture data output by each gesture sensor, wherein each gesture sensor has a corresponding weight value; and based on the weight values, fusing the equipment gestures obtained by calculation of each gesture sensor to obtain fused equipment gestures.
With reference to the second aspect and the foregoing implementation manner, in some possible implementation manners, the second ambient light data determining module may specifically be configured to: acquiring a pre-generated compensation function; and compensating the first ambient light data according to the equipment posture and the compensation function to obtain the second ambient light data.
With reference to the second aspect and the foregoing implementation manner, in some possible implementation manners, the electronic device may generate the compensation function in advance by calling the following module:
the recording module is used for recording test data output by the ambient light sensor under test conditions, wherein the test data comprise output values of the ambient light sensor corresponding to different equipment postures;
the generation module is used for generating an actual response curve of the ambient light sensor by adopting the test data;
and the fitting module is used for fitting the actual response curve with a preset ideal response curve to obtain the compensation function, and the ideal response curve is used for representing the corresponding relation between different equipment postures and the output value of the ambient light sensor in an ideal state.
With reference to the second aspect and the foregoing implementation manner, in some possible implementation manners, the compensation function may include any one of the following function types:
a linear function, a nonlinear function; wherein the nonlinear function may include a polynomial function, a logarithmic function, an exponential function, a power function.
With reference to the second aspect and the foregoing implementation manner, in some possible implementation manners, the first ambient light data may include ambient light raw data output by the ambient light sensor, or data obtained by converting the ambient light raw data.
With reference to the second aspect and the foregoing implementation manner, in some possible implementation manners, the display screen adjusting module may specifically be used to: determining display parameters of a display screen corresponding to the compensated second ambient light data; and adjusting the display screen according to the display parameters.
With reference to the second aspect and the foregoing implementation manner, in some possible implementation manners, the display screen adjusting module may further be configured to: determining original display parameters of a display screen according to the first ambient light data; compensating the original display parameters according to the equipment posture to obtain compensated display parameters; and adjusting the display screen by adopting the compensated display parameters.
With reference to the second aspect and the foregoing implementation manner, in some possible implementation manners, the device gesture may include a pitch angle or a gesture angle of the electronic device.
In a third aspect, there is provided an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the display screen adjustment method according to any one of the first aspects when executing the computer program.
In a fourth aspect, a computer readable storage medium is provided, in which computer instructions are stored which, when run on an electronic device, cause the electronic device to perform the relevant method steps to implement the display screen adjustment method according to any one of the first aspects above.
In a fifth aspect, a computer program product is provided which, when run on an electronic device, causes the electronic device to perform the above-mentioned related steps to implement the display screen adjustment method of any of the above-mentioned first aspects.
In a sixth aspect, a chip is provided, the chip comprising a memory and a processor, the processor executing a computer program stored in the memory to implement the display screen adjustment method according to any one of the first aspects.
It will be appreciated that the advantages of the second to sixth aspects may be found in the relevant description of the first aspect, and are not described here again.
Drawings
Fig. 1 is a schematic diagram of a slit ambient light detection method according to an embodiment of the present application.
Fig. 2 is a schematic diagram of an under-screen ambient light detection method according to an embodiment of the present application.
Fig. 3 is a schematic diagram of an ejection/side-out ambient light detection method according to an embodiment of the present application.
Fig. 4 is a schematic diagram of another method for detecting ambient light in an ejection/side-out mode according to an embodiment of the present application.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Fig. 6 is a software structural block diagram of an electronic device according to an embodiment of the present application.
Fig. 7 is a schematic diagram of a reporting process of ambient light sensor output data according to an embodiment of the present application.
Fig. 8 is a schematic diagram of an output data compensation effect of an ambient light sensor according to an embodiment of the present application.
Fig. 9 is a schematic diagram of an electronic device coordinate system according to an embodiment of the present application.
Fig. 10 is a schematic diagram of a display screen adjusting method according to an embodiment of the present application.
Fig. 11 is a schematic diagram of another display screen adjustment method according to an embodiment of the present application.
Fig. 12 is a schematic diagram showing an effect of compensating output data of another ambient light sensor according to an embodiment of the present application.
Fig. 13 is a schematic diagram of another display screen adjustment method according to an embodiment of the present application.
Fig. 14 is a block diagram of a display screen adjusting device according to an embodiment of the present application.
Detailed Description
It should be noted that, in the embodiments of the present application, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "for example" is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
The service scenario described in the embodiment of the present application is for more clearly describing the technical solution of the embodiment of the present application, and does not constitute a limitation on the technical solution provided by the embodiment of the present application, and as a person of ordinary skill in the art can know that, with the appearance of a new service scenario, the technical solution provided by the embodiment of the present application is applicable to similar technical problems.
In the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "and/or", describes an association relationship of the association object, indicating that three relationships may exist. For example, a and/or B may represent: a alone, a and B together, and B alone, wherein a, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b, or c may represent: a, b, c, a and b, a and c, b and c, or a, b and c, wherein a, b, c can be single or multiple.
Currently, common ambient light detection methods include slit ambient light detection, under-screen ambient light detection, ejection/side-out ambient light detection, and the like. The angle of view of ambient light sensors is typically small when detecting ambient light due to limitations of the ambient light sensor and the light entry path. Before introducing the technical solution of the embodiment of the present application, a description is first given of the above-mentioned several commonly used methods for detecting ambient light.
Fig. 1 is a schematic diagram of a slit ambient light detection method according to an embodiment of the present application. In fig. 1, the ambient light sensor is placed below the display screen. Specifically, the glass cover plate of the display screen is arranged above the ambient light sensor, the circuit board and the battery cover inside the electronic equipment are arranged below the ambient light sensor, and the photosensitive area is a gap between the display screen and the middle frame of the electronic equipment. Since the display module of the display screen generally has no display function in the edge area, the glass cover plate can be blacked by ink in the area to form a black edge of the display screen. When the gap ambient light detection method is applied, the light-transmitting area in the black edge of the display screen can use the printing ink with the light semitransparent function, so that light can penetrate through the printing ink layer from the outside, and is downwards transmitted from the gap between the display module and the middle frame and irradiates on the ambient light sensor, thereby realizing the ambient light detection function. By using the slit ambient light detection method, the intensity of light transmitted through the slit needs to reach a certain value to be sensed by an ambient light sensor. Therefore, the width of the slit needs to satisfy a certain minimum value. The method cannot be used in the case that the gap between the display module and the middle frame of the electronic device is small or is blocked by the light-tight material. In addition, the gaps may cause the black edge of the display screen of the electronic device to be enlarged, which has negative effects on the screen ratio of the display area of the display screen of the electronic device and the aesthetic property of the electronic device.
Fig. 2 is a schematic diagram of an under-screen ambient light detection method according to an embodiment of the present application. By applying the under-screen ambient light detection method, an ambient light sensor can also be placed below the display screen of the electronic device, and the ambient light transmitted from the display screen area is detected by the ambient light sensor by utilizing the light transmittance of the display screen, so that the function of ambient light detection is realized. The under-screen ambient light detection method can save the internal space of the electronic equipment, and does not occupy the gap between the edge of the display screen and the middle frame. However, the under-screen ambient light detection method can only be applied to electronic equipment with a light-permeable display screen, and cannot be used for other types of light-impermeable display screens. In addition, due to the influence of the light transmission performance of the display screen, the light interference of the display screen, and the like, the noise of the light signal received by the ambient light sensor may be larger, which easily results in poor accuracy of the detection result.
Fig. 3 is a schematic diagram of an ejection/side-out ambient light detection method according to an embodiment of the present application. The liftout/side-out ambient light detection method is a technique that uses functional holes on the top or side of an electronic device to realize ambient light detection. For example, fig. 3 is an example of implementing ambient light detection by using an external sound outlet hole formed in a middle frame of the electronic device, where one or more sound outlet holes may be communicated with an ambient light sensor through the sound outlet hole of the electronic device, so as to conduct light in an external environment to the internal ambient light sensor, thereby implementing ambient light detection. Generally, the diameters of the sound outlet holes of the electronic device are smaller, and the middle frame needs to meet certain thickness requirements, so that the sound outlet holes are generally slender, and the transmission of light in the sound outlet holes is easy to generate loss. Therefore, in some cases, a light guide column with a light homogenizing function can be designed between the sound outlet hole of the electronic equipment and the ambient light sensor, so that light can be uniformly transmitted in the light guide column, scattering loss of light entering the hole is reduced, and detection sensitivity of the ambient light sensor is enhanced. In parallel, as shown in fig. 4, another schematic diagram of an ejection/side-out ambient light detection method according to an embodiment of the present application is shown, and fig. 4 is an example of implementing ambient light detection by sharing a sound outlet of a dust screen of an electronic device. The dustproof net can be located between the middle frame of the electronic equipment and the glass cover plate, small holes are formed in the dustproof net, light can penetrate through the small holes and can irradiate on the ambient light sensor through air or a light guide column, and detection of ambient light is achieved. Whether the common sound outlet hole or the dust screen sound outlet hole is shared, the aperture is usually smaller, and the manufacturing and assembling difficulties are larger when an ejection/side-outlet ambient light detection method is applied to the electronic equipment.
Whether slit ambient light detection, under-screen ambient light detection, or push-out/side-out ambient light detection is applied, ambient light sensors are often difficult to place in the optimal position on the front of an electronic device due to the shape of the electronic device and the layout of the ambient light sensors, which greatly affects the angular performance of the ambient light sensors. When there is a problem with the angular of view performance of ambient light sensors, electronic devices often cannot accurately measure the intensity of ambient light. Meanwhile, in the using process of the electronic equipment, the intensity of the ambient light measured by the ambient light sensor is also likely to be suddenly changed, so that abnormal dimming of the display screen is easily caused, and the using experience of a user is affected.
To improve the angular of view performance of the ambient light sensors, in some examples, two or more ambient light sensors may be arranged on the electronic device and the data of one of the ambient light sensors may be selected for reporting in combination with the readings of the acceleration sensor for the problem of limited angular of view performance of the single ambient light sensor. For example, a maximum value of data in two or more ambient light sensors is selected for reporting. However, installing multiple ambient light sensors in an electronic device clearly adds significant cost to the product as well as complexity to the architecture. Due to miniaturization of electronic devices and design with full screen, etc., the architecture space of electronic devices is becoming more and more intense, and it is also difficult to allow multiple ambient light sensors to be arranged in an electronic device. Also, even if a plurality of ambient light sensors are arranged in the electronic device, when some of the ambient light sensors are arranged in a poor position, the intensity data of the ambient light detected by them may not be accurate.
In view of the above problems, the embodiments of the present application provide a display screen adjustment method, by combining detection data of an attitude sensor in an electronic device, to compensate output data of an ambient light sensor, so that a response curve formed by the compensated output data approximates to a response curve formed by output data of the ambient light sensor with a relatively strong viewing angle performance, thereby achieving the purpose of enhancing the viewing angle performance of the ambient light sensor, improving accuracy of ambient light intensity data reported to a system, ensuring that the reported ambient light intensity data is closer to actual ambient light intensity of a current environment, and improving accuracy of adjusting backlight brightness, color temperature, and the like of a display screen by the electronic device based on the reported ambient light intensity data.
In the embodiment of the present application, the electronic device may be a mobile phone, a tablet computer, an augmented reality (augmented reality, AR)/Virtual Reality (VR) device, a notebook computer, a personal computer (personal computer, PC), a netbook, a personal digital assistant (personal digital assistant, PDA) or the like, which has a screen display function and is capable of adjusting backlight brightness and color temperature of a display screen based on ambient light intensity data detected by an ambient light sensor. The embodiment of the application does not limit the specific type of the electronic equipment.
By way of example, fig. 5 shows a schematic structural diagram of an electronic device 500. The structure of the electronic device to which the display screen adjustment method provided by the embodiment of the present application is applied may refer to the structure of the electronic device 500.
Electronic device 500 may include a processor 510, an external memory interface 520, an internal memory 521, a universal serial bus (universal serial bus, USB) interface 530, a charge management module 540, a power management module 541, a battery 542, an antenna 1, an antenna 2, a mobile communication module 550, a wireless communication module 560, an audio module 570, a speaker 570A, a receiver 570B, a microphone 570C, an ear-piece interface 570D, a sensor module 580, keys 590, a motor 591, an indicator 592, a camera 593, a display 594, and a subscriber identity module (subscriber identification module, SIM) card interface 595, among others. Among them, the sensor module 580 may include an ambient light sensor 580A, a gyro sensor 580B, an acceleration sensor 580C, a magnetic sensor 580D, and a fingerprint sensor 580E, a touch sensor 580F, etc.
It should be understood that the illustrated structure of the embodiment of the present application does not constitute a specific limitation on the electronic device 500. In some embodiments of the application, electronic device 500 may include more or fewer components than shown, or may combine certain components, or split certain components, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 510 may include one or more processing units. For example, the processor 510 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural-Network Processor (NPU), etc. The different processing units may be separate devices or may be integrated in one or more processors.
The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 510 for storing instructions and data. In some embodiments of the application, the memory in processor 510 is a cache memory. The memory may hold instructions or data that has just been used or recycled by the processor 510. If the processor 510 needs to reuse the instruction or data, it may be called directly from the memory. Repeated accesses are avoided and the latency of the processor 510 is reduced, thereby improving the efficiency of the system.
In some embodiments of the application, processor 510 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The I2C interface is a bi-directional synchronous serial bus comprising a serial data line (SDA) and a serial clock line (derail clock line, SCL). In some embodiments of the application, processor 510 may contain multiple sets of I2C buses. The processor 510 may be coupled to the touch sensor 580F, charger, flash, camera 593, etc., respectively, through different I2C bus interfaces. For example, processor 510 may couple touch sensor 580F through an I2C interface, causing processor 510 to communicate with touch sensor 580F through an I2C bus interface, implementing the touch functionality of electronic device 500.
The I2S interface may be used for audio communication. In some embodiments of the application, processor 510 may contain multiple sets of I2S buses. Processor 510 may be coupled to audio module 570 via an I2S bus to enable communication between processor 510 and audio module 570. In some embodiments of the present application, the audio module 570 may transmit audio signals to the wireless communication module 560 through the I2S interface, so as to implement a function of answering a call through the bluetooth headset.
PCM interfaces may also be used for audio communication to sample, quantize and encode analog signals. In some embodiments of the present application, the audio module 570 and the wireless communication module 560 may be coupled through a PCM bus interface. In some embodiments of the present application, the audio module 570 may also transmit audio signals to the wireless communication module 560 through the PCM interface, so as to implement a function of answering a call through the bluetooth headset.
The UART interface is a universal serial data bus for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments of the present application, a UART interface is typically used to connect the processor 510 with the wireless communication module 560. For example, the processor 510 communicates with a bluetooth module in the wireless communication module 560 through a UART interface to implement bluetooth functions. In some embodiments of the present application, the audio module 570 may transmit audio signals to the wireless communication module 560 through a UART interface, so as to implement a function of playing music through a bluetooth headset.
The MIPI interface may be used to connect the processor 510 with peripheral devices such as the display screen 594, the camera 593, etc. The MIPI interfaces include camera serial interfaces (camera serial interface, CSI), display serial interfaces (display serial interface, DSI), and the like.
In some embodiments of the present application, the processor 510 and the camera 593 communicate through a CSI interface to implement the photographing function of the electronic device 500. Processor 510 and display screen 594 communicate via a DSI interface to implement the display functionality of electronic device 500.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or as a data signal. In some embodiments of the present application, a GPIO interface may be used to connect the processor 510 with the camera 593, the display screen 594, the wireless communication module 560, the audio module 570, the sensor module 580, and so forth. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, etc.
The USB interface 530 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 530 may be used to connect a charger to charge the electronic device 500, or may be used to transfer data between the electronic device 500 and a peripheral device. The USB interface 530 may also be used to connect headphones through which audio is played. The interface may also be used to connect other electronic devices, such as AR devices, etc.
It should be understood that the connection between the modules illustrated in the embodiments of the present application is only illustrative, and does not limit the structure of the electronic device 500. In other embodiments of the present application, the electronic device 500 may also employ different interfacing manners in the above embodiments, or a combination of multiple interfacing manners.
The charge management module 540 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 540 may receive a charging input of a wired charger through the USB interface 530. In some wireless charging embodiments, the charge management module 540 may receive wireless charging input through a wireless charging coil of the electronic device 500. The charging management module 540 may also provide power to the electronic device through the power management module 541 while charging the battery 542.
The power management module 541 is configured to connect the battery 542, the charge management module 540, and the processor 510. The power management module 541 receives input from the battery 542 and/or the charge management module 540 to power the processor 510, the internal memory 521, the display screen 594, the camera 593, the wireless communication module 560, and the like. The power management module 541 may also be configured to monitor parameters such as battery capacity, battery cycle times, battery health (leakage, impedance), etc.
In other embodiments, the power management module 541 may also be disposed in the processor 510. In other embodiments, the power management module 541 and the charge management module 540 may be disposed in the same device.
The wireless communication function of the electronic device 500 may be implemented by the antenna 1, the antenna 2, the mobile communication module 550, the wireless communication module 560, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in electronic device 500 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example, the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 550 may provide a solution for wireless communication including 2G/3G/4G/5G, etc., applied on the electronic device 500. The mobile communication module 550 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 550 may receive electromagnetic waves from the antenna 1, perform processes such as filtering and amplifying the received electromagnetic waves, and transmit the electromagnetic waves to the modem processor for demodulation. The mobile communication module 550 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate.
In some embodiments of the present application, at least some of the functional modules of the mobile communication module 550 may be provided in the processor 510. In some embodiments of the present application, at least some of the functional modules of the mobile communication module 550 may be provided in the same device as at least some of the modules of the processor 510.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 570A, receiver 570B, etc.) or displays images or video through display screen 594.
In some embodiments of the application, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 550 or other functional module, independent of the processor 510.
The wireless communication module 560 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., applied to the electronic device 500. The wireless communication module 560 may be one or more devices integrating at least one communication processing module. The wireless communication module 560 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 510. The wireless communication module 560 may also receive a signal to be transmitted from the processor 510, frequency modulate and amplify the signal, and convert the signal to electromagnetic waves through the antenna 2 for radiation.
In some embodiments of the present application, antenna 1 and mobile communication module 550 of electronic device 500 are coupled, and antenna 2 and wireless communication module 560 are coupled, so that electronic device 500 may communicate with a network and other devices through wireless communication technology. The wireless communication techniques may include a global system for mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS), and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The electronic device 500 implements display functionality through a GPU, a display screen 594, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display screen 594 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 510 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 594 is used to display images, videos, and the like. The display screen 594 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (FLED), a Miniled, microLed, micro-oeled, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments of the present application, electronic device 500 may include 1 or N display screens 594, where N is a positive integer greater than 1.
The electronic device 500 may implement a photographing function through an ISP, a camera 593, a video codec, a GPU, a display screen 594, an application processor, and the like.
The ISP is used to process the data fed back by the camera 593. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, so that the electrical signal is converted into an image visible to naked eyes. ISP can also perform algorithm optimization on noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature, etc. of the photographed scene. In some embodiments of the application, an ISP may be provided in the camera 593.
The camera 593 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments of the present application, the electronic device 500 may include 1 or N cameras 593, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the electronic device 500 is selecting a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like.
Video codecs are used to compress or decompress digital video. The electronic device 500 may support one or more video codecs. Thus, the electronic device 500 may play or record video in a variety of encoding formats, such as moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent recognition of the electronic device 500, for example, image recognition, face recognition, voice recognition, text understanding, etc., may be implemented by the NPU.
The external memory interface 520 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device 500. The external memory card communicates with the processor 510 via an external memory interface 520 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 521 may be used to store computer-executable program code that includes instructions. The internal memory 521 may include a storage program area and a storage data area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like. The storage data area may store data created during use of the electronic device 500 (e.g., audio data, phonebook, etc.), and so on.
In addition, the internal memory 521 may include a high-speed random access memory, and may also include a nonvolatile memory. Such as at least one disk storage device, flash memory device, universal flash memory (universal flash storage, UFS), etc.
The processor 510 performs various functional applications of the electronic device 500 and data processing by executing instructions stored in the internal memory 521 and/or instructions stored in a memory provided in the processor.
Electronic device 500 may implement audio functionality through an audio module 570, a speaker 570A, a receiver 570B, a microphone 570C, an ear-headphone interface 570D, an application processor, and so forth. Such as music playing, recording, etc.
The audio module 570 is configured to convert digital audio information to an analog audio signal output and also to convert an analog audio input to a digital audio signal. The audio module 570 may also be used to encode and decode audio signals. In some embodiments of the present application, the audio module 570 may be provided in the processor 510 or some functional modules of the audio module 570 may be provided in the processor 510.
Speaker 570A, also referred to as a "horn," is used to convert audio electrical signals into sound signals. The electronic device 500 may listen to music, or to hands-free conversations, through the speaker 570A.
A receiver 570B, also referred to as a "earpiece," is used to convert the audio electrical signal into a sound signal. When electronic device 500 is answering a telephone call or voice message, voice may be received by placing receiver 570B close to the human ear.
Microphone 570C, also known as a "microphone" or "microphone", is used to convert acoustic signals into electrical signals. When making a call or transmitting voice information, the user can sound near the microphone 570C through the mouth, inputting a sound signal to the microphone 570C. The electronic device 500 may be provided with at least one microphone 570C. In other embodiments, the electronic device 500 may be provided with two microphones 570C, and may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 500 may also be provided with three, four, or more microphones 570C to enable collection of sound signals, noise reduction, identification of sound sources, directional recording functions, etc.
The earphone interface 570D is used to connect a wired earphone. The earphone interface 570D may be a USB interface 530, or may be a 3.5mm open mobile electronic device platform (open mobile terminal platform, OMTP) standard interface, or a american cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The ambient light sensor 580A is used to detect the ambient light intensity of the environment in which the electronic device 500 is currently located and output the ambient light intensity. The electronic device 500 may adaptively adjust the backlight brightness and color temperature of the display screen 594 based on the detected ambient light intensity.
The gyro sensor 580B may be used to determine a motion gesture of the electronic device 500. In some embodiments of the application, the angular velocity of electronic device 500 about three axes (i.e., x, y, and z axes) may be determined by gyro sensor 580B.
The acceleration sensor 580C may detect the magnitude of acceleration of the electronic device 500 in various directions (typically three axes). The magnitude and direction of gravity may be detected when the electronic device 500 is stationary. The acceleration sensor 580C can also be used to identify the gesture of the electronic device, and can be applied to applications such as horizontal-vertical screen switching and pedometer.
The magnetic sensor 580D includes a hall sensor, magnetometer, and the like. The electronic device 500 may use the magnetic sensor 580D to detect the magnetic field strength and direction and position the electronic device 500 in its azimuth and attitude.
In the embodiment of the present application, any one of the gyro sensor 580B, the acceleration sensor 580C, and the magnetic sensor 580D may be used alone to detect the gesture of the electronic device 500, or any multiple of the above-mentioned gyro sensor 580B, acceleration sensor 580C, and magnetic sensor 580D may be used together to detect the gesture of the electronic device 500. Illustratively, the posture of the electronic device 500 may be detected using the acceleration sensor 580C and the magnetic sensor 580D at the same time, the posture of the electronic device 500 may be detected using the gyro sensor 580B and the acceleration sensor 580C at the same time, or the data output from the three sensors of the gyro sensor 580B, the acceleration sensor 580C, and the magnetic sensor 580D may be used at the same time to determine the posture of the electronic device 500 together.
The fingerprint sensor 580E is used to capture a fingerprint. The electronic device 500 may utilize the collected fingerprint characteristics to realize fingerprint unlocking, access an application lock, fingerprint photographing, fingerprint incoming call answering, and the like.
The touch sensor 580F is also referred to as a "touch device". The touch sensor 580F may be disposed on the display screen 594, and the touch sensor 580F and the display screen 594 form a touch screen, which is also referred to as a "touch screen". The touch sensor 580F is for detecting a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display screen 594. In other embodiments, the touch sensor 580F may also be disposed on a surface of the electronic device 500 at a different location than the display screen 594.
The keys 590 include a power key, a volume key, etc. The keys 590 may be mechanical keys or touch keys. The electronic device 500 may receive key inputs, generate key signal inputs related to user settings and function controls of the electronic device 500.
Motor 591 may generate a vibration alert. Motor 591 may be used for incoming call vibration alerting as well as for touch vibration feedback. For example, touch operations acting on different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. Touch operations on different areas of the display screen 594 may also correspond to different vibration feedback effects by the motor 591. Different application scenarios (e.g., time alert, receipt information, alarm clock, game, etc.) may also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
The indicator 592 may be an indicator light, which may be used to indicate a charge state, a change in charge, or may be used to indicate a message, missed call, notification, or the like.
The SIM card interface 595 is used to connect to a SIM card. The SIM card may be inserted into the SIM card interface 595 or removed from the SIM card interface 595 to enable contact and separation with the electronic device 500. The electronic device 500 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 595 may support Nano SIM cards, micro SIM cards, and the like. The same SIM card interface 595 may be used to insert multiple cards simultaneously. The types of the plurality of cards may be the same or different. The SIM card interface 595 may also be compatible with different types of SIM cards. The SIM card interface 595 may also be compatible with external memory cards. The electronic device 500 interacts with the network through the SIM card to realize functions such as communication and data communication. In some embodiments of the application, the electronic device 500 employs an eSIM (i.e., an embedded SIM card). The eSIM card can be embedded in the electronic device 500 and cannot be separated from the electronic device 500.
The software system of the electronic device 500 may employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. Embodiments of the application are configured in a layered mannerThe system is an example illustrating the software architecture of the electronic device 500.
Fig. 6 is a software architecture block diagram of an electronic device 500 according to an embodiment of the application.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments of the application, willThe system is divided into four layers, namely application programs from top to bottomA layer, an application framework layer, a system layer, and a kernel layer. Wherein the system layer comprises->Run time (+)>runtimes) and system libraries.
The application layer may include a series of application packages.
As shown in fig. 6, the application package may include applications for cameras, gallery, calendar, talk, map, navigation, WLAN, bluetooth, music, video, short messages, etc.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
As shown in fig. 6, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, a sensor service, and the like.
The window manager is used for managing window programs. The window manager may obtain the display screen size, determine if there is a status bar, lock the screen, intercept the screen, etc.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture.
The telephony manager is used to provide the communication functions of the electronic device 500. For example, management of call status (including on, off, etc.).
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification managers are used to inform of download completion, message alerts, etc. The notification manager may also be a notification presented in the form of a chart or scroll bar text in the system top status bar, such as a notification of a background running application, or a notification presented in the form of a dialog window on a display screen. Such as prompting text messages in status bars, sounding prompts, vibrating electronic devices, flashing indicator lights, etc.
The sensor service is used to manage services provided by various types of sensors installed in the electronic device 500. For example, the application layer receives a registration request for calling various sensor data by each application program, reads the data output by the sensor, and the like.
Run time includes a core library and virtual machines. />runtime is responsible for->Scheduling and management of the system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part isIs a core library of (a). In an embodiment of the present application, the function may include a function for reading the ambient light data buffered in the lower buffer, such as the ambient light data reading function in fig. 6.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing functions such as management of object life cycle, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example, surface manager (surface manager), media Libraries (Media Libraries), three-dimensional (3D) graphics processing Libraries (e.g., openGL ES), two-dimensional (2D) graphics engines (e.g., SGL), and the like.
The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio and video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
A two-dimensional graphics engine is a drawing engine that draws two-dimensional drawings.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver. The sensor driver can receive the original data output by the sensor and process the original data. For example, the sensor driver may receive raw data output by the ambient light sensor and transform the raw data to convert the raw data into data such as brightness, color temperature, etc. of the ambient light. The converted data such as brightness, color temperature and the like of the ambient light are cached in an ambient light data cache, and the upper layer functions are read and called.
Based on the software architecture shown in fig. 6, referring to fig. 7, a schematic diagram of a reporting flow of ambient light sensor output data according to an embodiment of the present application is shown. According to the reporting flow shown in fig. 7, the sensor driver of the kernel layer may receive the raw data output by the ambient light sensor, process the raw data in the sensor driver, and output the converted ambient light data. These ambient light data may be buffered to an ambient light data buffer in the kernel layer. The sensor service of the application framework layer may regularly call an ambient light data reading function in the system layer, through which ambient light data is read from the ambient light data buffer, for use by the respective application of the application layer. The compensation of the output data of the ambient light sensor in the embodiment of the application is to compensate the original data output by the ambient light sensor or the ambient light data obtained after the conversion of the sensor drive in the sensor drive of the kernel layer.
Fig. 8 is a schematic diagram showing an effect of compensating output data of an ambient light sensor according to an embodiment of the present application. The abscissa in fig. 8 is the pitch angle (pitch) of the electronic device, and the ordinate is the output value of the ambient light sensor. The unit of the abscissa is the degree, and the angle of the electronic equipment rotating around the X axis of the coordinate system of the electronic equipment can be represented; the output value of the ambient light sensor represented by the ordinate may be ambient light intensity data, and the unit size thereof may be determined according to different ambient light sensors, which is not limited by the embodiment of the present application.
Referring to fig. 9, a schematic diagram of an electronic device coordinate system according to an embodiment of the present application is shown. In the electronic device coordinate system shown in fig. 9, the origin may be a center point of the electronic device display screen, a plane formed by an X axis and a Y axis of the electronic device coordinate system is parallel to the electronic device display screen, and a Z axis is perpendicular to the electronic device display screen. Wherein the X-axis may be used to represent a left-right direction on a plane formed by a display screen of the electronic device and the Y-axis may be used to represent an up-down direction on a plane formed by a display screen of the electronic device. When a user is using the electronic device, the display screen of the electronic device rotates around the X axis to form a pitch angle, rotates around the Y axis to form a roll angle (roll), and rotates around the Z axis to form a yaw angle (yaw).
In fig. 8, a curve L1 is a response data curve formed based on current ambient light intensity data detected by an ambient light sensor in the electronic device, and the response data curve L1 is an uncompensated original response curve. The maximum output value of the ambient light sensor in the response data curve L1 is about 24000, and the pitch angle of the corresponding electronic device is about 45 degrees. It should be noted that, due to the type of the ambient light sensor and the type of the output data thereof, there is a large difference in the magnitudes of the output values of different ambient light sensors, and the units of these output values may also be different. The unit of the output value of the ambient light sensor in fig. 8 is not limited in the embodiment of the present application. As can be seen from fig. 8, the maximum output value 24000 is about the output value 12000 when the maximum output value 24000 is attenuated to half, and the pitch angle of the electronic device corresponding to the output value 12000 is about 18 degrees. It can be seen that, before uncompensated, when the pitch angle of the electronic device is within the range of 18-45 degrees, the ambient light sensor can accurately detect the ambient light intensity of the current environment, that is, the field angle performance of the ambient light sensor is relatively good when the pitch angle of the electronic device is within the range of 18-45 degrees.
The curve L2 in fig. 8 is an ideal response curve, and the ideal response curve L2 can be regarded as a response curve formed by detecting the ambient light intensity of the current environment when the ambient light sensor is mounted at a certain position of the electronic device and the layout structure is not limited and the ambient light sensor has good performance. The ideal response curve L2 described above may be formed, for example, when an ambient light sensor is arranged on the front of the display screen of the electronic device and its performance is not affected by other components or structures of the electronic device, with which ambient light intensity of the current environment is detected. As can be seen from fig. 8, the maximum output value of the ambient light sensor in the ideal response curve L2 is about 17000, and the pitch angle of the corresponding electronic device is about 45 degrees. As is clear from fig. 8, the maximum output value 17000 is about the output value 8500 when the maximum output value 17000 is attenuated to half, and the pitch angle of the electronic device corresponding to the output value 8500 is about 5 degrees. It can be seen that, under ideal conditions, when the pitch angle of the electronic device is within the range of 5-45 degrees, the ambient light sensor can accurately detect the ambient light intensity of the current environment, that is, the view angle performance of the ambient light sensor is relatively better when the pitch angle of the electronic device is within the range of 5-45 degrees, and the pitch angle range is obviously larger than the pitch angle range corresponding to the uncompensated original response curve.
As shown in fig. 8, the curve L3 is a response curve after compensation. The embodiment of the present application compensates the output data of the ambient light sensor, that is, compensates the response data curve L1 in fig. 8, so that the compensated response curve L3 approximates to the ideal response curve L2. In some implementations, the compensation for the original response data curve L1 may be performed in a linear, nonlinear compensation manner; in other implementations, the original response data curve L1 may be compensated by using a hyperbolic or quadratic curve compensation method, so as to obtain a compensated response curve L3. As can be seen from fig. 8, the maximum output value of the ambient light sensor in the compensated response curve L3 is about 17000, and the pitch angle of the corresponding electronic device is about 45 degrees. The maximum output value 17000 is about 8500 when it is attenuated to half according to the definition of the view angle of the ambient light sensor. In fig. 8, the pitch angle of the electronic device corresponding to the output value 8500 is about 5 degrees. After the original response data curve L1 is compensated, when the pitch angle of the electronic device is within a range of 5-45 degrees, the ambient light sensor can also accurately detect the ambient light intensity of the current environment, that is, by compensating the output data of the ambient light sensor, the view angle performance of the ambient light sensor can be close to the view angle performance under ideal conditions, so that when the pitch angle of the electronic device is within a larger angle range, the ambient light sensor can also obtain relatively good view angle performance.
The following describes the technical scheme of the present application with reference to specific embodiments.
Example 1
Fig. 10 is a schematic diagram of a method for adjusting a display screen according to an embodiment of the present application, where the method specifically includes the following steps:
s1001, the electronic equipment reads the gesture data of the gesture sensor.
In an embodiment of the present application, the attitude sensor may include an acceleration sensor, a magnetometer, a gyroscope, and the like. The electronic device can read attitude data output by any one or more of the acceleration sensor, the magnetometer and the gyroscope.
The electronic device may read data output by the acceleration sensor as posture data for calculating the inclination angle later, or may read data output by the magnetometer as posture data; or the electronic equipment can also read the data output by the acceleration sensor and the magnetometer at the same time, and the data output by the two sensors are used as posture data for calculating the inclination angle later.
It should be noted that, the electronic device may read the gesture data of the gesture sensor under the control of the processor of the electronic device.
S1002, the electronic equipment calculates the current pitch angle according to the attitude data.
The gesture data output by the gesture sensor may be used to determine a specific gesture of the electronic device in a current state. Generally, the posture of an electronic device may be determined according to the inclination angle of a user when using the electronic device. At different tilt angles, the display screen orientation of the electronic device is also different.
As can be seen from fig. 9, when the user uses the electronic device, the inclination angle of the electronic device may include an angle formed by rotating the display screen around the X-axis of the coordinate system of the electronic device, i.e., pitch angle (pitch), an angle formed by rotating the display screen around the Y-axis, i.e., roll angle (roll), and an angle formed by rotating the display screen around the Z-axis, i.e., yaw angle (yaw).
Typically, since the ambient light sensor is mainly laid out on the top half and the top of the electronic device. For example, the ambient light sensor in a cell phone is typically placed under the top half of the display on the front of the cell phone or on top of the cell phone. In this way, the impact of how the user holds the electronic device when using the electronic device is greatest on the ambient light sensor. Also, the most common change in attitude of an electronic device is a change in pitch angle for the user. Therefore, after the electronic equipment reads the gesture data of the gesture sensor, the current pitch angle of the electronic equipment can be calculated according to the gesture data, and the influence of the angle change of the roll angle and the yaw angle on the ambient light sensor is ignored.
S1003, the electronic device receives the first ambient light data output by the ambient light sensor.
The ambient light sensor can be used for sensing the intensity of light of the current environment of the electronic equipment and outputting corresponding data. The first ambient light data may be data that the ambient light sensor outputs for a current ambient light intensity variation. When the electronic equipment determines that the self inclination angle changes according to the posture data output by the posture sensor, the electronic equipment needs to confirm whether the ambient light also changes under different inclination angles, so that the backlight brightness, the color temperature and the like displayed on the display screen are conveniently adjusted according to different ambient light intensities, and the display screen is adapted to the current ambient light. Thus, the electronic device may receive the first ambient light data output by the ambient light sensor in real time.
S1004, the electronic equipment determines second ambient light data according to the pitch angle and the first ambient light data.
In the embodiment of the present application, the second ambient light data may be ambient light data obtained after the electronic device compensates the first ambient light data according to the device gesture.
In some scenarios, the data about the ambient light detected by the ambient light sensor may not be accurate, subject to differences in the layout, architecture of the ambient light sensor. For example, when the tilt angle of the electronic device changes, the ambient light of the current environment in which the electronic device is located may not change, but the output data may show that the ambient light changes greatly due to the performance of the ambient light sensor. Therefore, in order to compensate for adverse effects on ambient light detection due to layout and architecture defects of the ambient light sensor, the embodiment of the application can compensate for the first ambient light data output by the ambient light sensor. By compensation, the performance of the ambient light sensor is indirectly improved.
Because the angle change of the pitch angle of the electronic device has the greatest influence on the ambient light sensor, in the embodiment of the application, the electronic device can compensate the first ambient light data output by the ambient light sensor according to the calculated pitch angle.
In one implementation, the electronic device may compensate for the original data of the first ambient light data. In another implementation, since the ambient light raw data output by the ambient light sensor needs to be converted to be used by the electronic device for subsequent display adjustment, the electronic device may also compensate the first ambient light data.
For example, for the first ambient light data output by the ambient light sensor, the raw data thereof may be values of respective color components in Red Green Blue (RGB) color mode. The electronic device needs to convert the RGB values to obtain values of ambient light intensity, color temperature, and the like. The ambient light data reported by the electronic device to the processor for display screen adjustment should be converted ambient light intensity, color temperature, etc. Thus, in one implementation, the electronic device may compensate the first ambient light data by compensating the RGB values, and converting the RGB values to values of ambient light intensity, color temperature, etc. after the compensation. In another implementation, the electronic device may also compensate for the first ambient light data by compensating for values of the converted ambient light intensity, color temperature, etc.
In the embodiment of the application, the electronic device can compensate the first ambient light data through a corresponding compensation function. The compensation function may be a linear or nonlinear compensation function, or may be a quadratic curve, a hyperbolic curve or other compensation function, and the specific type or form of the compensation function is not limited in the embodiments of the present application.
In one example, the compensation function may be expressed as a linear functional form of y=ax+b, where x is an independent variable, y is a dependent variable, and a and b are parameters. In another example, the compensation function may also be expressed in the form of a polynomial-like function of y=ax≡2+bx+c, where x is an argument, y is a dependent variable, and a, b and c are parameters.
After the electronic device calculates the pitch angle according to the attitude data, the electronic device can calculate a corresponding y value by taking the calculated pitch angle as the value of x in the compensation function, and take the y value as the compensated second ambient light data.
For example, if the electronic device compensates the ambient light by compensating the converted ambient light intensity, the electronic device may calculate the compensated ambient light intensity using a compensation function according to the calculated pitch angle.
In one possible implementation, the compensation function may be derived by processing the actual response curve of the ambient light sensor output data as well as the ideal response curve. As can be seen from fig. 8, the curve L1 is an actual response data curve formed based on the current ambient light intensity data detected by the ambient light sensor in the electronic device, the curve L2 is an ideal response curve, and the corresponding compensation function can be obtained by performing data fitting on the curves L1 and L2. Thus, after the electronic device calculates the current pitch angle, the ambient light data calculated according to the pitch angle and the compensation function is approximately equal to the ambient light data corresponding to the pitch angle in the ideal response curve.
In practical applications, the actual response curve and the ideal response curve of the output data of the environmental light sensor in the electronic device may be obtained through experiments. For example, for a certain type of electronic device, the actual response curve may be obtained by placing the electronic device in a set environment and testing the ambient light data output by its ambient light sensor at different inclination angles. For the ideal response curve, the ideal response curve can be obtained by testing the ambient light sensor of the electronic equipment under the conditions of better position, layout and architecture by adopting the same testing method. The compensation function obtained based on the actual response curve and the ideal response curve can be built in the electronic equipment for subsequent compensation.
In the embodiment of the application, the electronic equipment can compensate the output data of the ambient light sensor based on the pitch angle by reading the attitude data of the attitude sensor and calculating to obtain the current pitch angle. Because the pitch angle is the most obvious factor influencing the ambient light sensor in the use process of the electronic equipment, the electronic equipment compensates the ambient light output data based on the pitch angle, the compensation effect can be ensured, the data quantity required to be processed in the compensation process is reduced to the greatest extent, and the compensation efficiency is improved.
For the compensated second ambient light data, the electronic device may be configured to adjust a backlight brightness, a color temperature, etc. of the display screen, so that the adjusted display screen is more suitable for viewing by human eyes.
Example two
Fig. 11 is a schematic diagram of another display screen adjustment method according to an embodiment of the present application, where the method specifically includes the following steps:
s1101, the electronic device reads the gesture data of the gesture sensor.
S1102, the electronic equipment calculates the current attitude angle according to the attitude data.
The first embodiment is an introduction of compensating the output data of the ambient light sensor based on the change of the pitch angle of the electronic device; in the second embodiment, a process of compensating the output data of the ambient light sensor based on a change of an attitude Angle (Euler Angle) of the electronic device is described.
As can be seen from fig. 9, when the user uses the electronic device, the inclination angle of the electronic device is not changed only by the angle of the pitch angle formed by rotating the electronic device around the X-axis of the electronic device coordinate system. Tilting of the electronic device may also cause a change in the angle of the roll angle formed by rotation about the Y axis and the yaw angle formed by rotation about the Z axis. The angular changes of the electronic device rotating around the X axis, the Y axis and the Z axis of the self coordinate system can be represented by using attitude angles, and the attitude angles represent the overall inclination condition of the electronic device in three dimensions.
Similar to the embodiment, in the case that a plurality of different similar gesture sensors are installed in the electronic device, the electronic device can select and read gesture data output by any one or any of the plurality of sensors. For example, the electronic device may read only the data output by the acceleration sensor as the posture data of the subsequent calculated tilt angle, or may read the data output by the acceleration sensor and the magnetometer at the same time, and use the data output by both the acceleration sensor and the magnetometer as the posture data of the subsequent calculated tilt angle. The electronic device may then calculate a current attitude angle from the attitude data.
In one implementation, the electronic device may calculate, according to the read gesture data, angles of rotation of the electronic device about the X-axis, the Y-axis, and the Z-axis of its own coordinate system in the current state, respectively. That is, the electronic device may first calculate the pitch angle, the roll angle, and the yaw angle from the attitude data. Then, the electronic equipment performs fusion processing on the pitch angle, the roll angle and the yaw angle to obtain the attitude angle of the electronic equipment.
S1103, the electronic device receives the first ambient light data output by the ambient light sensor.
And S1104, the electronic equipment compensates the first ambient light data according to the attitude angle to obtain compensated second ambient light data.
In the embodiment of the application, the electronic device compensates the first ambient light data according to the attitude angle, which may be the compensation of the original data output by the ambient light sensor, or may be the compensation of the ambient light intensity, the color temperature and other data after the ambient light sensor drives to convert the original data to obtain the ambient light intensity, the color temperature and other data.
In one possible implementation, the electronic device may use the calculated attitude angle as an input of the compensation function according to a built-in compensation function, and use an output value of the compensation function as the compensated second ambient light data. For example, if the electronic device compensates the ambient light intensity, the posture angle may be used as a value of a central argument of a compensation function corresponding to the ambient light intensity, and the compensated ambient light intensity may be calculated using the compensation function.
The compensation function in the second embodiment can also be obtained by processing the actual response curve and the ideal response curve of the ambient light sensor output data in a similar manner to the manner in which the compensation function in the first embodiment is determined. The difference is that when determining the actual response curve and the ideal response curve under the three-dimensional condition, the angle change condition of the attitude angle of the electronic equipment in the test process, namely the rotation condition of the electronic equipment around the coordinate axis of the electronic equipment in three directions, should be considered.
Fig. 12 is a schematic diagram showing an output data compensation effect of another ambient light sensor according to an embodiment of the present application. Fig. 12 shows the effect of compensating the output data of the ambient light sensor based on the angular change of the attitude angle. The black triangle in fig. 12 is the origin of the coordinate system, and the vector direction formed by the connection line between the origin of the coordinate system and any other data point in the figure represents the normal vector of the screen of the electronic device in the gesture, and the normal vector of the screen can be used for representing the gesture angle of the electronic device. Curve l in FIG. 12 1 Is the curve before compensation, that is, the actual response curve of the data output by the ambient light sensor; curve l 2 The curve is obtained by adopting a nonlinear compensation function to compensate the data output by the ambient light sensor. As can be seen from FIG. 12, curve l 2 More planar, the view angle performance of the corresponding ambient light sensor is better.
Because the electronic device rotates in the pitch direction and rotates in other directions during use, compared with the first embodiment which only considers rotation in the pitch direction, the second embodiment simultaneously considers rotation in the pitch direction, the roll direction and the yaw direction. In the second embodiment, the attitude of the electronic device in the three-dimensional space is calculated by using the attitude sensor, so that the output of the ambient light sensor is compensated based on the attitude angle in the three-dimensional space, and the rotation of the electronic device in different directions can be fully considered, thereby being beneficial to obtaining a better compensation effect.
And S1105, the electronic equipment adjusts the display screen according to the second ambient light data.
The electronic equipment can adjust parameters such as backlight brightness and color temperature of the display screen according to the compensated second ambient light data, so that the adjusted backlight brightness and color temperature are matched with actual light intensity of the current environment, and the human eye comfort level of a user when the user uses the electronic equipment is improved.
With reference to the foregoing description of the first embodiment and the second embodiment, when any one of the device posture of the electronic device and the first ambient light data output by the ambient light sensor is changed, the electronic device may implement adjustment of the display screen according to the technical solution provided by the embodiment of the present application.
In some embodiments, when the ambient light of the environment in which the electronic device is currently located changes, the first ambient light data output by the ambient light sensor will also change. In this case, the electronic device may compensate the changed first ambient light data according to the current device posture, so as to implement adjustment of backlight brightness and color temperature of the display screen. For example, when the electronic device is in a certain fixed device posture, the device posture of the electronic device calculated based on the posture data output by the posture sensor is a fixed value, that is, the device posture of the electronic device is not changed. Meanwhile, the electronic equipment can also adjust the display screen because the first ambient light data output by the ambient light sensor changes.
In other embodiments, if the first ambient light data output by the ambient light sensor is unchanged, but the device posture of the electronic device is changed, the electronic device may also compensate the first ambient light data according to the changed device posture, so as to implement adjustment of the display screen. Illustratively, in some scenarios, the first ambient light data detected and output by the ambient light sensor is constant, but the position, orientation, etc. where the electronic device is located changes, which may result in a change in the gesture data output by the gesture sensor. Correspondingly, the device gesture obtained by the electronic device according to the gesture data will also be different, i.e. the device gesture of the electronic device changes. In this case, the electronic device may compensate the first ambient light data that is unchanged based on the changed device posture, thereby adjusting the display screen according to the compensation result.
Example III
Fig. 13 is a schematic diagram of another display screen adjustment method according to an embodiment of the present application, where the method specifically includes the following steps:
s1301, the electronic equipment reads the gesture data of the gesture sensor.
S1302, the electronic equipment calculates the current inclination angle according to the gesture data.
In the embodiment of the application, the current inclination angle calculated by the electronic equipment according to the gesture data can be the pitch angle of the electronic equipment or the gesture angle. The process of the electronic device reading the attitude data of the attitude sensor and calculating the pitch angle or the attitude angle according to the attitude data can be referred to the description in the first embodiment and the second embodiment, and the description of the embodiment of the present application is omitted.
And S1303, the electronic equipment compensates the display parameters according to the inclination angle.
In the first and second embodiments, the purpose of the electronic device to compensate the ambient light data may be to adjust the display parameters of the display screen according to the compensated ambient light data. In general, display parameters of a display screen have a certain correspondence with different ambient light data. Illustratively, taking the backlight brightness of a display screen as an example, for a certain electronic device, a functional expression of ambient light data and the backlight brightness of the display screen to be adjusted may be stored therein. Based on the ambient light data detected by the ambient light sensor and having different sizes, the electronic device can adjust the backlight brightness of the display screen according to the functional expression. In general, the functional expression of the ambient light data and the backlight brightness of the display screen to be adjusted can be expressed in a piecewise linear function mode, and the functional expression is different for different electronic devices and display screens made of different materials.
Therefore, in the embodiment of the application, after the electronic device calculates the current inclination angle and other data according to the gesture data, the original display parameters of the display screen can be directly compensated by utilizing the corresponding compensation function based on the inclination angle. Wherein the original display parameters of the display screen may be determined from the first ambient light data output by the ambient light sensor.
In one possible implementation manner, taking the electronic device to compensate the display parameters of the display screen according to the pitch angle as an example, the electronic device may fuse the compensation function in the first embodiment with the functional expression of the ambient light data and the backlight brightness of the display screen to be adjusted, to obtain a fusion compensation function directly used for compensating the display parameters of the display screen according to the pitch angle. After the electronic equipment calculates the current pitch angle according to the attitude data, the pitch angle can be used as input data, and the fusion compensation function is utilized to output the value of the backlight brightness of the display screen to be adjusted. The electronic device may then adjust the display screen based on the value of the output backlight brightness.
In another possible implementation manner, taking the electronic device to compensate the display parameters of the display screen according to the attitude angle as an example, the electronic device may fuse the compensation function in the second embodiment with the functional expression of the ambient light data and the backlight brightness of the display screen to be adjusted, to obtain a fused compensation function directly used for compensating the display parameters of the display screen according to the attitude angle. After the electronic device calculates the current attitude angle according to the attitude data, the electronic device can output the value of the backlight brightness of the display screen to be adjusted by using the fusion compensation function by taking the attitude angle as input data. The electronic device may then adjust the display screen based on the value of the output backlight brightness.
In the embodiment of the application, the electronic device can directly compensate the display parameters of the display screen according to the calculated current inclination angle, and compared with the first embodiment and the second embodiment, which compensate the ambient light data output by the ambient light sensor according to the inclination angle and then adjust the display parameters of the display screen according to the compensated ambient light data, the embodiment omits the intermediate step of adjusting the ambient light data, reduces the probability of erroneously adjusting the display parameters, and improves the accuracy of adjusting the display parameters.
The embodiment of the application can divide the functional modules of the electronic device according to the method example, for example, each functional module can be divided corresponding to each function, and one or more functions can be integrated in one functional module. The integrated modules may be implemented in hardware or in software functional modules. It should be noted that, in the embodiment of the present application, the division of the modules is schematic, which is merely a logic function division, and other division manners may be implemented in actual implementation.
Corresponding to the above embodiments, referring to fig. 14, there is shown a block diagram of a display screen adjusting apparatus provided in an embodiment of the present application, which may be applied to the electronic device in the above embodiments, and the apparatus may specifically include a device posture determining module 1401, a first ambient light data acquiring module 1402, a second ambient light data determining module 1403, and a display screen adjusting module 1404; wherein:
A device gesture determination module 1401 for determining a current device gesture;
a first ambient light data acquisition module 1402, configured to acquire first ambient light data output by an ambient light sensor;
a second ambient light data determination module 1403 for determining second ambient light data from the device pose and the first ambient light data;
the display screen adjusting module 1404 is configured to adjust the display screen according to the second ambient light data.
In one possible implementation, the device gesture determination module 1401 may be specifically configured to: reading attitude data output by an attitude sensor; and determining the current equipment gesture according to the gesture data.
In one possible implementation, the attitude sensor may include any one or more of the following:
acceleration sensor, magnetic sensor, gyroscope; wherein the magnetic sensor may comprise a magnetometer.
In one possible implementation, the device gesture determination module 1401 may also be configured to: calculating the equipment gesture by adopting the gesture data output by each gesture sensor, wherein each gesture sensor has a corresponding weight value; and based on the weight values, fusing the equipment gestures obtained by calculation of each gesture sensor to obtain fused equipment gestures.
In one possible implementation, the second ambient light data determination module 1403 may be specifically configured to: acquiring a pre-generated compensation function; and compensating the first ambient light data according to the equipment posture and the compensation function to obtain the second ambient light data.
In one possible implementation, the electronic device generates the compensation function in advance by calling the following module:
the recording module is used for recording test data output by the ambient light sensor under test conditions, wherein the test data comprise output values of the ambient light sensor corresponding to different equipment postures;
the generation module is used for generating an actual response curve of the ambient light sensor by adopting the test data;
and the fitting module is used for fitting the actual response curve with a preset ideal response curve to obtain the compensation function, and the ideal response curve is used for representing the corresponding relation between different equipment postures and the output value of the ambient light sensor in an ideal state.
In one possible implementation, the compensation function may include any one of the following function types:
A linear function, a nonlinear function; wherein the nonlinear function may include a polynomial function, a logarithmic function, an exponential function, a power function.
In a possible implementation manner, the first ambient light data may include ambient light raw data output by the ambient light sensor, or data obtained by converting the ambient light raw data.
In one possible implementation, the display screen adjustment module 1404 may be specifically configured to: determining display parameters of a display screen corresponding to the compensated second ambient light data; and adjusting the display screen according to the display parameters.
In one possible implementation, the display adjustment module 1404 may also be used to: determining original display parameters of a display screen according to the first ambient light data; compensating the original display parameters based on the equipment posture to obtain compensated display parameters; and adjusting the display screen by adopting the compensated display parameters.
In one possible implementation, the device pose may include a pitch angle or a pose angle of the electronic device.
It should be noted that, all relevant contents of each step related to the above method embodiment may be cited to the functional description of the corresponding functional module, which is not described herein.
The embodiment of the application also provides an electronic device, which can be the electronic device in each of the previous embodiments, and the electronic device includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor executes the computer program to implement the display screen adjustment method in each of the previous embodiments.
Embodiments of the present application also provide a computer readable storage medium having stored therein computer instructions that, when executed on an electronic device, cause the electronic device to perform the related method steps described above to implement the display screen adjustment method in each of the embodiments described above.
Embodiments of the present application also provide a computer program product which, when run on an electronic device, causes the electronic device to perform the above-described related steps to implement the display screen adjustment method in the above-described embodiments.
The embodiment of the application also provides a chip which comprises a processor, wherein the processor can be a general-purpose processor or a special-purpose processor. The processor is configured to support the electronic device to perform the related steps, so as to implement the display screen adjustment method in each embodiment.
Finally, it should be noted that: the foregoing is merely illustrative of specific embodiments of the present application, and the scope of the present application is not limited thereto, but any changes or substitutions within the technical scope of the present application should be covered by the scope of the present application.

Claims (12)

1. A method of adjusting a display screen, comprising:
the electronic equipment determines the current equipment gesture;
the electronic equipment acquires first ambient light data output by an ambient light sensor;
the electronic equipment determines second ambient light data according to the equipment gesture and the first ambient light data;
and the electronic equipment adjusts the display screen according to the second ambient light data.
2. The method of claim 1, wherein the electronic device determining a current device pose comprises:
the electronic equipment reads gesture data output by a gesture sensor;
and the electronic equipment determines the current equipment gesture according to the gesture data.
3. The method of claim 2, wherein the attitude sensor comprises any one or more of the following:
acceleration sensor, magnetic sensor, gyroscope; wherein the magnetic sensor comprises a magnetometer.
4. The method of claim 3, wherein the electronic device determining the current device pose from the pose data comprises:
the electronic equipment calculates the equipment gesture by adopting the gesture data output by each gesture sensor, and each gesture sensor has a corresponding weight value;
and the electronic equipment fuses the equipment gestures obtained by calculation of each gesture sensor based on the weight values to obtain the fused equipment gestures.
5. The method of any of claims 1-4, wherein the electronic device determining second ambient light data from the device pose and the first ambient light data comprises:
the electronic equipment acquires a pre-generated compensation function;
and the electronic equipment compensates the first ambient light data according to the equipment posture and the compensation function to obtain the second ambient light data.
6. The method of claim 5, wherein the compensation function comprises any one of the following types of functions:
a linear function, a nonlinear function; wherein the nonlinear function comprises a polynomial function, a logarithmic function, an exponential function and a power function.
7. The method of any of claims 1-4 or 6, wherein the first ambient light data comprises ambient light raw data output by the ambient light sensor or data obtained by converting the ambient light raw data.
8. The method of claim 7, wherein the electronic device adjusts a display screen based on the second ambient light data, comprising:
the electronic equipment determines display parameters of a display screen corresponding to the compensated second ambient light data;
and the electronic equipment adjusts the display screen according to the display parameters.
9. The method of claim 1, further comprising, after the electronic device acquires the first ambient light data output by the ambient light sensor:
the electronic equipment determines original display parameters of a display screen according to the first ambient light data;
the electronic equipment compensates the original display parameters according to the equipment posture to obtain compensated display parameters;
and the electronic equipment adjusts the display screen by adopting the compensated display parameters.
10. The method of any of claims 1-9, wherein the device pose comprises a pitch angle or a pose angle of the electronic device.
11. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the display screen adjustment method according to any one of claims 1-10 when executing the computer program.
12. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein computer instructions, which when run on an electronic device, cause the electronic device to implement the display screen adjustment method of any of claims 1-10.
CN202210191816.1A 2022-02-28 2022-02-28 Display screen adjusting method and electronic equipment Pending CN116704928A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210191816.1A CN116704928A (en) 2022-02-28 2022-02-28 Display screen adjusting method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210191816.1A CN116704928A (en) 2022-02-28 2022-02-28 Display screen adjusting method and electronic equipment

Publications (1)

Publication Number Publication Date
CN116704928A true CN116704928A (en) 2023-09-05

Family

ID=87843899

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210191816.1A Pending CN116704928A (en) 2022-02-28 2022-02-28 Display screen adjusting method and electronic equipment

Country Status (1)

Country Link
CN (1) CN116704928A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117857696A (en) * 2024-02-07 2024-04-09 荣耀终端有限公司 Ambient light data reporting method and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117857696A (en) * 2024-02-07 2024-04-09 荣耀终端有限公司 Ambient light data reporting method and electronic equipment

Similar Documents

Publication Publication Date Title
CN115473957B (en) Image processing method and electronic equipment
CN113905179B (en) Method for switching cameras by terminal and terminal
CN114119758B (en) Method for acquiring vehicle pose, electronic device and computer-readable storage medium
WO2022017261A1 (en) Image synthesis method and electronic device
CN112351156B (en) Lens switching method and device
CN110138999B (en) Certificate scanning method and device for mobile terminal
CN112017615A (en) Method for calibrating ambient light brightness of electronic equipment and electronic equipment
CN110248037B (en) Identity document scanning method and device
CN113810603B (en) Point light source image detection method and electronic equipment
CN113542580B (en) Method and device for removing light spots of glasses and electronic equipment
CN113837920B (en) Image rendering method and electronic equipment
US20220214892A1 (en) Foreground element display method and electronic device
CN114089932A (en) Multi-screen display method and device, terminal equipment and storage medium
CN115964231A (en) Load model-based assessment method and device
CN116704928A (en) Display screen adjusting method and electronic equipment
CN115150542A (en) Video anti-shake method and related equipment
CN116708751B (en) Method and device for determining photographing duration and electronic equipment
CN115032640B (en) Gesture recognition method and terminal equipment
CN115460343B (en) Image processing method, device and storage medium
CN113573045B (en) Stray light detection method and stray light detection device
CN115686182B (en) Processing method of augmented reality video and electronic equipment
CN115641867A (en) Voice processing method and terminal equipment
CN117009005A (en) Display method, automobile and electronic equipment
CN114283195A (en) Method for generating dynamic image, electronic device and readable storage medium
CN114445522A (en) Brush effect graph generation method, image editing method, 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