Data processing method and device

By using the processing unit in the photo sensor to process the time slot count data, the problem of the signal-to-noise ratio dropping due to the maximum value of the photo sensor count data is solved, and a more accurate and convenient sensing signal is achieved.

CN120143090APending Publication Date: 2025-06-13SILICON OPTRONICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311713518.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-13
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

The time slot count data of the photo sensor is easily reached to the maximum value, resulting in a decrease in the signal-to-noise ratio and inaccurate sensing signals.

Method used

The first time slot count data of the light sensor is read from the storage unit through the processing unit, and an overflow warning signal is generated based on the data and the preset value. Then, the second time slot count data is read, if it is greater than or equal to the first data, the second preset value is subtracted to generate the third time slot count data, or the second data is retained.

Benefits of technology

It effectively avoids the problem of the maximum time slot counting data of the photo sensor, improves the signal-to-noise ratio, and enhances the accuracy and convenience of the sensing signal.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120143090A_ABST
    Figure CN120143090A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method and device, and the data processing method is suitable for a light sensor and comprises the following steps. Reading a plurality of first time slot counting data corresponding to the light sensors from the storage unit through the processing unit; and generating an overflow warning signal through the processing unit according to the first time slot counting data and a first preset value. And reading a plurality of second time slot counting data through the processing unit, the second time slot counting data being greater than or equal to the first time slot counting data, and the second time slot counting data being generated by the light sensor performing sensing operation according to the first time slot data. And subtracting a second preset value from the second time slot counting data by the processing unit according to the overflow warning signal to generate a plurality of third time slot counting data, or retaining the second time slot counting data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a processing method and apparatus, and more particularly to a data processing method and apparatus applicable to a photosensor. Background Art

[0002] Generally, a distance sensor can be used to sense a target object with a photosensor (e.g., a single-photon avalanche diode (SPAD) sensor). When light irradiates into the photosensor and triggers the photosensor, an avalanche effect will occur in the sensor, causing the output signal of the photosensor to flip, and the photosensor will accumulate the value of the time slot corresponding to the time when the signal flips (e.g., add "1"). However, when the accumulated value reaches the maximum value, the accumulated value cannot continue to count, resulting in a decrease in the signal-to-noise ratio of the photosensor and inaccurate sensing signals, thus reducing the convenience of use.

[0003] Therefore, how to effectively avoid the situation where the value of the time slot count data corresponding to the photosensor reaches the maximum value and cannot continue to count, resulting in a decrease in the signal-to-noise ratio of the photosensor and inaccurate sensing signals, is an important issue at present. Summary of the Invention

[0004] The present invention provides a data processing method and apparatus to avoid the situation where the value of the time slot count data corresponding to the photosensor reaches the maximum value and cannot continue to count, resulting in a decrease in the signal-to-noise ratio of the photosensor and inaccurate sensing signals, and to increase the convenience of use.

[0005] The present invention provides a data processing method applicable to a photosensor. This data processing method includes the following steps. Through a processing unit, a plurality of first time slot count data corresponding to the photosensor are read from a storage unit. Through the processing unit, an overflow warning signal is generated based on the first time slot count data and a first preset value. Through the processing unit, a plurality of second time slot count data are read, where the second time slot count data is greater than or equal to the first time slot count data, and the second time slot count data is generated by the photosensor according to the first time slot count data for a sensing operation. Through the processing unit, based on the overflow warning signal, the second time slot count data is subtracted by a second preset value to generate a plurality of third time slot count data, or the second time slot count data is retained.

[0006] The present invention provides a data processing device applicable to a photosensor. This data processing device includes a storage unit and a processing unit. The storage unit records a plurality of first time slot count data and a plurality of second time slot count data corresponding to the photosensor, where the second time slot count data is greater than or equal to the first time slot count data, and the second time slot count data is generated by the photosensor according to the first time slot data for sensing operations. The processing unit is coupled to the storage unit. The processing unit reads the first time slot count data. The processing unit generates an overflow warning signal based on the first time slot count data and a first preset value. The processing unit reads the second time slot count data, and the processing unit subtracts a second preset value from the second time slot count data based on the overflow warning signal to generate a plurality of third time slot count data, or retains the second time slot count data.

