Light ray data reporting method, terminal device, apparatus, and storage medium

By setting a preset time threshold in the under-display light sensor, the light data of occlusion events is monitored and reported, which solves the problem of abnormal data caused by occlusion in the under-display light sensor and improves the accuracy of the sensor.

CN116337219BActive Publication Date: 2026-07-10BEIJING XIAOMI MOBILE SOFTWARE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING XIAOMI MOBILE SOFTWARE CO LTD
Filing Date
2021-12-24
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

In existing technologies, under-display light sensors may experience data anomalies due to external obstructions, affecting the sensor's accuracy.

Method used

By monitoring occlusion events and setting a preset time threshold, the system determines and reports the first light data when a press-type occlusion event is detected, and reports the light data when a lift-type occlusion event is detected and after a delay of the preset time threshold.

Benefits of technology

It enables accurate monitoring of occlusion events, avoids data anomalies caused by occlusion of the light sensor, and improves the accuracy of the sensor.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116337219B_ABST
    Figure CN116337219B_ABST
Patent Text Reader

Abstract

This disclosure proposes a method, terminal device, apparatus, and storage medium for reporting light data. The method includes: monitoring occlusion events, including press-type occlusion events and lift-type occlusion events; upon detecting a press-type occlusion event, determining first light data, wherein the time difference between the acquisition time of the first light data and the monitoring time of the press-type occlusion event is greater than a preset time threshold, and the acquisition time is earlier than the monitoring time; and reporting the first light data until a target time point is reached, wherein the target time point is the time point after the detection of the lift-type occlusion event and a delay of the preset time threshold. Therefore, by setting a preset time threshold, occlusion events can be monitored, and a data protection mechanism can be triggered for occlusion events within the preset time threshold, preventing data anomalies caused by occlusion of the light sensor and improving the accuracy of the light sensor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of electronic equipment technology, and in particular to a method for reporting optical data, a terminal device, an apparatus, and a storage medium. Background Technology

[0002] Currently, for full-screen terminal devices, the front-facing light sensor has been moved under the screen using various technologies, becoming an under-display sensor. Light passes through the screen to reach the sensor, enabling its light sensor function. However, light sensors operate in real time, and external human-induced obstruction (such as finger touch clicks) can affect the incident light to the sensor, leading to abnormal data and consequently affecting the sensor's accuracy. Therefore, how to avoid data abnormalities caused by obstruction and improve the accuracy of light sensors has become an urgent problem to be solved. Summary of the Invention

[0003] This disclosure provides a method, terminal device, apparatus, and storage medium for reporting optical data.

[0004] According to a first aspect of the present disclosure, a method for reporting light data is provided. The method includes: monitoring occlusion events, wherein the occlusion events include press-type occlusion events and lift-type occlusion events; when a press-type occlusion event is detected, determining first light data, wherein the time difference between the acquisition time of the first light data and the monitoring time of the press-type occlusion event is greater than a preset time threshold, and the acquisition time is earlier than the monitoring time; and reporting the first light data until a target time point is reached, wherein the target time point is the time point after the lift-type occlusion event is detected and after a delay of the preset time threshold.

[0005] In one embodiment of this disclosure, monitoring an occlusion event includes: acquiring current light data collected by a light sensor at the current time point, and historical light data collected within a preset time period prior to the current time point; and determining whether an occlusion event has been detected based on the current light data and the historical light data.

[0006] In one embodiment of this disclosure, determining whether an occlusion event is detected based on the current light data and the historical light data includes: determining that a press-type occlusion event is detected when the current light data is less than or equal to a first data threshold and the current light data is less than the historical light data; and determining that a lift-type occlusion event is detected when the current light data is greater than or equal to a second data threshold and the current light data is greater than the historical light data, wherein the second data threshold is less than the first data threshold.

[0007] In one embodiment of this disclosure, the method includes: upon reaching the target time point, determining second light data, wherein the time difference between the acquisition time point of the second light data and the target time point is equal to the preset time threshold, and the acquisition time point of the second light data is earlier than the target time point; and reporting the second light data.

[0008] In one embodiment of this disclosure, before monitoring occlusion events, the method includes: determining a first historical time point during a single press within a historical time period, and a second historical time point during which a touch-type occlusion event is detected; determining a preset time threshold based on the first historical time point and the second historical time point during multiple press processes, wherein the occlusion event includes the touch-type occlusion event.

