Processing method and electronic equipment

By detecting the amount of light changes in electronic devices and collecting optical data and display data, combined with intelligent engine processing, determining ambient light data to adjust the brightness of the display screen, the problems of inaccurate optical compensation and high power consumption in the prior art are solved, and efficient and accurate optical compensation and low power consumption are achieved.

CN119516924APending Publication Date: 2025-02-25LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411653867.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

In the prior art, when performing light compensation based on an under-screen light sensor, it is difficult to accurately obtain the screen display content, resulting in large dimming errors. In order to reduce errors, the light sensor needs to frequently collect light data, resulting in high power consumption.

Method used

By detecting that the amount of light changes meets a certain range, the light data is collected based on the light sensor, and the display data of each frame during the time period of the acquired light data is obtained from the graphics card. The optical data and display data are processed by the intelligent engine to determine the ambient light data, thereby adjusting the brightness of the display screen.

Benefits of technology

It achieves the accuracy of light compensation, reduces power consumption, and ensures that the display brightness matches the ambient brightness and adapts to the actual environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119516924A_ABST
    Figure CN119516924A_ABST
Patent Text Reader

Abstract

The invention provides a processing method and electronic equipment, the electronic equipment comprises a display card, a display screen and a light sensor arranged under the display screen, the method comprises the following steps: when detecting that a light variation satisfies a first range, collecting light data based on the light sensor, each frame of display data in the time period of collecting the light data is obtained from a display card, the light data comprises brightness data after ambient light penetrates through the display screen and brightness data of each frame of display data of the display screen, and the ambient light is light in the environment where the electronic equipment is located; the display data is used for forming display content on the display screen; and determining data of ambient light based on the light data and the display data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and more particularly to a processing method and an electronic device. Background Art

[0002] In order to meet the needs of small and slim design of electronic devices, light sensors are usually installed under the screen. If the light sensors installed under the screen are used to collect ambient light for light compensation, then when the screen is in a non-extinguished state, that is, displaying content, it will affect the data collected by the light sensor, causing a large screen dimming error and not suitable for the actual environment. Therefore, when performing light compensation based on the light sensor under the screen, it is necessary to obtain data such as the display content of the screen when the light sensor collects data to eliminate the influence of the screen. It takes a period of time (i.e., integration time) for the light sensor to obtain light data, and the screen may change many times during this period of time. The prior art usually only obtains the display content of the last frame of the screen during this period of time, so this solution may cause errors. To reduce errors, the prior art usually allows the light sensor to continue collecting light data at every integration time interval, but this solution will lead to the problem of high power consumption.

[0003] Therefore, how to ensure the accuracy of light compensation while taking energy consumption into consideration is an urgent problem to be solved. Summary of the invention

[0004] The embodiment of the present application provides a processing method, which is applied to an electronic device, wherein the electronic device includes a graphics card, a display screen, and a light sensor disposed under the display screen, and the method includes:

[0005] When it is detected that the light variation meets the first range, light data is collected based on the light sensor, and each frame of display data in the time period of collecting the light data is obtained from the graphics card, wherein the light data includes brightness data of ambient light after passing through the display screen and brightness data of each frame of display data of the display screen, the ambient light is the light in the environment where the electronic device is located, and the display data is used to form display content on the display screen;

[0006] Ambient light data is determined based on the light data and the display data.

[0007] In some embodiments, obtaining, from a graphics card, each frame of display data within a time period for collecting the light data includes:

[0008] Determining the time when the light variation is detected to satisfy a first range as the start time when the light sensor collects the light data;

[0009] Generate a start signal based on the start time, and send it to a display driver to control the display driver to start acquiring display data in the graphics card;

[0010] Determining an end time of collecting the light data by the light sensor according to a processing time of generating the light data by the light sensor and the start time;

[0011] An end signal is generated based on the end time and sent to the display driver to control the display driver to stop acquiring display data in the graphics card.

[0012] In some embodiments, the method further comprises:

[0013] Determining a refresh rate of the graphics card;

[0014] determining a frequency of acquiring the display data based on the refresh rate;

[0015] The generating a start signal based on the start time and sending it to a display driver to control the display driver to start acquiring display data in the graphics card includes:

[0016] Starting from the starting time, the display driver is controlled to obtain display data in the graphics card based on the acquisition frequency.