[0007] The data processing method and device disclosed in the present invention enable the processing unit to read a plurality of first time slot count data corresponding to the photosensor from the storage unit. The processing unit generates an overflow warning signal based on the first time slot count data and a first preset value. The processing unit reads a plurality of second time slot count data, where the second time slot count data is greater than or equal to the first time slot count data, and the second time slot count data is generated by the photosensor according to the first time slot count data for sensing operations. The processing unit subtracts a second preset value from the second time slot count data based on the overflow warning signal to generate a plurality of third time slot count data, or retains the second time slot count data. In this way, it is possible to effectively prevent the value of the time slot count data corresponding to the photosensor from reaching the maximum value and being unable to continue counting, which may cause the signal-to-noise ratio of the photosensor to decrease and the sensing signal to be inaccurate, and improve the convenience of use. Description of the Drawings

[0008] Figure 1 Schematic diagram of a data processing device according to an embodiment of the present invention;

[0009] Figure 2 Schematic diagram of a processing unit according to an embodiment of the present invention;

[0010] Figure 3 Flowchart of a data processing method according to an embodiment of the present invention;

[0011] Figure 4 For Figure 3 Detailed flowchart of step S304 of

[0012] Figure 5 Flowchart of a data processing method according to another embodiment of the present invention.

[0013]

Symbol Description

[0014] 100: Data processing device

[0015] 110: Storage unit

[0016] 120: Processing unit

[0017] 130: Light sensor

[0018] 210: Verification unit

[0019] 220: Logic unit

[0020] 230: Latch unit

[0021] 240: Arithmetic unit

[0022] S302~S308, S402~S406, S502: Steps Detailed implementation manners

[0023] In the following listed embodiments, the same reference numerals will represent the same or similar elements or components.

[0024] Figure 1 It is a schematic diagram of a data processing device according to an embodiment of the present invention. The data processing device 100 in this embodiment is applicable to a light sensor. In this embodiment, the light sensor 130 is, for example, a single-photon avalanche diode (SPAD) sensor. When light irradiates into the light sensor (SPAD sensor) and causes the light sensor 130 (SPAD sensor) to be triggered, the light sensor 130 (SPAD sensor) will have an avalanche effect and perform photon conversion to generate a small amount of electrons, and the above avalanche effect will cause the output signal of the light sensor 130 (SPAD sensor) to flip, and the light sensor 130 can accumulate (for example, add "1") the value of the time slot corresponding to the time of the above signal flip, so as to generate corresponding time slot count data.

[0025] For example, assuming that the time of the above signal flip is 1 nanosecond (ns), the light sensor 130 can accumulate (for example, add "1") the value of the time slot (1 ns) corresponding to the time of the above signal flip (1 ns), so as to generate corresponding time slot count data. Assuming that the time of the above signal flip is 5 ns, the light sensor 130 can accumulate (for example, add "1") the value of the time slot (5 ns) corresponding to the time of the above signal flip (5 ns), so as to generate corresponding time slot count data. The rest of the time slot count data can be analogized accordingly.

[0026] Please refer to Figure 1, the data processing device 100 may include a storage unit 110 and a processing unit 120. The storage unit 110 may record a plurality of first time slot count data and a plurality of second time slot count data corresponding to the photosensor 130. In this embodiment, the second time slot count data is, for example, greater than or equal to the first time slot count data, and the second time slot count data is generated by the photosensor 130 performing a sensing operation based on the first time slot count data.

[0027] For example, the photosensor 130 performs N light sensing operations, and accumulates the values of the time slots corresponding to the times when the signals are flipped to generate the first time slot count data, and the first time slot count data can be recorded in the storage unit 110. Then, the photosensor 130 may perform N light sensing operations based on the first time slot count data, and accumulate the values of the time slots corresponding to the times when the signals are flipped to generate the second time slot count data, and the second time slot count data can be recorded in the storage unit 110. That is to say, the second time slot count data may be data generated by accumulating the first time slot count data. In some embodiments, the storage unit 110 is, for example, a static random access memory (SRAM), but the embodiments of the present invention are not limited thereto.

[0028] The processing unit 120 may be coupled to the storage unit 110. The processing unit 120 is, for example, a microcontrol unit (MCU), a microprocessor, or a central processing unit (CPU), but the embodiments of the present invention are not limited thereto.

[0029] The processing unit 120 may read the first time slot count data from the storage unit 110. That is to say, the processing unit 120 may read the first time slot count data from the storage unit 110 after the photosensor 130 performs N light sensing operations. Then, the processing unit 120 may generate an overflow warning signal based on the first time slot count data and a first preset value. In some embodiments, the first preset value is, for example, 1024 or 2048, etc., but the embodiments of the present invention are not limited thereto.

[0030] Furthermore, after the processing unit 120 obtains the first time slot count data, the processing unit 120 may compare the first time slot count data with the first preset value to confirm whether the first time slot count data is greater than or equal to the first preset value (such as 1024 or 2048), and then generate a corresponding overflow warning signal.