[0009] In one embodiment of this disclosure, determining the preset time threshold based on the first historical time point and the second historical time point during multiple pressing processes includes: for each pressing process, determining the absolute value of the difference between the first historical time point and the second historical time point during the pressing process; and determining the average value of multiple absolute values ​​of the difference as the preset time threshold.

[0010] In one embodiment of this disclosure, the monitoring condition for the touch-type occlusion event is that the current light data is less than the second data threshold; or, the current light data is less than the second data threshold, and the touch reporting point is located within a preset range centered on the location of the light sensor.

[0011] In one embodiment of this disclosure, according to a second aspect of the present disclosure, a terminal device is also provided, including: a controller, and a light sensor connected to the controller; wherein the light sensor performs the light data reporting method described in the first aspect of the present disclosure.

[0012] According to a third aspect of the present disclosure, a light data reporting device is also provided. The device includes: a first monitoring module for monitoring occlusion events, wherein the occlusion events include press-type occlusion events and lift-type occlusion events; a first determining module for determining first light data when the press-type occlusion event is detected, wherein the time difference between the acquisition time of the first light data and the monitoring time of the press-type occlusion event is greater than a preset time threshold, and the acquisition time is earlier than the monitoring time; and a first reporting module for reporting the first light data until a target time point is reached, wherein the target time point is the time point after the lift-type occlusion event is detected and after a delay of the preset time threshold.

[0013] In one embodiment of this disclosure, the monitoring module is specifically used to: acquire current light data collected by the light sensor at the current time point, and historical light data collected within a preset time period before the current time point; and determine whether an occlusion event is detected based on the current light data and the historical light data.

[0014] In one embodiment of this disclosure, the monitoring module is configured to: determine that a press-type occlusion event has been detected when the current light data is less than or equal to a first data threshold and the current light data is less than the historical light data; and determine that a lift-type occlusion event has been detected when the current light data is greater than or equal to a second data threshold and the current light data is greater than the historical light data, wherein the second data threshold is less than the first data threshold.

[0015] In one embodiment of this disclosure, the device includes: a second determining module, configured to determine second light data when the target time point is reached, wherein the time difference between the acquisition time point of the second light data and the target time point is equal to the preset time threshold, and the acquisition time point of the second light data is earlier than the target time point; and a second reporting module, configured to report the second light data.

[0016] In one embodiment of this disclosure, the device includes: a second monitoring module, configured to determine a first historical time point during a single press within a historical time period, during which a press-type occlusion event is detected, and a second historical time point during which a touch-type occlusion event is detected; and a third determining module, configured to determine the preset time threshold based on the first historical time point and the second historical time point during multiple press processes.

[0017] In one embodiment of this disclosure, the third determining module is specifically used to: for each pressing process, determine the absolute value of the difference between the first historical time point and the second historical time point during the pressing process; and determine the average value of multiple absolute values ​​of the difference as the preset time threshold.

[0018] In one embodiment of this disclosure, the monitoring condition for the touch-type occlusion event is that the current light data is less than the second data threshold; or, the current light data is less than the second data threshold, and the touch reporting point is located within a preset range centered on the location of the light sensor.

[0019] According to a fourth aspect of the present disclosure, a computer-readable storage medium is also provided, which, when the instructions in the computer-readable storage medium are executed by a processor of a terminal device, enables the terminal device to perform the optical data reporting method described in the first aspect of the present disclosure.

[0020] According to a fifth aspect of the present disclosure, a computer program product is also provided, including a computer program that, when executed by a processor, implements the light data reporting method described in the first aspect of the present disclosure.

[0021] The technical solutions provided by the embodiments of this disclosure have at least the following beneficial effects:

[0022] The technical solution disclosed herein, when detecting a press-type occlusion event, determines the first light data according to a preset time threshold and reports it until a lift-type occlusion event is detected and the time point is delayed beyond the preset time threshold. Thus, by setting a preset time threshold, occlusion events can be monitored, and a data protection mechanism can be triggered for occlusion events within the preset time threshold, which can prevent the light sensor from causing data abnormalities due to occlusion and improve the accuracy of the light sensor.

[0023] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0024] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.