[0017] In some embodiments, determining the ambient light data based on the light data and the display data comprises:

[0018] Processing the light data and the display data by an intelligent engine to calculate and determine a light compensation value, wherein the light compensation value is related to the pixel brightness in each frame of display data;

[0019] The ambient light data is determined based on the light data and the light compensation value calculation.

[0020] In some embodiments, the processing of the light data and the display data by an intelligent engine to calculate and determine the light compensation value includes:

[0021] For each frame of display data, determining light data corresponding to the frame of display data;

[0022] Based on the display data of each frame and the light data corresponding to the frame, first input data corresponding to the display data of the frame is formed, and each of the first input data is input into the intelligent engine to obtain each sub-light compensation value;

[0023] All the sub-light compensation values ​​are averaged to obtain the light compensation value.

[0024] In some embodiments, the processing of the light data and the display data by an intelligent engine to calculate and determine the light compensation value includes:

[0025] Performing mean processing on all the display data to obtain target display data;

[0026] Second input data is formed based on the target display data and the light data, and the second input data is input into the intelligent engine to obtain the light compensation value.

[0027] In some embodiments, the smart engine is trained based on light data collected by a light sensor of a standard electronic device and display data collected by a graphics card driver of the standard electronic device;

[0028] The method further comprises:

[0029] Adjusting the light compensation value generated by the intelligent engine processing the light data collected by the electronic device and the acquired display data based on the adjustment parameter to obtain an adjusted light compensation value;

[0030] Determine the ambient light data based on the light data and the adjusted light compensation value;

[0031] The adjustment parameter is determined based on the difference between the light data collected and the display data acquired by the electronic device and the light data collected and the display data acquired by the standard electronic device.

[0032] In some embodiments, it also includes:

[0033] collecting light data after the display screen stops displaying based on the light sensor as target light data;

[0034] When it is detected that the change of the ambient light of the electronic device is less than a first range, in response to lighting up the display screen, the ambient light data is determined based on the target light data.

[0035] Another embodiment of the present application also provides an electronic device, including:

[0036] Display screen, used to display the content in the graphics card;

[0037] A light sensor, located below the display screen, for detecting whether the light variation meets a first range and collecting light data;

[0038] At least one processor is used to collect light data based on the light sensor when detecting that the light change amount meets the first range, and obtain each frame of display data within the time period of collecting the light data from the graphics card, wherein the light data includes brightness data of ambient light after passing through the display screen and brightness data of each frame of display data of the display screen, the ambient light is the light in the environment where the electronic device is located, and the display data is used to form display content on the display screen; determine the ambient light data based on the light data and the display data, and adjust the brightness of the display screen based on the ambient light data.

[0039] In some embodiments, the processor is capable of running the smart engine or has the ability to call the smart engine, and the smart engine is used to calculate and determine the ambient light data based on the light data and the display data.

[0040] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings.

[0041] The technical solution of the present application is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0043] Figure 1 It is a flowchart of the processing method in the embodiment of the present application.

[0044] Figure 2 It is a flowchart of the processing method in the application embodiment of the present application.

[0045] Figure 3 It is a flowchart of a processing method in another embodiment of the present application.

[0046] Figure 4 Schematic diagram of the structural relationship of the electronic device in the embodiment of the present application. DETAILED DESCRIPTION

[0047] Below, specific embodiments of the present application are described in detail with reference to the accompanying drawings, but are not intended to limit the present application.

[0048] It should be understood that various modifications may be made to the embodiments disclosed herein. Therefore, the following description should not be considered as limiting, but merely as an example of an embodiment. Other modifications within the scope and spirit of the present disclosure will occur to those skilled in the art.

[0049] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the general description of the present disclosure given above and the detailed description of the embodiments given below, serve to explain the principles of the present disclosure.

[0050] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.

[0051] It should also be understood that, although the present application has been described with reference to some specific examples, those skilled in the art will be able to realize many other equivalent forms of the present application that have the features described in the claims and are therefore within the scope of protection defined thereby.

[0052] The above and other aspects, features and advantages of the present disclosure will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.

[0053] Specific embodiments of the present disclosure are described hereinafter with reference to the accompanying drawings; however, it should be understood that the disclosed embodiments are merely examples of the present disclosure, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid obscuring the present disclosure with unnecessary or redundant details. Therefore, the specific structural and functional details disclosed herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present disclosure in a variety of ways with substantially any suitable detailed structure.