[0031] When it is confirmed that the first time slot count data is greater than or equal to a first preset value (e.g., 1024 or 2048), it means that the values of all the first time slot count data are greater than or equal to the first preset value (e.g., 1024 or 2048), then the processing unit 120 can generate an overflow warning signal of, for example, a first level. Additionally, when it is confirmed that the first time slot count data is not greater than or equal to the first preset value (e.g., 1024 or 2048), it means that the value of at least one of the first time slot count data is not greater than or equal to the first preset value (e.g., 1024 or 2048), then the processing unit 120 can generate an overflow warning signal of, for example, a second level. In this embodiment, the first level is, for example, different from the second level. In some embodiments, the first level can be a high logic level, such as "1", and the second level can be a low logic level, such as "0", but the embodiments of the present invention are not limited thereto.

[0032] In some embodiments, the processing unit 120 can confirm whether the most significant bit (MSB) of the first time slot count data is greater than or equal to a first preset value. That is to say, after the processing unit 12 reads the first time slot count data, the processing unit 120 can obtain the most significant bit of the first time slot count data, and compare the value of this most significant bit with the first preset value to confirm whether the most significant bit is greater than or equal to the first preset value, and then generate a corresponding overflow warning signal. In this embodiment, the first preset value is, for example, "1".

[0033] For example, when the most significant bit of the first time slot count data is "1", the processing unit 120 can determine that the most significant bit "1" of the first time slot count data is equal to the first preset value "1", then the processing unit 120 can generate an overflow warning signal of the first level (e.g., "1"). When the most significant bit of the first time slot count data is "0", the processing unit 120 can determine that the most significant bit "0" of the first time slot count data is not greater than or equal to the first preset value "1", then the processing unit 120 can generate an overflow warning signal of the second level (e.g., "0").

[0034] After that, the processing unit 120 can read the second time slot count data from the storage unit 110. That is to say, the processing unit 120 can read the second time slot count data from the storage unit 110 after the optical sensor 130 performs N optical sensing operations according to the first time slot count data.

[0035] Next, the processing unit 120 may subtract a second preset value from the second piece of time slot count data according to the overflow warning signal to generate multiple pieces of third time slot count data, or retain the second piece of time slot count data. In some embodiments, the second preset value is, for example, less than or equal to the first preset value.

[0036] For example, after the processing unit 120 reads the second piece of time slot count data and when the overflow warning signal generated by the processing unit 120 is at a first level (such as a high logic level "1"), the processing unit 120 may subtract the second preset value from the second piece of time slot count data to generate a third piece of time slot count data. That is to say, the processing unit 120 may subtract the second preset value from each value of the second piece of time slot count data to generate a third piece of time slot count data, that is, (the third piece of time slot count data = the second piece of time slot count data - the second preset value). In this way, it is possible to effectively prevent the value of the time slot count data corresponding to the optical sensor 130 from reaching the maximum value and being unable to continue counting, so that the signal-to-noise ratio of the optical sensor decreases and the sensing signal becomes inaccurate.

[0037] In addition, after the processing unit 120 reads the second piece of time slot count data and when the overflow warning signal generated by the processing unit 120 is at a second level (such as a low logic level "0"), the processing unit 120 may retain the second piece of time slot count data. That is to say, the processing unit 120 does not perform any processing on the second piece of time slot count data to retain the original value of the second time slot data.

[0038] After that, the processing unit 120 may write the second piece of time slot count data or the third piece of time slot count data into the storage unit 110. In this way, the optical sensor 130 can use the second piece of time slot count data or the third piece of time slot count data as a basis for subsequent sensing operations.

[0039] Figure 2 is Figure 1 a detailed schematic diagram of the processing unit. Please refer to Figure 2 As shown in, the processing unit 120 may include a confirmation unit 210, a logic unit 220, a latch unit 230, and an arithmetic unit 240.

[0040] The confirmation unit 210 may be coupled to the storage unit 110. The confirmation unit 210 may read the first piece of time slot count data and the first preset value from the storage unit 110, and generate a confirmation signal according to the first piece of time slot count data and the first preset value. That is to say, when the confirmation unit 210 obtains the first piece of time slot count data and the first preset value, the confirmation unit 210 may confirm whether the first piece of time slot count data (or the most significant bit of the first piece of time slot count data) is greater than or equal to the first preset value to generate a corresponding confirmation signal.