[0025] Figure 1 This is a flowchart of a light data reporting method according to an embodiment of the present disclosure;

[0026] Figure 2 This is a flowchart of a light data reporting method according to another embodiment of the present disclosure;

[0027] Figure 3 This is a schematic diagram of a press-type occlusion event according to an embodiment of the present disclosure;

[0028] Figure 4 This is a schematic diagram of a lift-up occlusion event according to an embodiment of this disclosure;

[0029] Figure 5 This is a flowchart of a light data reporting method according to another embodiment of the present disclosure;

[0030] Figure 6 This is a timing diagram of the light data reporting method according to an embodiment of the present disclosure;

[0031] Figure 7 This is a flowchart of a light data reporting method according to another embodiment of the present disclosure;

[0032] Figure 8 This is a schematic diagram of a touch-type occlusion event according to an embodiment of the present disclosure;

[0033] Figure 9 This is a schematic diagram of the structure of a terminal device according to an embodiment of the present disclosure;

[0034] Figure 10 This is a schematic diagram of the structure of a light data reporting device according to an embodiment of the present disclosure;

[0035] Figure 11 This is a block diagram illustrating a terminal device according to an exemplary embodiment. Detailed Implementation

[0036] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0037] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0038] Figure 1 This is a flowchart of a light data reporting method according to an embodiment of the present disclosure. It should be noted that the light data reporting method in this embodiment is executed by a light data reporting device, which can be implemented by software and / or hardware. The light data reporting device can be configured in a terminal device, which may include a mobile terminal (such as a mobile phone), a tablet computer, a smart TV, a smart wearable device, an in-vehicle device, etc.

[0039] like Figure 1 As shown, the method includes the following steps:

[0040] Step 101: Monitor occlusion events.

[0041] In this embodiment of the disclosure, a light sensor can collect light data, and then, based on the light data collected by the light sensor, occlusion events can be monitored. It should be noted that occlusion events may include, but are not limited to, press-type occlusion events and lift-type occlusion events.

[0042] Step 102: When a press-type occlusion event is detected, first light data is determined, wherein the time difference between the acquisition time of the first light data and the monitoring time of the press-type occlusion event is greater than a preset time threshold, and the acquisition time is earlier than the monitoring time.

[0043] In this embodiment of the disclosure, occlusion events can be monitored based on the light data currently collected by the sensor and the light data collected in the past, so as to determine whether the detected occlusion event is a press-type occlusion event.

[0044] When the detected occlusion event is a press-type occlusion event, the monitoring time point corresponding to the press-type occlusion event can be determined. The light data collected at the collection time point before the monitoring time point can be used as the first light data. The time difference between the collection time point and the monitoring time point of the press-type occlusion event is greater than a preset time threshold.

[0045] Step 103: Report the first light data until the target time point is reached, where the target time point is the time point after the detection of the lift-type occlusion event and the delay of a preset time threshold.

[0046] Furthermore, in order to reduce the fluctuation of light data when the light sensor is blocked and improve the stability of the light data used by the upper layer, the first light data can be reported until a target time point is reached. The target time point is the time point after a lift-type occlusion event is detected and the lift-type occlusion event remains at a preset time threshold.

[0047] In summary, when a press-type occlusion event is detected, the first light data is determined and reported according to the preset time threshold until a lift-type occlusion event is detected and the time point is delayed beyond the preset time threshold. Thus, by setting the preset time threshold, occlusion events can be monitored, and a data protection mechanism can be triggered for occlusion events within the preset time threshold, which can prevent the light sensor from causing data abnormalities due to occlusion and improve the accuracy of the light sensor.

[0048] In order to accurately detect occlusion events, such as Figure 2 As shown, Figure 2 This is a flowchart of a light data reporting method according to another embodiment of the present disclosure. In this embodiment, the current light data collected by the light sensor and the historical light data collected within a preset time period before the current time point can be used to determine whether an occlusion event has been detected. Figure 2 The illustrated embodiment may include the following steps:

[0049] Step 201: Obtain the current light data collected by the light sensor at the current time point, as well as the historical light data collected within a preset time period before the current time point.

[0050] In this embodiment of the disclosure, the current light data collected by the light sensor at the current time point can be acquired, and historical light data collected within a preset time period prior to the current time point can also be acquired. For example, if the preset time period is 2 seconds, the historical light data can be light data collected within 2 seconds prior to the current time point.