[0054] This specification may use the phrases "in one embodiment," "in another embodiment," "in a further embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present disclosure.

[0055] Below, embodiments of the present application are described in detail with reference to the accompanying drawings.

[0056] like Figure 1 As shown, the present application provides a processing method, which is applied to an electronic device, wherein the electronic device includes a graphics card, a display screen, and a light sensor disposed under the display screen, and the electronic device may be, but is not limited to, a mobile phone, a tablet computer, a learning machine, etc. The processing method described in this embodiment includes:

[0057] S1: when it is detected that the light variation meets the first range, light data is collected based on the light sensor, and each frame of display data within the time period of collecting the light data is obtained from the graphics card, the light data includes brightness data of ambient light after passing through the display screen and brightness data of each frame of display data of the display screen, the ambient light is the light in the environment where the electronic device is located, and the display data is used to form display content on the display screen;

[0058] S2: Determine ambient light data based on the light data and the display data.

[0059] Combination Figure 2As shown, assuming that the display screen is an OLED display screen, the light sensor (such as Figure 2 When the SEMSOR Y in the image sensor is set below the display screen of the electronic device, there is no light shielding plate above the light sensor in the display screen. When the graphics card controls the display screen to display an image, the pixels in the display screen will be powered on and lit up. Each pixel will not only emit light toward the screen, but also emit light in the direction away from the screen, that is, the back side of the pixel (such as Figure 2 The light in the two directions is the same. When collecting data, the light sensor will collect the light emitted by the pixel and the ambient light in the environment where the electronic device is located (such as Figure 2 Ambient light A) in the light emitted from the display screen to the light sensor, and then the light data is obtained based on the collected "mixed light", that is, the light data corresponds to the "mixed light".

[0060] The light sensor has a light sensing function, which can roughly sense the light intensity and brightness without the light sensor performing the above calculation to obtain the light data, and can upload the sensed data to the processing system, and the system compares the currently obtained sensed value with the sensed value of the light intensity and brightness at the previous moment, and then determines whether the light intensity and brightness have changed, and determines whether the screen brightness needs to be adjusted accordingly, so that the screen display adapts to the environment in which the device is located. Among them, the accuracy of the light intensity and brightness sensing results is lower than the light intensity and brightness detection results determined by the calculation of light data, and when the light sensor senses the light intensity and brightness, the light it senses is still the above mixed light. When the system senses that the amount of light change meets the first range, it can be determined that the environment in which the device is located may have changed, and the screen brightness needs to be adjusted to match the display brightness of the display screen with the ambient brightness, ensuring that the user can safely and clearly view the image on the screen. The first range is composed of values ​​greater than 0. The first range represents a critical condition that the environment in which the device is located has changed and the screen brightness needs to be adjusted. Only when this condition is met will the system trigger the device's screen brightness adjustment mechanism. If this condition is not met, the system will assume that the environment has not changed, or has changed slightly, and the current screen brightness is still in a matching range with the ambient light brightness, so there is no need to adjust the screen brightness, and the screen brightness adjustment mechanism will not be triggered.

[0061] After the system determines that the light change amount meets the first range, it will start the screen brightness adjustment mechanism, which includes controlling the light sensor to collect light data, and obtaining each frame of display data output by the graphics card during the time period of collecting the light data. The display data is used to form the display content on the display screen, that is, the display data includes all the data required for the display screen to present each frame of the image. The light data, as described above, includes the brightness data of the ambient light after passing through the display screen and the brightness data of each frame of the image data displayed on the display screen. When the system obtains the light data and display data in the same time period, it will perform calculations based on the two types of data to accurately extract the brightness data corresponding to the ambient light from the light data to obtain the ambient light data, hereinafter referred to as the ambient light data. Based on the ambient light data, the system can accurately adjust the display brightness of the display screen without being interfered by the screen brightness, so that the screen brightness is adapted to the ambient brightness.

[0062] Through the above method, the light sensor will only execute the light data processing process when the light change amount meets the first range, and the system will only perform the fusion processing of light data and display data when the light change amount meets the first range. There is no need for the light sensor and the system to always be in a high-power operation state, thereby greatly reducing the operating power consumption of the light sensor and the system, and at the same time achieving accurate calculation of ambient light data, ensuring that the subsequent adjustment of the screen brightness adapts to the light environment of the actual scene, and meeting the user's viewing needs for the display screen.

[0063] In one embodiment, obtaining, from a graphics card, each frame of display data within a time period for collecting the light data includes:

[0064] S3: determining the time when the light variation is detected to satisfy the first range as the start time when the light sensor collects the light data;

[0065] S4: generating a start signal based on the start time, and sending the signal to a display driver to control the display driver to start acquiring display data in the graphics card;

[0066] S5: determining an end time for the light sensor to collect the light data according to the processing time for the light sensor to generate the light data and the start time;

[0067] S6: Generate an end signal based on the end time, and send it to the display driver to control the display driver to stop acquiring the display data in the graphics card.

[0068] Exemplarily, the scheme described in this embodiment is to collect each frame of display data output by the graphics card within the time period based on the time period in which the light data is collected. Assuming that the graphics card outputs 8 frames of display data in total within the time period, then the 8 frames of display data are all the data required to be collected, and the collected display data is composed of the 8 frames of data. When accurately collecting each frame of display data, the scheme used in this embodiment is to use the moment when the light change amount is detected to meet the first range as the starting moment of the collection. The system will generate a start signal at this moment, such as a timestamp, and send it to the display driver. The display driver responds to the start signal and starts to collect each frame of display data from the graphics card. When the light sensor completes the processing of the light data, that is, after obtaining the light data, the system will generate an end signal at the end moment, such as a timestamp, and send it to the display driver to notify it to stop collecting display data. Or the system is based on the known light data processing time, and then calculates and determines the end time based on the processing time and the start time. When the end time is reached, an end signal is generated and sent to the display driver. The display driver can obtain all display data within the time period by starting to collect display data at the start time and stopping to collect display data at the end time, so that the display data and the light data have a high degree of matching, which effectively solves the problem of inaccurate data collection caused by asynchronous collection time of the two types of data in the existing solution.

[0069] In order to ensure the acquisition accuracy of each frame of display data by the display driver, the method further includes:

[0070] S7: Determine the refresh rate of the graphics card;

[0071] S8: Determine the acquisition frequency of the display data based on the refresh rate;

[0072] The generating a start signal based on the start time and sending it to a display driver to control the display driver to start acquiring display data in the graphics card includes:

[0073] S9: Starting from the starting time, controlling the display driver to obtain display data in the graphics card based on the acquisition frequency.

[0074] The refresh rate of the graphics card is the update frequency of each frame of display data. In order for the display driver to obtain each frame of display data in a timely manner, the system in this embodiment sets the acquisition frequency of the display driver, that is, the acquisition frequency of the display data, to be consistent with the refresh rate of the graphics card, so that the display driver will acquire the frame of display data every time the graphics card refreshes a frame of display data. For example, when notifying the display driver of the start time, the system will configure its acquisition frequency to the refresh rate of the graphics card, thereby controlling the display driver to synchronize the acquisition of display data with the refresh frame data of the graphics card, thereby ensuring that the display driver can acquire all the display data output by the graphics card within the time period.

[0075] Combination Figure 3 As shown, the determining of the ambient light data based on the light data and the display data includes:

[0076] S10: Processing the light data and the display data by an intelligent engine to calculate and determine a light compensation value, where the light compensation value is related to the pixel brightness in each frame of display data;

[0077] S11: Calculate and determine the ambient light data based on the light data and the light compensation value.

[0078] In the existing scheme, the processing of light data and display data is performed by a linear fitting algorithm, which has a slow processing speed and is significantly affected by data noise. Sometimes overfitting occurs, which further leads to a decrease in processing accuracy. In order to improve this phenomenon and improve data processing accuracy and processing efficiency, an intelligent engine is used in this embodiment to process light data and display data to calculate the light compensation value (such as Figure 2 The light compensation value is the value corresponding to the brightness of the light emitted by each pixel when the display screen displays each frame of the image during the period when the light sensor collects light data. This value is used to characterize the amount of interference caused by the display screen to the collected ambient light data when the light sensor collects ambient light data, that is, the pixel brightness data contained in the light data collected by the light sensor. In order to obtain interference-free ambient light data, the system needs to determine the pixel brightness data collected during the ambient light data collection period, and then remove it from the collected data to obtain the required ambient light data.

[0079] When the light data and the display data are processed by the intelligent engine to calculate and determine the light compensation value, it includes:

[0080] S12: for each frame of display data, determining light data corresponding to the frame of display data;

[0081] S13: forming first input data corresponding to the display data of each frame based on the display data of the frame and the light data corresponding to the frame, inputting each of the first input data into the smart engine to obtain each sub-light compensation value;

[0082] S14: performing average processing on all the sub-light compensation values ​​to obtain the light compensation value.

[0083] In this embodiment, the display data includes multiple frames of data. When calculating the light compensation value, the scheme adopted is to bring all the multiple frames of display data into the calculation, which is significantly different from the existing scheme of only applying the last frame of display data to calculate the light compensation value. By bringing all the display data into the calculation, the accuracy of the calculation result can be effectively ensured, thereby ensuring that the subsequent adjustment of the screen brightness matches the actual ambient brightness. When performing the calculation, in this embodiment, the light data collected at the corresponding moment is first separated from the acquired light data according to the collection moment of each frame of display data. After the light data corresponding to each frame of display data is determined, it is input into the intelligent engine to obtain the sub-light compensation value corresponding to each frame of display data. Then, the multiple sub-light compensation values ​​are averaged to finally obtain the required light compensation value.

[0084] In another embodiment, when the system processes the light data and the display data through the intelligent engine to calculate and determine the light compensation value, the scheme adopted includes:

[0085] S15: performing mean processing on all the display data to obtain target display data;

[0086] S16: forming second input data based on the target display data and the light data, and inputting the second input data into the intelligent engine to obtain the light compensation value.

[0087] In this embodiment, the system first averages the display data of all frames to obtain the processed target display data, which integrates the information contained in all frame data and is representative. Then, the system inputs the target display data and the obtained light data into the intelligent engine to calculate the required light compensation value.

[0088] Based on the above two embodiments, it can be known that the system splits the obtained display data and light data into display data and light data whose acquisition time and data matching degree meet the corresponding requirements, and then combines them into input data, which is then input into the intelligent engine for processing, thereby further improving data processing accuracy and data processing efficiency.

[0089] The intelligent engine is trained based on the light data collected by the light sensor of the standard electronic device and the display data collected by the graphics card driver of the standard electronic device. For example, the intelligent engine in this embodiment is trained before the above-mentioned electronic device leaves the factory, and its training data is collected by a fixed device. The fixed device is defined as a standard electronic device, which can be understood as taking the electronic device as the standard and the data collected by the electronic device as the standard. The specific standard electronic device is uncertain. In this embodiment, the aforementioned electronic device is different from the standard electronic device as an example for explanation. When constructing an intelligent engine, first construct an initial intelligent engine, and then use a standard electronic device to collect a large amount of training light data and training display data in different environments, different display contents, and different display brightness scenes, and obtain the training light compensation values ​​corresponding to different scenes. Then, the training light data and training display data are used as input data, and the training light compensation values ​​are used as output data to train the initial intelligent engine, and finally obtain the intelligent engine. Among them, the display data and training display data can include but are not limited to pixel brightness values, pixel RGB values, pixel positions, etc. After the training is completed and the intelligent engine is obtained, it can be deployed to each device to be shipped for use. The electronic device is any device in the device to be shipped. Since the specific hardware configuration and software parameters of the device to be shipped are not necessarily the same as those of the standard electronic device, each device will be different in light data collection and display of display content. When the intelligent engine processes the data collected by non-standard electronic devices, it will be affected, which may easily cause inaccurate calculation of light compensation values. In order to solve this problem, ensure the universality of the intelligent engine, and at the same time ensure the accuracy of the light compensation value, the method described in this embodiment also proposes to set adjustment parameters for different electronic devices (non-standard electronic devices, such as the above-mentioned device to be shipped). The adjustment parameters are used to adjust the light compensation value calculated by the intelligent engine based on the data collected by the device, so that the adjusted light compensation value is more in line with the actual display of the device, that is, the pixel brightness data actually collected by the light sensor.

[0090] When calculating the adjustment parameters, the solution adopted in this embodiment includes:

[0091] Under the condition that the environment is the same and the standard electronic device and the electronic device both display the same content with the same display parameters, obtain light data collected by the light sensors in the standard electronic device and the electronic device respectively and display data collected by the graphics card driver;

[0092] Obtaining a first light compensation value based on processing the light data and display data corresponding to the standard electronic device by the intelligent engine;

[0093] Obtaining a second light compensation value based on processing the light data and display data corresponding to the electronic device by the intelligent engine;

[0094] The adjustment parameter is calculated and determined based on the first light compensation value and the second light compensation value. Remember to indicate that the electronic device and the standard electronic device are different devices of the same model.

[0095] For example, in the same lighting area in the same room, when the standard electronic device and the electronic device whose light compensation parameters are to be adjusted are controlled to display the same image with the same screen brightness, contrast, etc., the light data are collected by their respective light sensors at the same time, and the display data are collected by their respective graphics card drivers. The collection time of the light data and display data of different devices is not necessarily the same, which depends on the processing capacity of the device, but it can be ensured that the light data collected by the device and the display data are in the same period. After obtaining the data collected by each device, the system inputs it into the intelligent engine in turn, so that the intelligent engine calculates the first light compensation value of the corresponding standard electronic device and the second light compensation value of the corresponding electronic device to be adjusted based on the obtained data. After the system obtains the first light compensation value and the second light compensation value, it will process them, including mean processing, difference processing, etc., and finally obtain the adjustment parameters corresponding to the electronic device. For electronic devices with different configurations, their adjustment parameters are usually different, and the calculated adjustment parameters will be deployed in the corresponding electronic device, so that the device can adjust the calculated light compensation parameters during use after leaving the factory.

[0096] For example, after obtaining the adjustment parameters of the electronic device, the method further includes:

[0097] S17: adjusting the light compensation value generated by the intelligent engine processing the light data collected by the electronic device and the acquired display data based on the adjustment parameter to obtain an adjusted light compensation value;

[0098] S18: Determine the ambient light data based on the light data and the adjusted light compensation value;

[0099] The adjustment parameter is determined based on the difference between the light data collected and the display data acquired by the electronic device and the light data collected and the display data acquired by the standard electronic device.

[0100] The above scheme means that when the electronic device leaves the factory and is put into use by the user, the system senses that the light change amount meets the first range based on the light sensor, and then controls the light sensor to collect light data, and the graphics card driver collects display data. After that, when the light data and display data are processed by the intelligent engine to obtain the candidate light compensation value, the system will call out the adjustment parameter and adjust the light compensation value based on the adjustment parameter, such as summing and subtracting the light compensation value and the adjustment parameter, to obtain the adjusted light compensation value. At this time, the system will use the adjusted light compensation value and the previously obtained light data to obtain the ambient light data, and adjust the screen brightness of the display screen, that is, the display brightness, based on the ambient light data. Among them, the light data can be retained by copying and storing, so as to be used in the calculation stage of the intelligent engine and the ambient light data respectively.

[0101] In order to reduce the amount of calculation of the system and avoid redundant calculation of the system, the electronic device, during actual use, also includes

[0102] S19: collecting light data after the display screen stops displaying based on the light sensor as target light data;

[0103] S20: When the light change of the environment where the electronic device is located is detected by the light sensor to be less than a first range, in response to lighting up the display screen, the ambient light data is determined based on the target light data.

[0104] For example, when a user controls an electronic device to turn off the screen, or the electronic device automatically turns off the screen and enters a standby state or a sleep state, an obvious change in brightness will occur. When the system senses that the amount of light change meets the first range, it will collect light data of the display screen after the screen is turned off based on the light sensor. The light data at this time is defined as target light data, which can be considered as light data that is not affected by pixel brightness, that is, ambient light data. During the period when the electronic device is off, the light sensor can sense the brightness change of the ambient light in real time or at a fixed time. If the amount of light change is less than the first range, it can be determined that the light change in the user's environment is small. At this time, if the user turns on the screen, the system will directly determine the ambient light data based on the target light data collected when the screen is off, and adjust the screen brightness accordingly.

[0105] like Figure 4 As shown, another embodiment of the present application also provides an electronic device, including:

[0106] Display screen, used to display the content in the graphics card;

[0107] A light sensor, located below the display screen, for detecting whether the light variation meets a first range and collecting light data;

[0108] At least one processor is used to collect light data based on the light sensor when detecting that the light change amount meets the first range, and obtain each frame of display data within the time period of collecting the light data from the graphics card, the light data including brightness data of ambient light after passing through the display screen and brightness data of each frame of display data of the display screen, the ambient light is the light in the environment where the electronic device is located, and the display data is used to form display content on the display screen; determine the ambient light data based on the light data and the display data, and adjust the brightness of the display screen based on the ambient light data.

[0109] In some embodiments, the processor is capable of running the smart engine or has the ability to call the smart engine, and the smart engine is used to calculate and determine the ambient light data based on the light data and the display data.

[0110] In some embodiments, when the processor obtains each frame of display data within a time period for collecting the light data from the graphics card, it includes:

[0111] Determining the time when the light variation is detected to satisfy a first range as the start time when the light sensor collects the light data;

[0112] Generate a start signal based on the start time, and send it to a display driver to control the display driver to start acquiring display data in the graphics card;

[0113] Determining an end time of collecting the light data by the light sensor according to a processing time of generating the light data by the light sensor and the start time;

[0114] An end signal is generated based on the end time and sent to the display driver to control the display driver to stop acquiring display data in the graphics card.

[0115] In some embodiments, the processor is further configured to:

[0116] Determining a refresh rate of the graphics card;

[0117] determining a frequency of acquiring the display data based on the refresh rate;

[0118] The generating a start signal based on the start time and sending it to a display driver to control the display driver to start acquiring display data in the graphics card includes:

[0119] Starting from the starting time, the display driver is controlled to obtain display data in the graphics card based on the acquisition frequency.

[0120] In some embodiments, when the processor determines the ambient light data based on the light data and the display data, it includes:

[0121] Processing the light data and the display data by an intelligent engine to calculate and determine a light compensation value, wherein the light compensation value is related to the pixel brightness in each frame of display data;

[0122] The ambient light data is determined based on the light data and the light compensation value calculation.

[0123] In some embodiments, the processing of the light data and the display data by an intelligent engine to calculate and determine the light compensation value includes:

[0124] For each frame of display data, determining light data corresponding to the frame of display data;

[0125] Based on the display data of each frame and the light data corresponding to the frame, first input data corresponding to the display data of the frame is formed, and each of the first input data is input into the intelligent engine to obtain each sub-light compensation value;

[0126] All the sub-light compensation values ​​are averaged to obtain the light compensation value.

[0127] In some embodiments, when the processor processes the light data and the display data through the intelligent engine to calculate and determine the light compensation value, the process includes:

[0128] Performing mean processing on all the display data to obtain target display data;

[0129] Second input data is formed based on the target display data and the light data, and the second input data is input into the intelligent engine to obtain the light compensation value.

[0130] In some embodiments, the smart engine is trained based on light data collected by a light sensor of a standard electronic device and display data collected by a graphics card driver of the standard electronic device;

[0131] The processor is further configured to:

[0132] Adjusting the light compensation value generated by the intelligent engine processing the light data collected by the electronic device and the acquired display data based on the adjustment parameter to obtain an adjusted light compensation value;

[0133] Determine the ambient light data based on the light data and the adjusted light compensation value;

[0134] The adjustment parameter is determined based on the difference between the light data collected and the display data acquired by the electronic device and the light data collected and the display data acquired by the standard electronic device.

[0135] In some embodiments, the processor is further configured to:

[0136] collecting light data after the display screen stops displaying based on the light sensor as target light data;

[0137] When it is detected that the change of the ambient light of the electronic device is less than a second range, in response to lighting up the display screen, the ambient light data is determined based on the target light data.

[0138] Another embodiment of the present application further provides an electronic device, comprising:

[0139] one or more processors;

[0140] a memory configured to store one or more programs;

[0141] When the one or more programs are executed by the one or more processors, the one or more processors implement the processing method described in any one of the embodiments above.

[0142] Furthermore, an embodiment of the present invention also provides a storage medium on which a computer program is stored, and when the program is executed by a processor, the data processing method described above is implemented. It should be understood that each solution in this embodiment has the corresponding technical effect in the above method embodiment, which will not be repeated here.

[0143] Furthermore, an embodiment of the present application also provides a computer program product, which is tangibly stored on a computer-readable medium and includes computer-readable instructions, which, when executed, cause at least one processor to perform a processing method such as that in the embodiment described above.

[0144] It should be noted that the computer storage medium of the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access storage medium (RAM), a read-only storage medium (ROM), an erasable programmable read-only storage medium (EPROM or flash memory), an optical fiber, a portable compact disk read-only storage medium (CD-ROM), an optical storage medium, a magnetic storage medium, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can send, propagate or transmit a program configured to be used by or in conjunction with an instruction execution system, system or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, antenna, optical cable, RF, etc., or any suitable combination of the above.

[0145] In addition, it will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.

[0146] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.

Claims

1. A processing method, applied to an electronic device, the electronic device comprising a graphics card, a display screen, and a light sensor disposed under the display screen, the method comprising: When it is detected that the light variation meets the first range, light data is collected based on the light sensor, and each frame of display data in the time period of collecting the light data is obtained from the graphics card, wherein the light data includes brightness data of ambient light after passing through the display screen and brightness data of each frame of display data of the display screen, the ambient light is the light in the environment where the electronic device is located, and the display data is used to form display content on the display screen; The ambient light data is determined based on the light data and the display data.

2. The method according to claim 1, wherein obtaining, from a graphics card, each frame of display data within a time period for collecting the light data comprises: Determining the time when the light variation is detected to satisfy a first range as the start time when the light sensor collects the light data; Generate a start signal based on the start time, and send it to a display driver to control the display driver to start acquiring display data in the graphics card; Determining an end time of collecting the light data by the light sensor according to a processing time of generating the light data by the light sensor and the start time; An end signal is generated based on the end time and sent to the display driver to control the display driver to stop acquiring display data in the graphics card.

3. The method according to claim 2, wherein: The method further comprises: Determining a refresh rate of the graphics card; determining a frequency of acquiring the display data based on the refresh rate; The generating a start signal based on the start time and sending it to a display driver to control the display driver to start acquiring display data in the graphics card includes: Starting from the starting time, the display driver is controlled to obtain display data in the graphics card based on the acquisition frequency.

4. The method according to claim 1, wherein determining the ambient light data based on the light data and the display data comprises: Processing the light data and the display data by an intelligent engine to calculate and determine a light compensation value, wherein the light compensation value is related to the pixel brightness in each frame of display data; The ambient light data is determined based on the light data and the light compensation value calculation.

5. The method according to claim 4, wherein the processing the light data and the display data by an intelligent engine to calculate and determine the light compensation value comprises: For each frame of display data, determining light data corresponding to the frame of display data; Based on the display data of each frame and the light data corresponding to the frame, first input data corresponding to the display data of the frame is formed, and each of the first input data is input into the intelligent engine to obtain each sub-light compensation value; All the sub-light compensation values ​​are averaged to obtain the light compensation value.

6. The method according to claim 4, wherein the processing the light data and the display data by an intelligent engine to calculate and determine the light compensation value comprises: Performing mean processing on all the display data to obtain target display data; Second input data is formed based on the target display data and the light data, and the second input data is input into the intelligent engine to obtain the light compensation value.

7. The method according to claim 4, wherein the intelligent engine is trained based on light data collected by a light sensor of a standard electronic device and display data collected by a graphics card driver of the standard electronic device; The method further comprises: Adjusting the light compensation value generated by the intelligent engine processing the light data collected by the electronic device and the acquired display data based on the adjustment parameter to obtain an adjusted light compensation value; Determine the ambient light data based on the light data and the adjusted light compensation value; The adjustment parameter is determined based on the difference between the light data collected and the display data acquired by the electronic device and the light data collected and the display data acquired by the standard electronic device.

8. The method according to claim 1, further comprising: collecting light data after the display screen stops displaying based on the light sensor as target light data; When it is detected that the change of the ambient light of the electronic device is less than a first range, in response to lighting up the display screen, the ambient light data is determined based on the target light data.

9. An electronic device, comprising: Display screen, used to display the content in the graphics card; A light sensor, located below the display screen, for detecting whether the light variation meets a first range and collecting light data; At least one processor is used to collect light data based on the light sensor when detecting that the light change amount meets the first range, and obtain each frame of display data within the time period of collecting the light data from the graphics card, the light data including brightness data of ambient light after passing through the display screen and brightness data of each frame of display data of the display screen, the ambient light is the light in the environment where the electronic device is located, and the display data is used to form display content on the display screen; determine the ambient light data based on the light data and the display data, and adjust the brightness of the display screen based on the ambient light data.

10. The electronic device of claim 9, wherein the at least one processor is configured to process the light data and the display data through an intelligent engine to calculate data for determining ambient light.