[0041] For example, when the first time slot count data (or the most significant bit of the first time slot count data) is greater than or equal to the first preset value, the confirmation unit 210 generates a confirmation signal such as a high logic level (e.g., "1"). When the first time slot count data (or the most significant bit of the first time slot count data) is not greater than or equal to the first preset value, the confirmation unit 210 generates a confirmation signal such as a low logic level (e.g., "0").

[0042] The logic unit 220 can be coupled to the confirmation unit 210. The logic unit 220 receives the confirmation signal and the enable signal, and generates a logic signal according to the confirmation signal and the enable signal. In this embodiment, the enable signal is, for example, a high logic level, such as "1". Additionally, the logic unit 220 is, for example, an AND gate. That is, the logic unit 220 can perform an "AND" operation on the confirmation signal and the enable signal to generate a corresponding logic signal. For example, when both the confirmation signal and the enable signal are at a high logic level (e.g., "1"), the logic unit 220 can generate a logic signal at a high logic level (e.g., "1"). When the confirmation signal is at a low logic level (e.g., "0") and the enable signal is at a high logic level (e.g., "1"), the logic unit 220 can generate a logic signal at a low logic level (e.g., "0").

[0043] The latch unit 230 can be coupled to the logic unit 220. The latch unit 230 receives the start signal, the input signal, and the logic signal, and generates an overflow warning signal according to the start signal, the input signal, and the logic signal. In this embodiment, the latch unit 230 can be a flip-flop (FF). When the logic signal is at a high logic level (e.g., "1"), the latch unit 230 can generate an overflow warning signal at a high logic level (e.g., "1"). When the logic signal is at a low logic level (e.g., "0"), the latch unit 230 can generate an overflow warning signal at a low logic level (e.g., "1").

[0044] The arithmetic unit 240 can be coupled to the latch unit 230. The arithmetic unit 240 reads the second time slot count data, receives the overflow warning signal, and according to the overflow warning signal, subtracts the second preset value from the second time slot count data to generate the third time slot count data, or retains the second time slot count data. In this embodiment, the arithmetic unit 240 is, for example, a subtractor, but the embodiments of the present invention are not limited thereto. For example, when the overflow warning signal is at a high logic level (e.g., "1"), the arithmetic unit 240 can subtract the second preset value from the second time slot count data to generate the third time slot count data. When the overflow warning signal is at a low logic level (e.g., "0"), the arithmetic unit 240 can retain the second time slot count data.

[0045] Figure 3 Flow chart of a data processing method according to an embodiment of the present invention. The data processing method of this embodiment is applicable to a light sensor. In step S302, a plurality of first time slot count data corresponding to the light sensor is read from a storage unit by a processing unit. In step S304, an overflow warning signal is generated by a processing unit according to the first time slot count data and a first preset value.

[0046] In step S306, a plurality of second time slot counting data are read by the processing unit, wherein the second time slot counting data is greater than or equal to the first time slot counting data, and the second time slot counting data is generated by the light sensor performing a sensing operation based on the first time slot counting data. In step S308, a second preset value is subtracted from the second time slot counting data by the processing unit based on the overflow warning signal to generate a plurality of third time slot counting data, or the second time slot counting data is retained. In some embodiments, the second preset value is, for example, less than or equal to the first preset value.

[0047] Figure 4 for Figure 3 Detailed flow chart of step S304. In step S402, confirm whether the first time slot count data is greater than or equal to the first preset value. When it is confirmed that the first time slot count data is greater than or equal to the first preset value, enter step S404 to generate an overflow warning signal of a first level. When it is confirmed that the first time slot count data is not greater than or equal to the first preset value, enter step S406 to generate the overflow warning signal of a second level. In this embodiment, the above-mentioned first level is, for example, different from the second level. In some embodiments, step S402 may include confirming whether the most significant bit of the first time slot count data is greater than or equal to the first preset value.

[0048] Figure 5 FIG. 1 is a flow chart of a data processing method according to another embodiment of the present invention. In this embodiment, steps S302 to S308 are Figure 3 Steps S302 to S308 are the same or similar to those in Figure 3 In step S502, the second time slot counting data or the third time slot counting data is written into the storage unit.

[0049] In summary, for the data processing method and apparatus disclosed in the present invention, a processing unit reads a plurality of first time slot count data corresponding to a photosensor from a storage unit. The processing unit generates an overflow warning signal based on the first time slot count data and a first preset value. The processing unit reads a plurality of second time slot count data, where the second time slot count data is greater than or equal to the first time slot count data, and the second time slot count data is generated by the photosensor performing a sensing operation based on the first time slot count data. The processing unit subtracts a second preset value from the second time slot count data based on the overflow warning signal to generate a plurality of third time slot count data, or retains the second time slot count data. In this way, it is possible to effectively prevent the value of the time slot count data corresponding to the photosensor from reaching the maximum value and being unable to continue counting, which may cause the signal-to-noise ratio of the photosensor to decrease and the sensing signal to be inaccurate, and improve the convenience of use.