[0051] Step 202: Based on the current light data and historical light data, determine whether an occlusion event has been detected.

[0052] It is important to understand that occlusion events can include: press-type occlusion events, touch-type occlusion events, and lift-type occlusion events. Different occlusion events result in different degrees of occlusion on the light sensor, and the light data collected by the light sensor at the current point in time will also be different.

[0053] As an example, when the current light data is less than or equal to a first data threshold and the current light data is less than the historical light data, a press-type occlusion event is detected; when the current light data is greater than or equal to a second data threshold and the current light data is greater than the historical light data, a lift-type occlusion event is detected.

[0054] For example, such as Figure 3 As shown, the preset time period is 2 seconds. The current time point is based on the finger touching the screen. When the finger hovers above the screen and the distance between the finger and the screen is a set threshold, the light data collected by the light sensor is used as the first data threshold. The light data collected at the current time point is used as the current light data. The light data collected within 2 seconds before the current time point is used as the historical light data. When the current light data is less than the first data threshold and less than the historical light data, that is, when the current light data gradually decreases within the preset time threshold, the occlusion event can be determined as a press-type occlusion event.

[0055] For example, such as Figure 4 As shown, the preset time period is 2 seconds. The light data collected by the light sensor when the finger touches the screen and is about to leave the screen is used as the second data threshold. The light data collected at the current time point is used as the current light data, and the light data collected within 2 seconds before the previous time point is used as the historical light data. When the current light data is greater than or equal to the second data threshold and the current light data is greater than the historical light data, that is, when the current light data gradually decreases within the preset time threshold, the occlusion event can be determined as a lift-up occlusion event.

[0056] Step 203: When a press-type occlusion event is detected, first light data is determined, wherein the time difference between the acquisition time of the first light data and the monitoring time of the press-type occlusion event is greater than a preset time threshold, and the acquisition time is earlier than the monitoring time.

[0057] Step 204: Report the first light data until the target time point is reached, where the target time point is the time point after the detection of the lift-type occlusion event and the delay of a preset time threshold.

[0058] It should be noted that the execution process of steps 203-204 can be referred to the execution process of the above embodiment, and will not be repeated here.

[0059] In summary, by acquiring the current light data collected by the light sensor at the current time point, and the historical light data collected within a preset time period prior to the current time point, it is determined whether an occlusion event has been detected based on the current light data and the historical light data. Therefore, by comparing the current light data collected by the light sensor at the current time point with the historical light data collected within the preset time period, it is possible to accurately determine whether an occlusion event has been detected.

[0060] To improve the sensitivity and accuracy of light sensors, such as Figure 5 As shown, Figure 5 This is a flowchart of a light data reporting method according to another embodiment of the present disclosure. In this embodiment, upon reaching a target time point, a second data light ray is determined, and the second light ray data is reported. Figure 5 The illustrated embodiment may include the following steps:

[0061] Step 501: Monitor occlusion events.

[0062] Step 502: When a press-type occlusion event is detected, first light data is determined, wherein the time difference between the acquisition time of the first light data and the monitoring time of the press-type occlusion event is greater than a preset time threshold, and the acquisition time is earlier than the monitoring time.

[0063] Step 503: Report the first light data until the target time point is reached, wherein the target time point is the time point after a lift-type occlusion event is detected and a preset time threshold is delayed.

[0064] Step 504: When the target time point is reached, determine the second light data, wherein the time difference between the acquisition time point of the second light data and the target time point is equal to a preset time threshold, and the acquisition time point of the second light data is earlier than the target time point.

[0065] To improve the sensitivity of the light sensor, in this embodiment, the target time point is the time point after detecting a lift-type occlusion event and delaying for a preset time threshold. When the target time point is reached, that is, when the occlusion effect is eliminated, the light sensor acquires the second light data. It should be noted that the time difference between the acquisition time point of the second light data and the target time point is equal to the preset time threshold, and the acquisition time point of the second light data is earlier than the target time point.

[0066] Step 505: Report the second ray data.

[0067] Furthermore, the second ray data is reported.

