Light sensing data compensation method and device, terminal and storage medium
By using the backlight level and display content of the reference machine as input parameters, combined with the prototype's light sensing offset and temperature calibration coefficient, the light leakage of the prototype screen is corrected, solving the problem that the light leakage of the terminal screen affects the accuracy of light sensing data, and achieving more accurate ambient light detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-11
- Publication Date
- 2026-03-27
AI Technical Summary
The amount of light leakage from the terminal screen affects the accuracy of the ambient light detected by the light sensor, resulting in inaccurate light sensing data.
The backlight level and display content of the reference machine are used as input parameters for the light leakage prediction model. The light leakage of the prototype screen is corrected by the light sensor offset of the prototype. Combined with the calibration coefficient of temperature change, the light leakage of the target screen is obtained, and then the actual light sensor data is corrected to obtain the accurate ambient light.
It effectively eliminates the influence of light leakage from the prototype screen, making the light sensing data more accurate. It also takes into account the impact of temperature changes on light leakage, thus improving the accuracy of ambient light detection.
Smart Images

Figure CN119479570B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of terminals, and in particular, to a light-sensing data compensation method and device, a terminal, and a storage medium. BACKGROUND
[0002] In related technologies, a terminal automatically adjusts the screen brightness by detecting the ambient light quantity around the terminal through an optical sensor (hereinafter referred to as light-sensing). However, when the light-sensing detects the ambient light quantity, the terminal screen is also emitting light, so the ambient light quantity detected by the light-sensing is affected by the light leakage quantity of the terminal screen, resulting in inaccurate ambient light quantity detected by the light-sensing. SUMMARY
[0003] To overcome the problems in related technologies, the present disclosure provides a light-sensing data compensation method and device, a terminal, and a storage medium.
[0004] According to a first aspect of an embodiment of the present disclosure, a light-sensing data compensation method is provided, comprising:
[0005] Taking the backlight level and display content of a reference machine as input parameters of a light leakage quantity prediction model, a light leakage quantity of a prototype screen of a prototype machine is obtained.
[0006] According to the actual light-sensing data detected by the light-sensing on the prototype machine and the light leakage quantity of the prototype screen, an ambient light quantity in which the prototype machine currently exists is obtained.
[0007] Optionally, according to the actual light-sensing data detected by the light-sensing on the prototype machine and the light leakage quantity of the prototype screen, the ambient light quantity in which the prototype machine currently exists is obtained, comprising:
[0008] The light leakage quantity of the prototype screen is corrected by using a prototype light-sensing offset quantity, to obtain a target screen light leakage quantity.
[0009] According to the actual light-sensing data and the target screen light leakage quantity, the ambient light quantity is obtained.
[0010] Optionally, the light leakage quantity of the prototype screen is corrected by using a prototype light-sensing offset quantity, to obtain a target screen light leakage quantity, comprising:
[0011] A target offset quantity calibration coefficient corresponding to the display content of the prototype machine and the prototype temperature of the prototype machine is determined.
[0012] The reference machine light-sensing offset quantity at the prototype temperature of the reference machine is calibrated to the prototype light-sensing offset quantity of the prototype machine by using the target offset quantity calibration coefficient; the reference machine light-sensing offset quantity is obtained according to first light-sensing data and second light-sensing data, the first light-sensing data is light-sensing data detected by the light-sensing on the reference machine at a current temperature, and the second light-sensing data is light-sensing data detected by the light-sensing on the reference machine at a reference temperature.
[0013] The prototype screen light leakage amount is corrected by using the prototype light sensitivity offset amount to obtain a target screen light leakage amount.
[0014] Optionally, the backlight level of the reference machine and the display content are taken as input parameters of the light leakage amount prediction model to obtain the prototype screen light leakage amount of the prototype machine, including:
[0015] The display content of the reference machine and the backlight level of the reference machine are taken as input parameters of the light leakage amount prediction model to obtain a reference machine screen light leakage amount of the reference machine; wherein the display content of the reference machine input into the light leakage amount prediction model is the same as the display content of the prototype machine, and the backlight level of the reference machine input into the light leakage amount prediction model is the same as the backlight level of the prototype machine.
[0016] The reference machine screen light leakage amount is mapped to the prototype machine by using a target light sensitivity calibration coefficient to obtain the prototype screen light leakage amount; the target light sensitivity calibration coefficient is obtained according to light sensitivity data detected by the light sensor on the prototype machine and light sensitivity data detected by the light sensor on the reference machine when the prototype machine and the reference machine are in the same backlight level and display content.
[0017] Optionally, the reference machine screen light leakage amount is mapped to the prototype machine by using a target light sensitivity calibration coefficient to obtain the prototype screen light leakage amount, including:
[0018] From a plurality of light sensitivity calibration coefficients, a target light sensitivity calibration coefficient corresponding to the display content of the prototype machine and the backlight level is determined.
[0019] The reference machine screen light leakage amount is mapped to the prototype machine by using a target light sensitivity calibration coefficient to obtain the prototype screen light leakage amount.
[0020] Optionally, determining a target offset calibration coefficient corresponding to the display content of the prototype machine and the prototype temperature of the prototype machine includes:
[0021] From a plurality of preset display content corresponding change curves, a target change curve corresponding to the display content of the prototype machine is determined, and the change curve is used to represent the relationship between temperature and offset calibration coefficient.
[0022] From a plurality of temperature corresponding offset calibration coefficients in the target change curve, a target offset calibration coefficient corresponding to the prototype temperature of the prototype machine is selected; the offset calibration coefficient is obtained according to light sensitivity data detected by the light sensor on the prototype machine and light sensitivity data detected by the light sensor on the reference machine when the prototype machine and the reference machine are in the same temperature and display content.
[0023] Optionally, the method further includes:
[0024] determining a first light-sensing temperature variation curve of the sample machine when displaying the preset display content and a second light-sensing temperature variation curve of the reference machine when displaying the same preset display content, the first light-sensing temperature variation curve being used to represent a relationship between temperature and light-sensing data detected by a light sensor on the sample machine, and the second light-sensing temperature variation curve being used to represent a relationship between temperature and light-sensing data detected by a light sensor on the reference machine;
[0025] dividing the light-sensing data at the same temperature in the first light-sensing temperature variation curve and the second light-sensing temperature variation curve to obtain a variation curve corresponding to the preset display content.
[0026] Optionally, the method further comprises:
[0027] multiplying the reference machine light-sensing offset and the target offset calibration coefficient to obtain the sample machine light-sensing offset.
[0028] Optionally, the method further comprises:
[0029] interpolating the reference machine light-sensing offset at the sample machine temperature according to a plurality of reference machine temperatures and reference machine light-sensing offsets at the plurality of reference machine temperatures;
[0030] multiplying the reference machine light-sensing offset at the sample machine temperature and the target offset calibration coefficient to obtain the sample machine light-sensing offset.
[0031] Optionally, the method further comprises:
[0032] obtaining the ambient light quantity in which the sample machine is currently located according to actual light-sensing data detected by a light sensor on the sample machine and a target screen light leakage quantity.
[0033] Optionally, the method further comprises:
[0034] training an initial model by taking different screen contents and backlight levels of the reference machine as training samples;
[0035] correcting network parameters of the initial model according to a loss function of the initial model until an error between a reference machine screen light leakage quantity output by the initial model and an actual reference machine screen light leakage quantity satisfies a convergence condition;
[0036] The initial model when the error satisfies the convergence condition is taken as the light leakage amount prediction model.
[0037] According to a second aspect of the embodiments of the present disclosure, a light sensing data compensation device is provided, comprising:
[0038] A prediction module is configured to take the backlight level of the reference machine and the display content as input parameters of the light leakage amount prediction model, and obtain the prototype screen light leakage amount of the prototype machine.
[0039] An ambient light amount calculation module is configured to obtain the ambient light amount in which the prototype machine is currently located according to the actual light sensing data detected by the light sensing on the prototype machine and the prototype screen light leakage amount.
[0040] According to a third aspect of the embodiments of the present disclosure, a terminal is provided, comprising:
[0041] A processor;
[0042] A memory for storing processor-executable instructions;
[0043] The processor is configured to:
[0044] Perform the steps of the light sensing data compensation method provided by the first aspect of the present disclosure.
[0045] According to a fourth aspect of the embodiments of the present disclosure, a computer readable storage medium is provided, which stores computer program instructions, and the program instructions are executed by a processor to implement the steps of the light sensing data compensation method provided by the first aspect of the present disclosure.
[0046] The technical solutions provided by the embodiments of the present disclosure can include the following beneficial effects:
[0047] I. The prototype screen light leakage amount can be obtained through the light leakage amount prediction model, and the actual light sensing data is corrected using the prototype screen light leakage amount to obtain the ambient light amount in which the prototype machine is currently located, thereby removing the influence of the prototype screen light leakage amount and making the light sensing data detected by the light sensing more accurate.
[0048] II. The prototype screen light leakage amount can be corrected by using the prototype light sensitivity offset to obtain the target screen light leakage amount. In this process, the light leakage amount prediction model uses the data at the reference temperature to obtain the prototype screen light leakage amount, and does not consider that the change in temperature from the reference temperature to the current temperature will cause the prototype screen light leakage amount to shift. However, when the prototype screen light leakage amount is corrected by using the prototype light sensitivity offset, since the prototype light sensitivity offset is the change in light sensitivity data caused by the change in temperature from the reference temperature to the current temperature, adding or subtracting the prototype light sensitivity offset to the obtained prototype screen light leakage amount will make the obtained target screen light leakage amount be obtained based on the change in light sensitivity data caused by the change in temperature, so that the obtained target screen light leakage amount is more real and accurate.
[0049] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and are not limiting to the present disclosure. BRIEF DESCRIPTION OF DRAWINGS
[0050] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present disclosure and serve to explain the principles of the present disclosure together with the description.
[0051] Figure 1 is a flowchart of a light sensitivity data compensation method according to an exemplary embodiment.
[0052] Figure 2 is a schematic diagram of a first light sensitivity temperature change curve according to an exemplary embodiment.
[0053] Figure 3 is a schematic diagram of a second light sensitivity temperature change curve according to an exemplary embodiment.
[0054] Figure 4 is a schematic diagram of a change curve corresponding to a preset display content according to an exemplary embodiment.
[0055] Figure 5 is a schematic diagram of calibrating the reference machine screen light leakage amount to the prototype screen light leakage amount according to an exemplary embodiment.
[0056] Figure 6 is a block diagram of a light sensitivity data compensation device according to an exemplary embodiment.
[0057] Figure 7 is a block diagram of a terminal according to an exemplary embodiment. DETAILED DESCRIPTION
[0058] The exemplary embodiments will be described in detail herein with reference to the attached drawings. The following description is made with reference to the accompanying drawings in which like reference numerals designate identical or similar elements in the several figures. The implementations described in the following exemplary embodiments are not meant to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0059] It should be noted that all the actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the corresponding data protection regulations policy of the country where the device is located, and with the authorization given by the corresponding device owner.
[0060] Figure 1 is a flowchart of a light sensing data compensation method according to an exemplary embodiment, as shown in Figure 1 The light sensing data compensation method is used in a terminal and includes the following steps.
[0061] In step S11, the backlight level of the reference machine and the display content are taken as input parameters of the leakage light amount prediction model, and the prototype screen leakage light amount of the prototype machine is obtained.
[0062] The reference machine is the final version or standard sample designed to meet the design requirements after multiple debugging and verification in the product design and development stage. The reference machine is a standard sample that meets the product specifications and quality requirements. The reference machine is a standard prototype; the prototype machine is a terminal for users.
[0063] The reference machine screen leakage light amount is the light amount that affects the ambient light detection of the light sensing on the reference machine when the screen of the reference machine emits light; the prototype machine screen leakage light amount is the light amount that affects the ambient light detection of the light sensing on the prototype machine when the screen of the prototype machine emits light.
[0064] The leakage light amount prediction model is used to predict the reference machine screen leakage light amount of the reference machine, and then the target light sensing calibration coefficient is used to map the reference machine screen leakage light amount to the prototype machine, so as to obtain the prototype machine screen leakage light amount. Therefore, the leakage light amount prediction model is used to predict the prototype machine screen leakage light amount.
[0065] The target light sensing calibration coefficient is the ratio of the light sensing data detected by the light sensing on the prototype machine to the light sensing data detected by the light sensing on the reference machine when the prototype machine and the reference machine are placed in the same dark environment under the same backlight level and display content. It can be understood that when the prototype machine and the reference machine are in the same dark environment, the light sensing data detected by the light sensing on the prototype machine is the prototype machine screen leakage light amount, and the light sensing data detected by the light sensing on the reference machine is the reference machine screen leakage light amount.
[0066] In step S12, the actual light intensity data detected by the light sensor on the prototype and the screen leakage of the prototype are used to obtain the ambient light intensity of the environment in which the prototype is currently located.
[0067] The actual light intensity data is the light intensity detected by the light sensor on the prototype. When the user actually uses the prototype, the actual light intensity data detected by the light sensor on the prototype is equal to the ambient light intensity plus the screen leakage of the prototype. Therefore, after obtaining the screen leakage of the prototype by the screen leakage prediction model, the actual light intensity data can be subtracted by the screen leakage of the prototype to obtain the real ambient light intensity.
[0068] The light intensity in the ambient light intensity, the screen leakage of the prototype, and the screen leakage of the reference machine can be understood as the intensity of light or the energy of light, etc.
[0069] Through the above technical solution, the screen leakage of the prototype can be obtained by the screen leakage prediction model, and the actual light intensity data is corrected by the screen leakage of the prototype to obtain the actual ambient light intensity of the environment in which the prototype is currently located, so that the influence of the screen leakage of the prototype is removed, and the light intensity data detected by the light sensor is more accurate.
[0070] Some optional embodiments and specific embodiments related to steps S11 and S12 will be introduced below.
[0071] The temperature change of the prototype will affect the screen leakage of the prototype. For example, when the prototype is in a low-temperature environment, the screen light may become dim, and the screen leakage of the prototype decreases. When the prototype is in a high-temperature environment, the screen light is brighter, and the screen leakage of the prototype increases. However, the temperature change is not considered when the screen leakage of the prototype is obtained by the screen leakage prediction model, so that the accuracy of the output screen leakage of the prototype is reduced. Therefore, in some specific embodiments, the screen leakage of the prototype needs to be corrected to reduce the influence of temperature on the screen leakage of the prototype, so that the obtained screen leakage of the prototype is more accurate, which includes the following steps:
[0072] In step S21, a target offset calibration coefficient corresponding to the display content of the prototype and the prototype temperature of the prototype is determined.
[0073] The display content of the prototype includes the gray scale information of a specific region of the prototype. The specific region refers to a region in the screen of the prototype whose influence value on the light sensor is greater than a preset value. For example, when the light sensor is arranged below the screen of the prototype, the region near the light sensor in the screen of the prototype is the specific region. The gray scale information of the specific region includes the gray scale value and the pixel point information of the specific region. The pixel point information includes the number of pixel points included in the specific region.
[0074] The size of the specific region and the influence coefficient of each sub-region in the specific region can be determined by scanning.
[0075] In determining the size of the specific area, the sample machine can be placed in a dark environment, and the sub-areas on the screen of the sample machine are lit one by one. If the light sensor on the sample machine has light sensing data, the sub-area is regarded as a sub-area in the specific area, and finally the specific area in the screen of the sample machine which has an effect on the light sensor is determined. It can be understood that when a certain sub-area in the sub-area is lit one by one, the currently lit sub-area is controlled to be lit and the remaining sub-areas are not lit.
[0076] In determining the influence coefficient of each sub-area, each light sensing data read by the light sensor can be normalized. For example, if a specific area is composed of a first sub-area, a second sub-area and a third sub-area, the light sensing data of the first sub-area read by the light sensor is 10, the light sensing data of the second sub-area is 15, and the light sensing data of the third sub-area is 30. Then the influence coefficient of the first sub-area is The influence coefficient of the second sub-area is The influence coefficient of the third sub-area is In this way, the influence coefficient of each sub-area is obtained, which represents the influence degree of the sub-area on the light sensor. The greater the influence coefficient, the greater the influence degree on the light sensor.
[0077] The target offset calibration coefficient refers to the ratio of the light sensing data detected by the light sensor on the sample machine to the light sensing data detected by the light sensor on the reference machine when the sample machine and the reference machine are in the same temperature and the same display content. The target offset calibration coefficient is used to calibrate the reference machine light sensor offset of the reference machine to the sample machine light sensor offset of the sample machine. The ratio of the light sensing data detected by the light sensor on the sample machine to the light sensing data detected by the light sensor on the reference machine is regarded as the light sensing data detected by the light sensor on the sample machine divided by the light sensing data detected by the light sensor on the reference machine. The target offset calibration coefficient and the target light sensing calibration coefficient are both the ratio of the light sensing data detected by the light sensor on the sample machine to the light sensing data detected by the light sensor on the reference machine. The difference is that the target offset calibration coefficient is the ratio of the light sensing data when the sample machine and the reference machine are in the same display content, backlight level and temperature, while the target light sensing calibration coefficient is the ratio of the light sensing data when the sample machine and the reference machine are in the same display content and backlight level.
[0078] The target offset calibration coefficient is obtained through the following sub-steps:
[0079] Sub-step (1), from a plurality of preset display content corresponding change curves, a target change curve corresponding to the display content of the sample machine is determined. The change curve is used to represent the relationship between temperature and offset calibration coefficient.
[0080] In the determination of the change curve corresponding to the plurality of display contents, for the change curve corresponding to each of the plurality of preset display contents, the first light sense temperature change curve when the sample machine displays the preset display content and the second light sense temperature change curve when the reference machine displays the same preset display content can be determined; the light sense data at the same temperature in the first light sense temperature change curve and the second light sense temperature change curve are divided to obtain the change curve corresponding to the preset display content. The first light sense temperature change curve is used to represent the relationship between temperature and light sense data detected by the light sense on the sample machine, and the second light sense temperature change curve is used to represent the relationship between temperature and light sense data detected by the light sense on the reference machine.
[0081] The preset display content can include a red graph, a green graph, a blue graph and a white graph, that is, any one of the red graph, the green graph, the blue graph and the white graph is displayed in a specific area of the screen.
[0082] Taking the red graph as an example, in the determination of the change curve corresponding to the red graph, the sample machine is placed in the predetermined brightness of the ambient light, the specific area of the sample machine is controlled to display the red graph, and then the sample machine is placed at different temperatures of 10℃, 20℃, 30℃, 40℃, etc., and the light sense data read by the light sense on the sample machine at different temperatures is recorded, and finally the first light sense temperature change curve as shown in Figure 2 Figure 2 The abscissa of the first light sense temperature change curve in Figure 2 is temperature, and the ordinate is the light sense data read by the light sense on the sample machine at the temperature. Figure 3 The sample machine light sense data in Figure 3 refers to the light sense data detected by the light sense on the sample machine; the reference machine is placed in the same predetermined brightness of the ambient light, and the specific area of the reference machine is controlled to display the red graph, and then the reference machine is placed at different temperatures of 10℃, 20℃, 30℃, 40℃, etc., and the light sense data read by the light sense on the reference machine at different temperatures is recorded, and finally the second light sense temperature change curve as shown in Figure 3 The abscissa of the second light sense temperature change curve in
[0083] is temperature, and the ordinate is the light sense data read by the light sense on the reference machine at the temperature. Figure 2 The reference machine light sense data in Figure 3 refers to the light sense data detected by the light sense on the reference machine. Figure 4 The red graph corresponds to the change curve. It can be understood that the first light sensing temperature change curve and the second light sensing temperature change curve are the same temperature, and the light sensing data detected by the light sensing of the sample machine is divided by the light sensing data detected by the light sensing of the reference machine. The obtained offset calibration coefficient corresponding to the temperature. Similarly, the change curves corresponding to the remaining green graph, blue graph and white graph can also be obtained in this way, and will not be described here.
[0084] When controlling the temperature change of the reference machine or the sample machine, the reference machine or the sample machine can be placed in a temperature box to control the temperature change in the temperature box, thereby controlling the temperature change of the reference machine or the sample machine. The reference machine or the sample machine can also run a temperature rising program inside to change the temperature of the reference machine and the sample machine.
[0085] The target change curve corresponding to the display content currently displayed by the sample machine can be determined from a plurality of change curves corresponding to a plurality of preset display contents. Since the display content currently displayed by the sample machine can not be exactly the same as the preset display contents such as the red graph, the green graph, the blue graph and the white graph, the change curve of the preset display content closest to the display content currently displayed by the sample machine is determined from the preset display contents such as the red graph, the green graph, the blue graph and the white graph as the target change curve corresponding to the display content currently displayed by the sample machine.
[0086] In determining the preset display content closest to the display content currently displayed by the sample machine, the RGB value of the specific region can be determined according to the size information of the specific region and the pixel point information of the specific region. The maximum value, the minimum value and the first difference value between the maximum value and the minimum value in the RGB value are determined. If the R value is equal to the maximum value, the H value is determined according to the first difference value and the second difference value of the G value minus the B value; if the G value is equal to the maximum value, the H value is determined according to the first difference value and the second difference value of the B value minus the R value; if the B value is equal to the maximum value, the H value is determined according to the first difference value and the third difference value of the R value minus the G value; finally, according to the interval where the H value is located, the preset display content closest to the display content currently displayed by the sample machine is screened out from a plurality of preset display contents.
[0087] For example, the size information of the specific region can be calculated by the following formula:
[0088]
[0089]
[0090]
[0091] Wherein, RGB represents the picture information of the specific region, L represents the length of the specific region, and W represents the width of the specific region.
[0092] The maximum and minimum values in the RGB value are determined by the following formula:
[0093] max = max(R, G, B)
[0094] min = min(R, G, B)
[0095] The H value is calculated by the following formula:
[0096]
[0097] After obtaining the H value, if the H value is in the first preset interval [min_Red_H, max_Red_H], it is determined that the display content currently displayed by the prototype is closest to the preset display content of the red graph, and the change curve corresponding to the red graph is taken as the target change curve corresponding to the display content currently displayed by the prototype; if the H value is in the second preset interval [min_Green_H, max_Green_H], it is determined that the display content currently displayed by the prototype is closest to the preset display content of the green graph, and the change curve corresponding to the green graph is taken as the target change curve corresponding to the display content currently displayed by the prototype; if the H value is in the third preset interval [min_Blue_H, max_Blue_H], it is determined that the display content currently displayed by the prototype is closest to the preset display content of the blue graph, and the change curve corresponding to the blue graph is taken as the target change curve corresponding to the display content currently displayed by the prototype; if the H value is not in any one of the first, second and third preset intervals, it is determined that the display content currently displayed by the prototype is closest to the preset display content of the white graph.
[0098] It can be understood that the R value represents the red value, the G value represents the green value, and the B value represents the blue value; the H value is the H value in HSV, representing the hue, which can be identified by color names such as red, orange, green, etc., and can also be measured by an angle from -180° to 180°, or from -360° to 360°.
[0099] The sub-step (2) screens out a target offset calibration coefficient corresponding to the prototype temperature from a plurality of offset calibration coefficients corresponding to temperatures in the target change curve; the offset calibration coefficient is a ratio of light sensing data detected by a light sensor on the prototype to light sensing data detected by a light sensor on the reference machine when the prototype and the reference machine are at the same temperature and display content.
[0100] The change curve corresponding to each different preset display content is different, and after it is determined that the display content currently displayed by the prototype is closest to which preset display content, the target change curve corresponding to the preset display content can be obtained, and the target change curve has a plurality of temperatures and a plurality of offset calibration coefficients corresponding to the temperatures.
[0101] In determining the target offset calibration coefficient corresponding to the prototype temperature, the offset calibration coefficient corresponding to the prototype temperature among the multiple temperatures of the target variation curve can be taken as the target offset calibration coefficient.
[0102] For example, as shown in FIG. 1, if the prototype temperature of the prototype is currently 10℃, the offset calibration coefficient 0.5 corresponding to 10℃ is taken as the target offset calibration coefficient. Figure 4
[0103] In step S22, the reference machine light sense offset of the reference machine at the prototype temperature is calibrated to the prototype light sense offset of the prototype by using the target offset calibration coefficient.
[0104] The reference machine light sense offset can be multiplied by the target offset calibration coefficient to obtain the prototype light sense offset, that is, the product between the reference machine light sense offset and the target offset calibration coefficient is the prototype light sense offset.
[0105] The reference machine light sense offset is the difference between the first light sense data and the second light sense data, the first light sense data being the light sense data detected by the light sensor on the reference machine at the current temperature, and the second light sense data being the light sense data detected by the light sensor on the reference machine at the reference temperature. The prototype light sense offset is the difference between the third light sense data and the fourth light sense data, the third light sense data being the light sense data detected by the light sensor on the prototype at the current temperature, and the fourth light sense data being the light sense data detected by the light sensor on the prototype at the reference temperature.
[0106] In determining the multiple reference machine light sense offsets, the first light sense data detected by the light sensor on the reference machine at the current temperature can be subtracted from the second light sense data detected by the light sensor on the reference machine at the reference temperature to obtain the reference machine light sense offset. For example, if the reference temperature is 0℃, the first light sense data detected by the light sensor on the reference machine at 0℃ is 15; the second light sense data detected by the light sensor on the reference machine at the current temperature 10℃ is 21, then the reference machine light sense offset of the reference machine at 10℃ is equal to 6, which is the second light sense data 21 minus the first light sense data 15; the second light sense data detected by the light sensor on the reference machine at the current temperature 20℃ is 27, then the reference machine light sense offset of the reference machine at 20℃ is equal to 12, which is the second light sense data 27 minus the first light sense data 15, and the subsequent calculation can obtain the reference machine light sense offsets of the reference machine at different reference machine temperatures as shown in Table 1. The reference temperature of 0℃ is an example, and the reference temperature can be 30℃ in general, and can also be set to 31℃ and other temperatures, which are not limited.
[0107] Reference machine temperature Reference machine light sense offset 10 6 20 12
[0108] Table 1
[0109] If the target reference machine temperature consistent with the sample machine temperature exists in the plurality of reference machine temperatures of the reference machine, then the reference machine light sensing offset corresponding to the target reference machine temperature is multiplied by the target offset calibration coefficient to obtain the sample machine light sensing offset.
[0110] For example, referring to Table 1, if the sample machine temperature is currently 20℃, then 20℃ can be found from the plurality of reference machine temperatures of the reference machine, and the reference machine light sensing offset 12 corresponding to 20℃ is multiplied by the target offset calibration coefficient to obtain the sample machine light sensing offset.
[0111] If the target reference machine temperature consistent with the sample machine temperature does not exist in the plurality of reference machine temperatures of the reference machine, then the reference machine light sensing offset of the reference machine at the sample machine temperature is obtained by interpolation according to the plurality of reference machine temperatures of the reference machine and the reference machine light sensing offset at the plurality of reference machine temperatures, and the interpolated reference machine light sensing offset is multiplied by the target offset calibration coefficient to obtain the sample machine light sensing offset.
[0112] For example, referring to Table 1, if the sample machine temperature is currently 15℃, and there is no target reference machine temperature consistent with the sample machine temperature in the plurality of reference machine temperatures shown in Table 1, then the reference machine light sensing offset of 6 corresponding to the reference machine temperature of 10℃, 20℃ and 10℃, and the reference machine light sensing offset of 12 corresponding to the reference machine temperature of 20℃ can be used to interpolate to obtain the reference machine light sensing offset of 9 at 15℃.
[0113] The reason for calibrating the reference machine light sensing offset with the target light sensing calibration coefficient to obtain the sample machine light sensing offset is that the product quality of the sample machine is lower than that of the reference machine, so the data collected by the light sensor on the sample machine is relatively less reliable than that of the reference machine. If the light sensing data collected by the light sensor on the sample machine is directly used to obtain the sample machine light sensing offset, the accuracy is also relatively low. Therefore, the reference machine with higher quality can be used, and the accuracy of the light sensing data collected by the light sensor on the reference machine is higher, so the reference machine light sensing offset obtained is also higher. Multiplying the reference machine light sensing offset by the target light sensing calibration coefficient can obtain the sample machine light sensing offset with higher accuracy.
[0114] In step S23, the sample machine light sensing offset is used to correct the sample machine screen light leakage amount to obtain the target screen light leakage amount.
[0115] The sample machine light sensing offset can be used to correct the sample machine screen light leakage amount obtained by the light leakage amount prediction model to obtain the target screen light leakage amount, including: subtracting or adding the sample machine light sensing offset from the sample machine screen light leakage amount to obtain the target screen light leakage amount.
[0116] For example, when the light leakage amount of the sample screen is obtained by the light leakage amount prediction model, the light leakage amount prediction model always obtains the light leakage amount of the sample screen as 1 at the reference temperature of 0°C. However, in fact, the light leakage amount of the sample screen will change with the temperature. For example, when the temperature of the sample is 10°C, the light leakage amount of the sample screen is 4; and when the temperature of the sample is 20°C, the light leakage amount of the sample screen is 7. Thus, the light leakage amount of the sample screen at the temperature of 10°C has a sample light sense offset of 3 from the light leakage amount of the sample screen at the reference temperature of 0°C, that is, the light leakage amount of the sample screen obtained by the light leakage amount prediction model has a sample light sense offset of 3 from the actual light leakage amount of the sample screen. At this time, the light leakage amount of the sample screen 1 and the sample light sense offset 3 can be superimposed to obtain the corrected target screen light leakage amount 4, so that the target screen light leakage amount obtained is the real and accurate light leakage amount of the sample screen considering the temperature change factor.
[0117] In step S24, the ambient light amount is obtained according to the actual light sense data and the target screen light leakage amount.
[0118] The target screen light leakage amount is the screen light leakage amount obtained by correcting the light leakage amount of the sample screen by the sample light sense offset.
[0119] The actual light sense data is the light sense data actually detected by the light sense on the sample under the current environment, which is affected by the ambient light and the screen light. Therefore, the actual light sense data can be subtracted by the target screen light leakage amount to obtain the actual ambient light amount. The actual ambient light amount is the difference between the actual light sense data and the target screen light leakage amount.
[0120] By the above technical solution, the sample light sense offset can be obtained, and the sample screen light leakage amount is predicted by using the sample light sense offset, so that the target screen light leakage amount is obtained. In this process, although the light leakage amount prediction model obtains the light leakage amount of the sample screen by using the data at the reference temperature, it does not consider that the temperature change from the reference temperature to the current temperature will cause the light leakage amount of the sample screen to deviate. However, when the light leakage amount of the sample screen is corrected by using the sample light sense offset, since the sample light sense offset is the change amount of the light sense data caused by the temperature change from the reference temperature to the current temperature, the sample light sense offset is added or subtracted on the basis of the obtained light leakage amount of the sample screen, so that the target screen light leakage amount obtained is obtained on the basis of considering the change amount of the light sense data caused by the temperature change, so that the target screen light leakage amount obtained is more real and accurate.
[0121] In a specific embodiment, the light leakage amount of the sample screen can be obtained by the following steps:
[0122] In step S31, the display content of the reference machine and the backlight level of the reference machine are taken as input parameters of the light leakage amount prediction model, to obtain the reference machine screen light leakage amount of the reference machine.
[0123] The display content of the reference machine input into the light leakage amount prediction model is the same as the current display content of the prototype, and the backlight level of the reference machine input into the light leakage amount prediction model is the same as the current backlight level of the prototype.
[0124] The backlight level is the level of the screen backlight brightness of the reference machine or the prototype, which determines the brightness level of the screen. The backlight is the light source of the display brightness, and the light source irradiates the back of the screen to generate display content such as images through the control of the screen.
[0125] In the process of obtaining the prototype screen light leakage amount of the prototype, the screen display of the reference machine can be first set to the same display content as the prototype, and the backlight level of the reference machine is the same as that of the prototype. Then, the reference machine is placed in a dark environment, and the light sensing on the reference machine is detected to obtain the reference machine screen light leakage amount. Then, the target light sensing calibration coefficient is used to calibrate the reference machine screen light leakage amount to the prototype screen light leakage amount. It can be understood that, since the reference machine is located in a dark environment, the light sensing data obtained by the light sensing on the reference machine does not include the amount of ambient light, and the detected light sensing data is the reference machine screen light leakage amount.
[0126] The light leakage amount prediction model can be trained in the following manner: different screen content and backlight levels of the reference machine are taken as training samples to train an initial model; the network parameters of the initial model are modified according to the loss function of the initial model until the error between the reference machine screen light leakage amount output by the initial model and the actual reference machine screen light leakage amount satisfies a convergence condition; and the initial model when the error satisfies the convergence condition is taken as the light leakage amount prediction model.
[0127] The loss function can be mean absolute error or mean square error, etc. The loss function is used to modify the weight coefficients and bias parameters of the initial model and other network parameters until the error between the reference machine screen light leakage amount output by the initial model and the actual measured reference machine screen light leakage amount satisfies a convergence condition, so as to obtain the light leakage amount prediction model.
[0128] It can be understood that, after the light leakage amount prediction model is trained, the light leakage amount prediction model can be used to predict the reference machine screen light leakage amount in the future, and the initial model does not need to be trained every time the reference machine screen light leakage amount is predicted.
[0129] In step S32, the target light sensing calibration coefficient is used to map the reference machine screen light leakage amount to the prototype, to obtain the prototype screen light leakage amount.
[0130] The target light-sensing calibration coefficient is the ratio of the light-sensing data detected by the light sensor on the sample machine to the light-sensing data detected by the light sensor on the reference machine under the same backlight level and display content of the sample machine and the reference machine. The target light-sensing calibration coefficient is the ratio of the light-sensing data detected by the light sensor on the sample machine to the light-sensing data detected by the light sensor on the reference machine.
[0131] Referring to Figure 5 As shown in the figure, the target light-sensing calibration coefficient corresponding to the display content and the backlight level of the sample machine can be determined from a plurality of light-sensing calibration coefficients. The product of the screen light leakage of the reference machine and the target light-sensing calibration coefficient is used as the screen light leakage of the sample machine.
[0132]
[0133] Table 2
[0134] For example, as shown in Table 2, the sample machine and the reference machine are placed in the same dark environment, the display content of the sample machine and the reference machine is red, and the backlight level is A level. The light-sensing data of the sample machine is 6, and the light-sensing data of the reference machine is 12. The light-sensing calibration coefficient corresponding to the red display content and the A level backlight level is 1 / 2. The sample machine and the reference machine are placed in the same dark environment, the display content of the sample machine and the reference machine is green, and the backlight level is B level. The light-sensing data of the sample machine is 3, and the light-sensing data of the reference machine is 9. The light-sensing calibration coefficient corresponding to the green display content and the B level backlight level is 1 / 3. At this time, if the display content of the sample machine is red and the backlight level is B level, the corresponding target light-sensing calibration coefficient is 1 / 2.
[0135] The backlight level and the display content can be set as multiple groups to obtain the light-sensing data of the reference machine and the light-sensing data of the sample machine under multiple backlight levels, and the light-sensing data of the reference machine and the light-sensing data of the sample machine under multiple display contents. The light-sensing data of the reference machine and the light-sensing data of the sample machine under the same backlight level and display content are filtered to obtain the light-sensing calibration coefficient corresponding to the backlight level and the display content.
[0136] Through the above technical solution, the screen light leakage of the sample machine can be obtained by calibrating the screen light leakage of the reference machine using the target light-sensing calibration coefficient. In this process, since the product quality of the reference machine is better, the accuracy of the screen light leakage of the reference machine output by the light leakage detection model based on the display content and the backlight level of the reference machine is higher, and the screen light leakage of the sample machine obtained based on the screen light leakage of the reference machine with higher accuracy is also more accurate.
[0137] Figure 6 is a block diagram of a light-sensing data compensation device according to an example embodiment. Referring to Figure 6The light-sensing data compensation device 600 comprises a prediction module 610 and an ambient light quantity calculation module 620.
[0138] The prediction module 610 is configured to take the backlight level of the reference machine and the display content as input parameters of a leakage light quantity prediction model, to obtain the prototype screen leakage light quantity of the prototype machine.
[0139] The ambient light quantity calculation module 620 is configured to obtain the ambient light quantity in which the prototype machine is currently located according to the actual light-sensing data detected by the light sensor on the prototype machine and the prototype screen leakage light quantity.
[0140] Optionally, the ambient light quantity calculation module 620 comprises:
[0141] A first correction submodule is configured to correct the prototype screen leakage light quantity by using the prototype light-sensing offset quantity, to obtain a target screen leakage light quantity.
[0142] An ambient light quantity calculation submodule is configured to obtain the ambient light quantity according to the actual light-sensing data and the target screen leakage light quantity.
[0143] Optionally, the first calibration submodule comprises:
[0144] A target offset quantity calibration coefficient submodule is configured to determine a target offset quantity calibration coefficient corresponding to the display content of the prototype machine and the prototype temperature of the prototype machine.
[0145] A calibration submodule is configured to calibrate the reference machine light-sensing offset quantity of the reference machine at the prototype temperature to the prototype light-sensing offset quantity of the prototype machine by using the target offset quantity calibration coefficient; the reference machine light-sensing offset quantity is obtained according to first light-sensing data and second light-sensing data, the first light-sensing data is light-sensing data detected by the light sensor on the reference machine at a current temperature, and the second light-sensing data is light-sensing data detected by the light sensor on the reference machine at a reference temperature.
[0146] A second correction submodule is configured to correct the prototype screen leakage light quantity by using the prototype light-sensing offset quantity, to obtain a target screen leakage light quantity.
[0147] Optionally, the prediction module 610 comprises:
[0148] An input submodule is configured to take the display content of the reference machine and the backlight level of the reference machine as input parameters of the leakage light quantity prediction model, to obtain the reference machine screen leakage light quantity of the reference machine; wherein the display content of the reference machine input into the leakage light quantity prediction model is the same as the display content of the prototype machine, and the backlight level of the reference machine input into the leakage light quantity prediction model is the same as the backlight level of the prototype machine.
[0149] The mapping submodule is configured to map the reference machine screen light leakage amount to the sample machine by using a target light sense calibration coefficient, to obtain the sample machine screen light leakage amount; the target light sense calibration coefficient is obtained according to light sense data detected by a light sense on the sample machine and light sense data detected by a light sense on the reference machine when the sample machine and the reference machine are under the same backlight level and display content.
[0150] Optionally, the mapping submodule comprises:
[0151] The first screening submodule is configured to determine a target light sense calibration coefficient corresponding to the display content and the backlight level of the sample machine from a plurality of light sense calibration coefficients.
[0152] The first calculation submodule is configured to map the reference machine screen light leakage amount to the sample machine by using a target light sense calibration coefficient, to obtain the sample machine screen light leakage amount.
[0153] Optionally, the target offset calibration coefficient submodule comprises:
[0154] The second screening submodule is configured to determine a target change curve corresponding to the display content of the sample machine from a plurality of change curves corresponding to a plurality of preset display contents, the change curve being used to represent the relationship between temperature and offset calibration coefficient.
[0155] The third screening submodule is configured to screen a target offset calibration coefficient corresponding to the temperature of the sample machine from a plurality of offset calibration coefficients corresponding to a plurality of temperatures in the target change curve; the offset calibration coefficient is obtained according to light sense data detected by a light sense on the sample machine and light sense data detected by a light sense on the reference machine when the sample machine and the reference machine are under the same temperature and display content.
[0156] Optionally, the light sense data compensation device 600 comprises:
[0157] The first curve determination module is configured to determine a first light sense temperature change curve when the sample machine displays the preset display content and a second light sense temperature change curve when the reference machine displays the same preset display content, the first light sense temperature change curve being used to represent the relationship between temperature and light sense data detected by a light sense on the sample machine, and the second light sense temperature change curve being used to represent the relationship between temperature and light sense data detected by a light sense on the reference machine.
[0158] The second curve determination module is configured to divide the light sense data at the same temperature in the first light sense temperature change curve and the second light sense temperature change curve to obtain a change curve corresponding to the preset display content.
[0159] Optionally, the calibration submodule comprises:
[0160] The second calculation submodule is configured to take the product between the reference machine light sense offset and the target offset calibration coefficient as the prototype machine light sense offset.
[0161] Optionally, the calibration submodule comprises:
[0162] The interpolation submodule is configured to interpolate the reference machine light sense offset of the reference machine at the prototype machine temperature according to a plurality of reference machine temperatures at which the reference machine is located and the reference machine light sense offset at the plurality of reference machine temperatures.
[0163] The third calculation submodule is configured to calibrate the reference machine light sense offset of the reference machine at the prototype machine temperature to the prototype machine light sense offset of the prototype machine by using the target offset calibration coefficient.
[0164] Optionally, the ambient light quantity calculation submodule comprises:
[0165] The fourth calculation submodule is configured to take the difference between the actual light sense data and the target screen light leakage quantity as the ambient light quantity.
[0166] Optionally, the light sense data compensation device 600 comprises:
[0167] The training module is configured to train an initial model by using different screen contents and backlight levels of the reference machine as training samples;
[0168] The iteration module is configured to correct network parameters of the initial model according to a loss function of the initial model until an error between the screen light leakage quantity of the reference machine output by the initial model and the actual screen light leakage quantity of the reference machine satisfies a convergence condition.
[0169] The light leakage quantity prediction model determination module is configured to take the initial model when the error satisfies the convergence condition as the light leakage quantity prediction model.
[0170] As to the device in the above-mentioned embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method, and will not be described in detail here.
[0171] The present disclosure also provides a computer readable storage medium having stored thereon computer program instructions, which, when executed by a processor, implement the steps of the light sense data compensation method provided by the present disclosure.
[0172] Figure 7is a block diagram of an apparatus 700 for light sensing data compensation according to an exemplary embodiment. The apparatus 700 can be a mobile phone, a computer, a digital broadcast terminal, a message communicator, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0173] Referring to Figure 7 The apparatus 700 can include one or more of the following components: a processing component 702, a memory 704, a power supply component 706, a multimedia component 708, an audio component 710, an input / output (I / O) interface 712, a sensor component 714 and a communication component 716.
[0174] The processing component 702 usually controls overall operations of the apparatus 700, such as operations associated with displaying, making phone calls, data communications, camera operations and recording operations. The processing component 702 can include one or more processors 720 to execute instructions to complete all or a part of steps of the above method for light sensing data compensation. In addition, the processing component 702 can include one or more modules to facilitate interaction between the processing component 702 and other components. For example, the processing component 702 can include a multimedia module to facilitate the interaction between the multimedia component 708 and the processing component 702.
[0175] The memory 704 is configured to store various types of data to support operations of the apparatus 700. Examples of these data include instructions for any applications or methods operating on the apparatus 700, contact data, phonebook data, messages, pictures, videos, etc. The memory 704 can be realized by any type of volatile or nonvolatile storage devices or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0176] The power supply component 706 supplies electrical power for various components of the apparatus 700. The power supply component 706 can include a power supply management system, one or more power supplies, and other components associated with generating, managing and distributing electrical power for the apparatus 700.
[0177] The multimedia component 708 includes a screen providing an output interface between the device 700 and a user. In some embodiments, the screen can include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors for sensing a touch, a slide and a gesture on the touch panel. The touch sensor can not only sense a boundary of a touching or a sliding action, but also detect duration and pressure related to the touching or sliding action. In some embodiments, the multimedia component 708 includes a front camera and / or a rear camera. When the device 700 is in an operation mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front and rear camera can be a fixed optical lens system or have a focal length and optical zooming capability.
[0178] The audio component 710 is configured to output and / or input an audio signal. For example, the audio component 710 includes a microphone (MIC) configured to receive an external audio signal when the device 700 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 704 or transmitted via the communication component 716. In some embodiments, the audio component 710 also includes a speaker for outputting an audio signal.
[0179] The input / output interface 712 provides an interface between the processing component 702 and peripheral interface modules, which can be a keypad, a click wheel, buttons, and the like. The buttons can include, but are not limited to, a home button, a volume button, a start button, and a lock button.
[0180] The sensor component 714 includes one or more sensors for providing status assessments of various aspects of the device 700. For example, the sensor component 714 can detect an open / closed position of the device 700, relative positioning of components, such as a display and a keypad of the device 700, a change in position of the device 700 or a component of the device 700, the presence or absence of user contact with the device 700, the orientation or acceleration / deceleration of the device 700, and a temperature change of the device 700, among a plethora of other examples. The sensor component 714 can include a proximity sensor configured to detect presence of a nearby object without any physical touch. The sensor component 714 can also include a light sensor (e.g., a CMOS or CCD image sensor) configured to work in conjunction with the camera component 708. In some embodiments, the sensor component 714 can further include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0181] The communication component 716 is configured to facilitate wired or wireless communication between the device 700 and other devices. The device 700 can access a wireless network based on a communication standard, such as WiFi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 further includes a Near Field Communication (NFC) module to facilitate close proximity communication. For example, the NFC module can be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technology.
[0182] In an exemplary embodiment, the device 700 can be implemented with one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components, for performing the above-described light-sensing data compensation method.
[0183] In an exemplary embodiment, a non-transitory computer readable storage medium including instructions, such as the memory 704 including instructions, is also provided, which can be executed by the processor 720 of the device 700 to complete the above-described light-sensing data compensation method. For example, the non-transitory computer readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disc, and an optical data storage device, etc.
[0184] In another exemplary embodiment, a computer program product is also provided, which contains a computer program capable of being executed by a programmable device, and the computer program has code portions for executing the above-described light-sensing data compensation method when executed by the programmable device.
[0185] Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the present disclosure. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure following the general principles thereof and including such departures from the present disclosure that come within known
[0186] It should be understood that the present disclosure is not limited to the precise structures described and shown in the drawings, and that various modifications and changes can be made to the embodiments without departing from the scope of the present disclosure. The scope of the present disclosure is limited only by the claims that follow.
Claims
1. A light-sensing data compensation method, characterized in that, The method comprises the following steps: Taking the backlight level and display content of the reference machine as input parameters of a leakage light amount prediction model, a prototype screen leakage light amount of the prototype machine is obtained; According to the actual light sensing data detected by the light sensor on the prototype machine and the prototype screen leakage light amount, the ambient light amount in which the prototype machine currently locates is obtained; The method comprises the following steps: Taking the display content of the reference machine and the backlight level of the reference machine as input parameters of the leakage light amount prediction model, a reference machine screen leakage light amount of the reference machine is obtained; wherein, the display content of the reference machine input into the leakage light amount prediction model is the same as the display content of the prototype machine, and the backlight level of the reference machine input into the leakage light amount prediction model is the same as the backlight level of the prototype machine; The target light sensing calibration coefficient is used to map the reference machine screen leakage light amount to the prototype machine, so as to obtain the prototype screen leakage light amount; the target light sensing calibration coefficient is obtained according to the light sensing data detected by the light sensor on the prototype machine and the light sensing data detected by the light sensor on the reference machine when the prototype machine and the reference machine are in the same backlight level and display content.
2. The method of claim 1, wherein, The method comprises the following steps: The prototype screen leakage light amount is corrected by using the prototype light sensing offset amount, so as to obtain a target screen leakage light amount; According to the actual light sensing data and the target screen leakage light amount, the ambient light amount is obtained; The method comprises the following steps: A target offset calibration coefficient corresponding to the display content of the prototype machine and the prototype temperature of the prototype machine is determined; The reference machine light sensing offset amount at the prototype temperature of the prototype machine is calibrated to the prototype light sensing offset amount of the prototype machine by using the target offset calibration coefficient; the reference machine light sensing offset amount is obtained according to the first light sensing data and the second light sensing data; the first light sensing data is the light sensing data detected by the light sensor on the reference machine at the current temperature, and the second light sensing data is the light sensing data detected by the light sensor on the reference machine at the reference temperature; The prototype screen leakage light amount is corrected by using the prototype light sensing offset amount, so as to obtain a target screen leakage light amount.
3. The method of claim 1, wherein, The method comprises the following steps: From a plurality of light sensing calibration coefficients, a target light sensing calibration coefficient corresponding to the display content of the prototype machine and the backlight level is determined; The target light sensing calibration coefficient is used to map the reference machine screen leakage light amount to the prototype machine, so as to obtain the prototype screen leakage light amount.
4. The method of claim 2, wherein, The method comprises the following steps: From a plurality of preset display content corresponding change curves, a target change curve corresponding to the display content of the prototype machine is determined, and the change curve is used to represent the relationship between the temperature and the offset calibration coefficient; The target light sensing calibration coefficient is used to map the reference machine screen leakage light amount to the prototype machine, so as to obtain the prototype screen leakage light amount. Screening a target offset calibration coefficient corresponding to the temperature of the prototype from offset calibration coefficients corresponding to multiple temperatures in the target variation curve; the offset calibration coefficient is obtained according to light sensing data detected by a light sensor on the prototype and light sensing data detected by a light sensor on the reference machine when the prototype and the reference machine are in the same temperature and display the same content.
5. The method of claim 4, wherein, The method further comprises: determining a first light sensing temperature variation curve when the prototype displays the preset display content and a second light sensing temperature variation curve when the reference machine displays the same preset display content, the first light sensing temperature variation curve being used to represent the relationship between temperature and light sensing data detected by a light sensor on the prototype, and the second light sensing temperature variation curve being used to represent the relationship between temperature and light sensing data detected by a light sensor on the reference machine; dividing the light sensing data at the same temperature in the first light sensing temperature variation curve and the second light sensing temperature variation curve to obtain a variation curve corresponding to the preset display content.
6. The method of claim 2, wherein, Calibrating the reference machine light sensing offset of the reference machine at the temperature of the prototype to the prototype light sensing offset of the prototype by using the target offset calibration coefficient, comprising: taking the product between the reference machine light sensing offset and the target offset calibration coefficient as the prototype light sensing offset.
7. The method of claim 2, wherein, Calibrating the reference machine light sensing offset of the reference machine at the temperature of the prototype to the prototype light sensing offset of the prototype by using the target offset calibration coefficient, comprising: interpolating the reference machine light sensing offset of the reference machine at the temperature of the prototype according to multiple reference machine temperatures and reference machine light sensing offsets at the multiple reference machine temperatures; Calibrating the reference machine light sensing offset of the reference machine at the temperature of the prototype to the prototype light sensing offset of the prototype by using the target offset calibration coefficient.
8. The method of claim 2, wherein, Obtaining the ambient light quantity in which the prototype currently locates according to actual light sensing data detected by a light sensor on the prototype and a target screen light leakage quantity, comprising: taking the difference between the actual light sensing data and the target screen light leakage quantity as the ambient light quantity.
9. The method of claim 1, wherein, The method further comprises: training an initial model by taking different screen contents and backlight levels of the reference machine as training samples; correcting network parameters of the initial model according to a loss function of the initial model until the error between the reference machine screen light leakage quantity output by the initial model and the actual reference machine screen light leakage quantity satisfies a convergence condition; taking the initial model when the error satisfies the convergence condition as the light leakage quantity prediction model.
10. A light-sensing data compensation device, characterized by, comprising: a prediction module configured to take the backlight level and display content of the reference machine as input parameters of the light leakage quantity prediction model to obtain a prototype screen light leakage quantity of the prototype; an ambient light quantity calculation module configured to obtain the ambient light quantity in which the prototype currently locates according to actual light sensing data detected by a light sensor on the prototype and the prototype screen light leakage quantity; wherein the prediction module comprises: The input sub-module is configured to take the display content of the reference machine and the backlight level of the reference machine as input parameters of the light leakage amount prediction model, and obtain the reference machine screen light leakage amount of the reference machine; wherein the display content of the reference machine input into the light leakage amount prediction model is the same as the display content of the prototype machine, and the backlight level of the reference machine input into the light leakage amount prediction model is the same as the backlight level of the prototype machine; The mapping sub-module is configured to map the reference machine screen light leakage amount to the prototype machine by using a target light sense calibration coefficient to obtain the prototype machine screen light leakage amount; the target light sense calibration coefficient is obtained according to the light sense data detected by the light sense on the prototype machine and the light sense data detected by the light sense on the reference machine when the prototype machine and the reference machine are in the same backlight level and display content.
11. A terminal, characterized by comprising: The program product comprises: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to: perform the steps of the method of any one of claims 1-9.
12. A computer-readable storage medium having stored thereon computer program instructions, wherein, The program instructions, when executed by the processor, implement the steps of the method of any one of claims 1-9.
Citation Information
Patent Citations
Light sensation calibration method and device, terminal equipment and medium
CN115931120A