[0050] Although the present invention is disclosed as above with embodiments, it is not intended to limit the scope of the present invention. Any person with ordinary knowledge in the technical field can make some modifications and refinements without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the scope defined by the appended claims.

Claims

1. A data processing method applicable to an optical sensor, characterized in that, the data processing method includes: reading, by a processing unit, a plurality of first time slot count data corresponding to the optical sensor from a storage unit; generating, by the processing unit, an overflow warning signal according to the plurality of first time slot count data and a first preset value; reading, by the processing unit, a plurality of second time slot count data, wherein the plurality of second time slot count data is greater than or equal to the plurality of first time slot count data, and the plurality of second time slot count data is generated by the optical sensor performing a sensing operation according to the plurality of first time slot count data; and subtracting, by the processing unit, a second preset value from the plurality of second time slot count data according to the overflow warning signal to generate a plurality of third time slot count data, or retaining the plurality of second time slot count data.

2. The data processing method according to claim 1, characterized in that, the step of generating the overflow warning signal according to the plurality of first time slot count data and the first preset value includes: confirming whether the plurality of first time slot count data is greater than or equal to the first preset value; when it is confirmed that the plurality of first time slot count data is greater than or equal to the first preset value, generating the overflow warning signal at a first level; and when it is confirmed that the plurality of first time slot count data is not greater than or equal to the first preset value, generating the overflow warning signal at a second level; wherein, the first level is different from the second level.

3. The data processing method according to claim 2, characterized in that, confirming whether the plurality of first time slot count data is greater than or equal to the first preset value includes: confirming whether a most significant bit of the plurality of first time slot count data is greater than or equal to the first preset value.

4. The data processing method according to claim 1, characterized in that, the second preset value is less than or equal to the first preset value.

5. The data processing method according to claim 1, characterized in that, further includes: writing the plurality of second time slot count data or the plurality of third time slot count data into the storage unit.

6. A data processing device applicable to an optical sensor, characterized in that, the data processing device includes: a storage unit recording a plurality of first time slot count data and a plurality of second time slot count data corresponding to the optical sensor, wherein the plurality of second time slot count data is greater than or equal to the plurality of first time slot count data; and A processing unit, coupled to the storage unit, wherein the processing unit reads the plurality of first time slot count data, the processing unit generates an overflow warning signal according to the plurality of first time slot count data and a first preset value, the processing unit reads the plurality of second time slot count data, and the processing unit subtracts a second preset value from the plurality of second time slot count data according to the overflow warning signal to generate a plurality of third time slot count data, or retains the plurality of second time slot count data.

7. The data processing device according to claim 6, wherein, the processing unit confirms whether the plurality of first time slot count data is greater than or equal to the first preset value. When it is confirmed that the plurality of first time slot count data is greater than or equal to the first preset value, a first-level overflow warning signal is generated. When it is confirmed that the plurality of first time slot count data is not greater than or equal to the first preset value, a second-level overflow warning signal is generated, wherein the first level is different from the second level.

8. The data processing device according to claim 7, wherein, the processing unit further confirms whether a most significant bit of the plurality of first time slot count data is greater than or equal to the first preset value.

9. The data processing device according to claim 6, wherein, the processing unit includes: a confirmation unit, reading the plurality of first time slot count data and the first preset value, and generating a confirmation signal according to the plurality of first time slot count data and the first preset value; a logic unit, coupled to the confirmation unit, receiving the confirmation signal and an enabling signal, and generating a logic signal according to the confirmation signal and the enabling signal; a latch unit, coupled to the logic unit, receiving a start signal, an input signal and the logic signal, and generating the overflow warning signal according to the start signal, the input signal and the logic signal; and an arithmetic unit, reading the plurality of second time slot count data, receiving the overflow warning signal, and subtracting a second preset value from the plurality of second time slot count data according to the overflow warning signal to generate the plurality of third time slot count data, or retaining the plurality of second time slot count data.

10. The data processing device according to claim 6, wherein, the second preset value is less than or equal to the first preset value.

11. The data processing device according to claim 6, wherein, the processing unit further writes the plurality of second time slot count data or the plurality of third time slot count data into the storage unit.