[0068] For example, such as Figure 6 As shown, taking a preset time threshold of 2 seconds as an example, the optical sensor has already collected light data at time t0, but it needs to be delayed until t1 (e.g., 2 seconds) before being transmitted to the upper layer. The light data of the light sensor used by the upper layer is always kept with a 2-second delay. When the light data reporting device detects a touchdown event at time t2, the light sensor keeps the light data data2 (first light data) at the time of the touchdown event until it detects a lift-off event. The lift-off time of the lift-off event remains at the preset time threshold, e.g. Figure 6 If the lift-up time of the lift-up occlusion event during the time interval t3 to t4 is less than the preset time threshold, the finger still has the risk of occluding the light sensor. Therefore, the light sensor will still upload the light data data2. When the time reaches t4 (target time point), the lift-up time of the lift-up occlusion event reaches the preset time threshold, and the new data data4 (second light data) collected by the light sensor will be uploaded.

[0069] It should be noted that the execution process of steps 501-503 can be referred to the execution process of the above embodiment, and will not be repeated here.

[0070] In summary, by determining the second light data when the target time point is reached, wherein the time difference between the acquisition time of the second light data and the target time point is equal to a preset time threshold, and the acquisition time of the second light data is earlier than the target time point, and reporting the second light data, the sensitivity and accuracy of the light sensor are improved by promptly reporting the second light data acquired by the light sensor when the occlusion effect is eliminated.

[0071] To accurately determine the preset time threshold, such as Figure 7 As shown, Figure 7This is a flowchart of a light data reporting method according to another embodiment of the present disclosure. In this embodiment, a preset time threshold can be determined by using a first historical time point and a second historical time point during multiple pressing processes. Figure 7 The illustrated embodiment may include the following steps:

[0072] Step 701: Determine the first historical time point during a single press within the historical time period when a press-type occlusion event was detected, and the second historical time point when a touch-type occlusion event was detected.

[0073] In this embodiment of the disclosure, occlusion events include touch-type occlusion events.

[0074] As an example, the first historical time point can be defined as the point in time during a press-type occlusion event within a historical time period where the distance from the screen is a set threshold, and the second historical time point is the point in time when the screen is touched during a touch-type occlusion event within the historical time period. The touch-type occlusion event can be defined as follows: Figure 8 As shown.

[0075] In this embodiment, a preset time threshold can be determined by collecting data on the pressing and releasing speeds during multiple pressing processes, or by collecting the interval between hovering (first historical time point), pressing, and then lifting and hovering (second historical time point) during the pressing process. Pressing and releasing can be determined using touch reporting positions and light data. During the pressing process, the light data of the light sensor gradually decreases until it reaches its lowest point at the touch reporting position; conversely, the light data reaches its maximum when the sensor is lifted. The time interval between these points can be used as the preset time threshold.

[0076] It should be noted that the monitoring conditions for touch-related occlusion events are: the current light data is less than the second data threshold, or the current light data is less than the second data threshold, and the touch reporting point is located within a preset range centered on the location of the light sensor.

[0077] In other words, if the current light data is detected to be less than the second data threshold, or if the current light data is less than the second data threshold and the touch reporting location is within a preset range centered on the location of the light sensor, the occlusion event can be determined to be a touch-type occlusion event. The touch reporting location can be obtained by communicating with the controller through the light data reporting device.

[0078] Step 702: Determine the preset time threshold based on the first and second historical time points during the multiple pressing processes.

[0079] To improve the accuracy of the preset time threshold, as an example, for each pressing process, the absolute value of the difference between the first historical time point and the second historical time point during the pressing process is determined, and the average value of multiple absolute differences is determined as the preset time threshold.

[0080] In other words, the first historical time point and the second historical time point in each pressing process are compared and the absolute value is taken. Then, the average value of the absolute values ​​of multiple differences is determined, and the average value of the absolute values ​​of multiple differences is used as the preset time threshold.

[0081] Step 703: Monitor occlusion events.

[0082] Step 704: When a press-type occlusion event is detected, first light data is determined, wherein the time difference between the acquisition time of the first light data and the monitoring time of the press-type occlusion event is greater than a preset time threshold, and the acquisition time is earlier than the monitoring time.

[0083] Step 705: Report the first light data until the target time point is reached, wherein the target time point is the time point after the detection of the lift-type occlusion event and the delay of the preset time threshold.

[0084] It should be noted that the execution process of steps 703-705 can be referred to the execution process of the above embodiments, and will not be repeated here.

[0085] In summary, by determining the first historical time point during a single press within a historical time period and the second historical time point during a single touch press, and by determining the first and second historical time points during multiple press processes, a preset time threshold is determined. Therefore, the preset time threshold can be accurately determined by the absolute value of the difference between the first and second historical time points during each press process in multiple press processes.

[0086] The light data reporting method of this disclosure monitors occlusion events. When a press-type occlusion event is detected, first light data is determined. The time difference between the acquisition time of the first light data and the monitoring time of the press-type occlusion event is greater than a preset time threshold, and the acquisition time is earlier than the monitoring time. The first light data is reported until a target time point is reached, where the target time point is the time point after a lift-type occlusion event is detected and a delay of the preset time threshold is reached. Therefore, by setting a preset time threshold, occlusion events can be monitored, and a data protection mechanism can be triggered for occlusion events within the preset time threshold, preventing sensor data anomalies due to occlusion and improving sensor accuracy.

[0087] Figure 9This is a schematic diagram of the structure of a terminal device according to an embodiment of the present disclosure.

[0088] like Figure 9 As shown, the terminal device 900 includes a controller 910 and a light sensor 920.

[0089] The controller 910 is connected to the light sensor 920, and the light sensor 920 executes the light data reporting method described in the above embodiment.

[0090] The terminal device of this disclosure embodiment has a light sensor that can execute the light data reporting method described in the above embodiment. When a press-type occlusion event is detected, the terminal device can determine the first light data according to a preset time threshold and report it until a lift-type occlusion event is detected and the time point is delayed after the preset time threshold. Thus, by setting the preset time threshold, the occlusion event can be monitored, and a data protection mechanism can be triggered for occlusion events within the preset time threshold, which can prevent the light sensor from causing data abnormalities due to occlusion and improve the accuracy of the light sensor.

[0091] Figure 10 This is a schematic diagram of the structure of a light data reporting device according to an embodiment of the present disclosure.

[0092] like Figure 10 As shown, the optical data reporting device 1000 includes: a first monitoring module 1010, a first determining module 1020, and a first reporting module 1030.

[0093] The system includes a first monitoring module 1010 for monitoring occlusion events, including press-type occlusion events and lift-type occlusion events; a first determining module 1020 for determining first light data when a press-type occlusion event is detected, wherein the time difference between the acquisition time of the first light data and the monitoring time of the press-type occlusion event is greater than a preset time threshold, and the acquisition time is earlier than the monitoring time; and a first reporting module 1030 for reporting the first light data until a target time point is reached, wherein the target time point is the time point after a lift-type occlusion event is detected and a preset time threshold is delayed.

[0094] As one possible implementation of this disclosure, the first monitoring module 1010 is specifically used to: acquire the current light data collected by the light sensor at the current time point, and the historical light data collected within a preset time period before the current time point; and determine whether an occlusion event is detected based on the current light data and the historical light data.

[0095] As one possible implementation of this disclosure, the first monitoring module 1010 is further configured to: determine that a press-type occlusion event has been detected when the current light data is less than or equal to a first data threshold and the current light data is less than the historical light data; and determine that a lift-type occlusion event has been detected when the current light data is greater than or equal to a second data threshold and the current light data is greater than the historical light data, wherein the second data threshold is less than the first data threshold.

[0096] As one possible implementation of this disclosure, the light data reporting device includes: a second determining module, configured to determine second light data when a target time point is reached, wherein the time difference between the acquisition time point of the second light data and the target time point is equal to a preset time threshold, and the acquisition time point of the second light data is earlier than the target time point; and a second reporting module, configured to report the second light data.

[0097] As one possible implementation of this disclosure, the light data reporting device includes: a second monitoring module, used to determine a first historical time point during a single press within a historical time period when a press-type occlusion event is detected, and a second historical time point when a touch-type occlusion event is detected, wherein the occlusion event includes a touch-type occlusion event; and a third determining module, used to determine a preset time threshold based on the first historical time point and the second historical time point during multiple presses.

[0098] As one possible implementation of this disclosure, the third determining module is specifically used for: determining the absolute value of the difference between the first historical time point and the second historical time point during each pressing process; and determining the average value of multiple absolute values ​​of the difference as the preset time threshold.

[0099] As one possible implementation of this disclosure, the monitoring condition for touch-type occlusion events is that the current light data is less than the second data threshold; or, the current light data is less than the second data threshold, and the touch reporting point is located within a preset range centered on the location of the light sensor.

[0100] The light data reporting device of this disclosure monitors occlusion events. When a press-type occlusion event is detected, it determines first light data. The time difference between the acquisition time of the first light data and the monitoring time of the press-type occlusion event is greater than a preset time threshold, and the acquisition time is earlier than the monitoring time. The first light data is reported until a target time point is reached, where the target time point is the time point after a lift-type occlusion event is detected and a delay of the preset time threshold has elapsed. Therefore, by setting a preset time threshold, occlusion events can be monitored, and a data protection mechanism can be triggered for occlusion events within the preset time threshold, preventing sensor data anomalies due to occlusion and improving sensor accuracy.

[0101] To implement the above embodiments, this disclosure also proposes a computer-readable storage medium.

[0102] When the instructions in the storage medium are executed by the processor of the terminal device, the terminal device is able to execute the optical data reporting method described in the above embodiments.

[0103] To implement the above embodiments, this disclosure also provides a computer program product.

[0104] A computer program product includes a computer program that, when executed by a processor, implements the light data reporting method described in the above embodiments.

[0105] Figure 11 This is a block diagram illustrating a terminal device according to an exemplary embodiment. For example... Figure 11 As shown, the terminal device 1100 includes:

[0106] The memory 1110 and processor 1120 are connected by a bus 1130, which connects different components (including the memory 1110 and the processor 1120). The memory 1110 stores a computer program, and when the processor 1120 executes the program, it implements the optical data reporting method described in this embodiment of the present disclosure.

[0107] Bus 1130 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0108] Terminal device 1100 typically includes various electronically readable media. These media can be any available media that can be accessed by terminal device 1100, including volatile and non-volatile media, removable and non-removable media.

[0109] Memory 1110 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 1140 and / or cache memory 1150. Terminal device 1100 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 1160 may be used to read and write non-removable, non-volatile magnetic media (…). Figure 11 Not shown; usually referred to as a "hard drive"). Although Figure 11 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 1130 via one or more data media interfaces. Memory 1110 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this disclosure.

[0110] A program / utility 1180 having a set (at least one) of program modules 1170 may be stored, for example, in memory 1110. Such program modules 1170 include, but are not limited to, an operating system, one or more applications, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 1170 typically perform the functions and / or methods described in the embodiments of this disclosure.

[0111] Terminal device 1100 can also communicate with one or more external devices 1190 (e.g., keyboard, pointing device, display 1191, etc.), and with one or more devices that enable a user to interact with the electronic device 1100, and / or with any device that enables the terminal device 1100 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 1192. Furthermore, terminal device 1100 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 1193. Figure 11As shown, network adapter 1193 communicates with other modules of terminal device 1100 via bus 1130. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with terminal device 1100, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0112] The processor 1120 performs various functional applications and data processing by running programs stored in memory 1110.

[0113] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0114] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0115] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of preferred embodiments of this disclosure includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of this disclosure pertain.

[0116] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0117] It should be understood that various parts of this disclosure can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0118] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0119] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0120] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of the present disclosure have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present disclosure. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present disclosure.

Claims

1. A method for reporting optical data, characterized in that, The method includes: Monitor occlusion events, including press-type occlusion events and lift-type occlusion events; When the press-type occlusion event is detected, first light data is determined, wherein the time difference between the acquisition time of the first light data and the monitoring time of the press-type occlusion event is greater than a preset time threshold, and the acquisition time is earlier than the monitoring time. The first light data is reported until the target time point is reached, wherein the target time point is the time point after the detected lift-type occlusion event and the delay is the preset time threshold.

2. The method according to claim 1, characterized in that, The monitored occlusion events include: Acquire the current light data collected by the light sensor at the current time point, as well as the historical light data collected within a preset time period before the current time point; Based on the current light data and the historical light data, determine whether an occlusion event has been detected.

3. The method according to claim 2, characterized in that, The step of determining whether an occlusion event has been detected based on the current light data and the historical light data includes: When the current light data is less than or equal to a first data threshold, and the current light data is less than the historical light data, it is determined that the press-type occlusion event has been detected. When the current light data is greater than or equal to the second data threshold, and the current light data is greater than the historical light data, it is determined that the lift-up occlusion event has been detected, wherein the second data threshold is less than the first data threshold.

4. The method according to claim 1, characterized in that, The method includes: When the target time point is reached, second light data is determined, wherein the time difference between the acquisition time point of the second light data and the target time point is equal to the preset time threshold, and the acquisition time point of the second light data is earlier than the target time point; Report the second ray data.

5. The method according to claim 1, characterized in that, Prior to monitoring occlusion events, the method includes: During a single press within a historical time period, a first historical time point is identified where a press-type occlusion event is detected, and a second historical time point is identified where a touch-type occlusion event is detected, wherein the occlusion event includes the touch-type occlusion event; The preset time threshold is determined based on the first historical time point and the second historical time point during multiple pressing processes.

6. The method according to claim 5, characterized in that, The step of determining the preset time threshold based on the first historical time point and the second historical time point during multiple pressing processes includes: For each pressing process, determine the absolute value of the difference between the first historical time point and the second historical time point during the pressing process; The average of the absolute values ​​of the multiple differences is determined as the preset time threshold.

7. The method according to claim 5, characterized in that, The monitoring conditions for the touch-related occlusion event are as follows: The current light data is less than the second data threshold; or, The current light data is less than the second data threshold, and the touch reporting point is located within a preset range centered on the location of the light sensor.

8. A terminal device, characterized in that, include: A controller, and a light sensor connected to the controller; The light sensor performs the light data reporting method as described in any one of claims 1 to 7.

9. A light data reporting device, characterized in that, The device includes: The first monitoring module is used to monitor occlusion events, wherein the occlusion events include press-type occlusion events and lift-type occlusion events; The first determining module is used to determine first light data when the pressing-type occlusion event is detected, wherein the time difference between the acquisition time of the first light data and the monitoring time of the pressing-type occlusion event is greater than a preset time threshold, and the acquisition time is earlier than the monitoring time. The first reporting module is used to report the first light data until a target time point is reached, wherein the target time point is the time point after the detection of the lift-type occlusion event and the delay of the preset time threshold.

10. The apparatus according to claim 9, characterized in that, The first monitoring module is specifically used for: Acquire the current light data collected by the light sensor at the current time point, as well as the historical light data collected within a preset time period before the current time point; Based on the current light data and the historical light data, determine whether an occlusion event has been detected.

11. The apparatus according to claim 10, characterized in that, The first monitoring module is used for: When the current light data is less than or equal to a first data threshold, and the current light data is less than the historical light data, it is determined that the press-type occlusion event has been detected. When the current light data is greater than or equal to the second data threshold, and the current light data is greater than the historical light data, it is determined that the lift-up occlusion event has been detected, wherein the second data threshold is less than the first data threshold.

12. The apparatus according to claim 9, characterized in that, The device includes: The second determining module is used to determine the second light data when the target time point is reached, wherein the time difference between the acquisition time point of the second light data and the target time point is equal to the preset time threshold, and the acquisition time point of the second light data is earlier than the target time point. The second reporting module is used to report the second light data.

13. The apparatus according to claim 9, characterized in that, The device includes: The second monitoring module is used to determine the first historical time point during a single press within a historical time period when a press-type occlusion event is detected, and the second historical time point when a touch-type occlusion event is detected, wherein the occlusion event includes the touch-type occlusion event. The third determining module is used to determine the preset time threshold based on the first historical time point and the second historical time point during multiple pressing processes.

14. The apparatus according to claim 13, characterized in that, The third determining module is specifically used for: For each pressing process, determine the absolute value of the difference between the first historical time point and the second historical time point during the pressing process; The average of the absolute values ​​of the multiple differences is determined as the preset time threshold.

15. The apparatus according to claim 13, characterized in that, The monitoring conditions for the touch-related occlusion event are as follows: The current light data is less than the second data threshold; or, The current light data is less than the second data threshold, and the touch reporting point is located within a preset range centered on the location of the light sensor.

16. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the terminal device, the terminal device is able to perform the optical data reporting method as described in any one of claims 1 to 7.

17. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the optical data reporting method as described in any one of claims 1 to 7.