Optical sensor device and method

By counting the transmission intervals and number of specific communication signals using the optical sensor device itself, and dynamically calibrating the clock signal frequency, the problem of frequency deviation in traditional optical sensor devices under temperature or pressure changes is solved, thus improving the accuracy of image processing and motion detection.

CN116793402BActive Publication Date: 2026-07-14PIXART IMAGING INC

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
PIXART IMAGING INC
Filing Date
2022-08-15
Publication Date
2026-07-14

Smart Images

  • Figure CN116793402B_ABST
    Figure CN116793402B_ABST
Patent Text Reader

Abstract

A method of an optical sensor device is disclosed, comprising: generating a clock signal using an oscillator circuit; generating a monitoring frame based on the clock signal; calibration of the clock signal is responsive to at least one of: a first communication signal transmitted multiple times from a monitoring system externally coupled to the optical sensor device and received by the optical sensor device; a data length of a first communication signal transmitted only once from the monitoring system externally coupled to the optical sensor device; and, a data length of an encoded data portion of the first communication signal transmitted only once. An optical sensor device is also disclosed. The present invention enables dynamic determination of whether and how to calibrate the actual frequency of the clock signal generated by the oscillator in the optical sensor device, the monitoring system does not need to inform the optical sensor device on how to calibrate the clock signal, implementation can become simpler, and therefore, the optical sensor device can be suitable for any type of monitoring system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to an optical sensing mechanism, and more particularly to an optical sensor device and method. Background Technology

[0002] Generally, the clock frequency of traditional optical sensor devices can deviate significantly due to changes in temperature or pressure. If the clock generator in a traditional optical sensor device is implemented using a low-power or low-cost oscillator, its accuracy will be more easily affected. For example, a significant frequency deviation could be as high as 20%. This significant frequency deviation can also interfere with other operations, such as frame timing, image processing operations, timing of automatic exposure operations, and time-of-flight operations. Summary of the Invention

[0003] Therefore, one of the objectives of this invention is to disclose an optical sensor device and method to solve the above-mentioned problems.

[0004] According to an embodiment of the present invention, an optical sensor device is disclosed. The optical sensor device includes an oscillation circuit and a processor. The oscillation circuit is used to generate a clock signal. The processor is coupled to the oscillation circuit and is used to generate a plurality of monitoring frames according to the clock signal. The clock signal is calibrated in response to at least one of the following: a first communication signal that is transmitted multiple times from a monitoring system externally coupled to the optical sensor device and received by the optical sensor device; the data length of the first communication signal that is transmitted only once by the monitoring system externally coupled to the optical sensor device; and the data length of the encoded data portion of the first communication signal that is transmitted only once.

[0005] According to an embodiment of the present invention, an optical sensor device is also disclosed. The adjustment of the clock signal is performed using different modes based on the network traffic conditions of the communication protocol between the optical sensor device and an external monitoring system coupled to the optical sensor device.

[0006] According to an embodiment of the present invention, a method for using an optical sensor device is disclosed. The method includes: generating a clock signal using an oscillating circuit; and generating a plurality of monitoring frames based on the clock signal; wherein the calibration of the clock signal is in response to at least one of the following: a first communication signal repeatedly transmitted from an externally coupled monitoring system to the optical sensor device and received by the optical sensor device; the data length of the first communication signal transmitted only once by the externally coupled monitoring system to the optical sensor device; and the data length of the encoded data portion of the first communication signal transmitted only once.

[0007] This invention can dynamically determine whether calibration is needed and how to calibrate the actual frequency of the clock signal generated by the oscillator in the optical sensor device. The monitoring system does not need to notify the optical sensor device about how to calibrate the clock signal, which makes implementation simpler. Therefore, the optical sensor device can be used in any type of monitoring system. Attached Figure Description

[0008] Figure 1 This is a block diagram of an optical sensor device according to an embodiment of the present invention.

[0009] Figure 2 This is a schematic diagram illustrating an example of communication between a monitoring system and an optical sensor device according to an embodiment of the present invention.

[0010] Figure 3 This is a schematic diagram illustrating an example of communication between a monitoring system and an optical sensor device according to another embodiment of the present invention.

[0011] Figure 4 This is a schematic diagram illustrating an example of communication between a monitoring system and an optical sensor device according to another embodiment of the present invention.

[0012] Figure 5 This is a schematic diagram of a specific packet signal that is transmitted from a monitoring system to an optical sensor device according to another embodiment of the present invention.

[0013] The reference numerals in the attached figures are explained as follows:

[0014] 100 Optical Sensor Devices

[0015] 105 Oscillating Circuit

[0016] 110 processor

[0017] 115 Communication Protocol

[0018] 120 pixel array

[0019] 200 monitoring system

[0020] 205 Oscillator Detailed Implementation

[0021] The present invention aims to disclose a technical solution and corresponding method for an optical sensor device, capable of dynamically determining whether calibration is required and how to calibrate the actual frequency of a clock signal generated by an oscillator contained in the optical sensor device. This is achieved by using the optical sensor device itself to count at least one of the following parameters: a time interval between two or more transmissions of a specific communication signal transmitted from a monitoring system to the optical sensor device; a total number of transmissions of the specific communication signal sent by the monitoring system (i.e., a total number of receptions of the specific communication signal received by the optical sensor device); a data length or packet length (e.g., payload sequence) of a single signal received by the optical sensor device of the specific / negotiated communication signal; and the length of the encoded data content of a single signal received by the specific communication signal.

[0022] The disclosed optical sensor device can be used to calculate the time length between two or more negotiated communication signals or to calculate a data / time length of a negotiated communication signal to determine whether and how the clock signal needs to be calibrated or adjusted. A monitoring system does not need to notify the disclosed optical sensor device how to calibrate the clock signal, thus simplifying the implementation of the monitoring system. Therefore, the disclosed optical sensor device can be applied to any type of monitoring system. The corresponding operation will be detailed in the following paragraphs.

[0023] Figure 1 This is a schematic diagram of an optical sensor device 100 according to an embodiment of the present invention. The optical sensor device 100 is used, for example, as a motion detection device or a security camera device, and it includes an oscillation circuit 105, a processor 110, and one or more other circuit elements, such as a sensor device with a pixel array 120 having multiple pixel units; for the sake of simplicity, the operation of the pixel array 120 is not described in detail here, and is not included in... Figure 1 As shown in the figure. The optical sensor device 100 can be arranged to capture one or more images, generate one or more monitoring images / frames based on the captured images, determine whether a motion event has occurred in the generated monitoring images, and if a motion event is detected in the generated monitoring images, generate and output an alarm interrupt signal to the monitoring system 200 through the communication protocol 115. The alarm interrupt signal is only output to the monitoring system 200 when the motion event is detected.

[0024] The monitoring system 200 is externally coupled to the optical sensor device 100, and is, for example, a back-end monitoring system. It includes at least two modes: a power-saving mode (e.g., a sleep mode) and a normal operation mode. When the optical sensor device 100 does not detect any motion events, the monitoring system 200 will remain in the power-saving mode to conserve power.

[0025] Once the optical sensor device 100 detects a motion event, it sends an alarm interrupt signal to wake up the monitoring system 200. The monitoring system 200 then exits power-saving mode and enters normal operation mode. In this scenario, the monitoring system 200 receives the alarm interrupt signal from the optical sensor device 100 and then sends an acknowledgment (ACK) signal back to the optical sensor device 100 via communication protocol 115 to notify it that the monitoring system 200 has entered normal operation mode.

[0026] Next, after the optical sensor device 100 receives the confirmation signal, the optical sensor device 100 can transmit one or more monitoring images / frames to the monitoring system 200, and the monitoring system 200 can start a recording operation to record and store the one or more monitoring images / frames associated with the detected motion events for the user; for the sake of brevity, the corresponding operation is not described in detail.

[0027] Furthermore, the optical sensor device 100 can communicate with the monitoring system 200 via communication protocol 115, which can be a wired communication protocol or a wireless communication protocol. For example (but not limited to), after the optical sensor device 100, used as the security camera, is secured and powered on, the monitoring system 200 can negotiate with the optical sensor device 100, for example, sending information related to the operating frequency, clock frequency, and / or clock cycle used by the monitoring system 200 to the optical sensor device 100. Then, after receiving this information, the monitoring system 200 can notify the optical sensor device 100 of a message indicating successful information reception.

[0028] For the optical sensor device 100, in practice, to reduce circuit costs, the oscillation circuit 105 can be implemented, for example (but not limited to), by using a low-power oscillator (LPO) that consumes less / lower power and is cheaper. The oscillation circuit 105 can be used to generate a clock signal CLK1 with a specific oscillation frequency to the processor 110.

[0029] The processor 110 is coupled to the oscillation circuit 105 and is used to control the pixel array 120 to capture one or more images to generate one or more captured images based on a specific oscillation frequency of the clock signal CLK1 generated by the oscillation circuit 105. Based on the one or more captured images, it generates one or more monitoring images / frames, determines whether a motion event has occurred in the one or more generated monitoring images, and if a motion event is detected in the generated monitoring images, it generates and outputs an alarm interrupt signal to the monitoring system 200 via the communication protocol 115. For example (but not limited to), one or more captured images may be temporal difference images, such as the difference between multiple images of a single pixel, or spatial difference images, such as the pixel difference between multiple adjacent pixels.

[0030] For the monitoring system 200, it includes another oscillator 205, which can be implemented using more complex hardware circuitry. For example, the monitoring system 200, when supplied with more power, can be used to display a recorded video of a detected motion event to the user. Furthermore, the oscillator 205 can provide a relatively precise clock signal CLK2 with a relatively accurate oscillation frequency. The monitoring system 200 operates at this relatively precise oscillation frequency of the clock signal CLK2. It should be noted that, equivalently, the clock signal CLK2 is, for example, more precise than the clock signal CLK1, or more tolerant of changes such as temperature variations, process variations, or pressure variations. That is, the clock signal CLK2 can be considered a precise clock signal compared to the clock signal CLK1.

[0031] In this embodiment, the clock signal CLK1 can be calibrated by the optical sensor device 100 itself in response to an event, such as the event where a negotiation communication signal of a specific communication signal is transmitted multiple times from the monitoring system 200 to the optical sensor device 100. This specific communication signal can be transmitted multiple times from the monitoring system 200 to the optical sensor device 100 via communication protocol 115, and these multiple signal transmissions can be performed according to a specific time period.

[0032] In one embodiment, the specific communication signal may be the aforementioned confirmation signal, which notifies the optical sensor device 100 of information regarding whether the monitoring system 200 has entered or is in normal operating mode. The monitoring system 200 may be configured to send such a confirmation signal two or more times at the specified time period. That is, any two consecutive transmissions of such a confirmation signal (i.e., the specific communication signal) are separated or spaced apart by a time interval equal to the specified time period.

[0033] The monitoring system 200 operates under a relatively precise / accurate clock signal CLK2, therefore the specific time period used by the monitoring system 200 is also relatively accurate / accurate. Assuming the communication between the optical sensor device 100 and the monitoring system 200 is stable (i.e., the communication protocol 115 does not undergo rapid and significant changes), the time interval between two transmissions of the monitoring system 200, i.e., the specific time period, will be equal to or equivalent to the time interval between the reception of two transmitted signals by the optical sensor device 100. After receiving multiple transmissions of this specific communication signal from the monitoring system 200, the processor 110 can determine whether to calibrate or fine-tune the oscillation frequency of the clock signal CLK1 based on this relatively precise / accurate specific time period.

[0034] For example (but not limited to), a counting reference value CNTR1 used by processor 110 can be determined using the following equation:

[0035]

[0036] Where f1 represents the target / rated oscillation frequency of clock signal CLK1, f2 represents the target / rated oscillation frequency of clock signal CLK2 used by monitoring system 200, CNTR2 represents a target count value generated by counting the specific time period (i.e., the time interval between two adjacent / continuous transmissions of a specific communication signal sent by monitoring system 200) using the target oscillation frequency f2 of clock signal CLK2, and CNTR1 represents the counting reference value (i.e., another target count value) calculated and adopted by processor 110 based on the above parameters f1, f2, and CNTR2. In other words, using a higher frequency for counting within essentially the same (or only slightly different) time period will produce a larger count value. The processor 110 can calculate the counting reference value CNTR1 as shown in the following formula:

[0037]

[0038] Figure 2 This is an example diagram illustrating a scenario of communication between a monitoring system 200 and an optical sensor device 100 according to an embodiment of the present invention. Figure 2In this embodiment, the monitoring system 200 initially operates in power-saving mode. Upon receiving an alarm interruption signal from the optical sensor device 100, the monitoring system 200 exits power-saving mode and enters normal operation mode. In this embodiment, the monitoring system 200 then sends a specific communication signal (i.e., an acknowledgment signal ACK) twice to the optical sensor device 100. The two acknowledgment signals are separated by a specific time period TCP, which is used to notify the optical sensor device 100 that the monitoring system 200 is currently in normal operation mode.

[0039] The first transmission and the second transmission of the acknowledgment signal are spaced apart by a specific TCP time period. In practice, in... Figure 2 When the first transmission of the confirmation signal arrives at the optical sensor device 100, the optical sensor device 100 is used to receive the first transmission and start a specific counter to use the actual oscillation frequency f of the clock signal CLK1. actual The counter is used to generate a count value. For example, the count value is incremented by one whenever a signal edge (rising edge or falling edge) of the clock signal CLK1 occurs. When the second transmission of the acknowledgment signal arrives at the optical sensor device 100, the specific counter is stopped. At this time, when the second transmission of the acknowledgment signal arrives at the optical sensor device 100, the processor 110 is configured to stop the counting operation of the specific counter and obtain a result count value.

[0040] Processor 110 then compares the obtained count value with the count reference value to determine whether to adjust or fine-tune the clock signal CLK1, and how to adjust or fine-tune the clock signal CLK1. For example, if the obtained count value is less than a lower tolerable threshold of the count reference value CNTR1, processor 110 can determine that there is a frequency offset / displacement in the clock signal CLK1 and that the clock signal CLK1 is currently slowing down. In this case, processor 110 can trigger the oscillation circuit 105 to run rapidly to gradually increase the oscillation frequency f of the clock signal CLK1. actual This is to ensure that the next obtained count value is greater than the tolerable lower threshold.

[0041] Conversely, if the resulting count value exceeds the tolerable upper limit threshold of the count reference value CNTR1, the processor 110 can determine that another frequency deviation / offset has occurred in the clock signal CLK1 and that the clock signal CLK1 is currently faster. In this case, the processor 110 can trigger the oscillation circuit 105 to operate slowly to gradually reduce the oscillation frequency f of the clock signal CLK1. actualThis is done so that the next obtained count value will be less than the upper tolerance threshold. If the obtained count value is between the upper tolerance threshold and the lower tolerance threshold, the processor 110 can determine that the clock signal CLK1 is still accurate, and there is no need to calibrate the clock signal CLK1.

[0042] In other embodiments, after obtaining the result count value, the processor 110 can determine the result count value CNTR based on the result count value. res The actual oscillation frequency f of the clock signal CLK1 is calculated or estimated using the parameters f1 and CNTR1 mentioned above. actual :

[0043]

[0044] Where f actual This indicates the actual oscillation frequency of the clock signal CLK1 and can be calibrated by the processor 110, while CNTR res This represents the numerical value of the obtained count. Next, the processor 110 can calculate the actual oscillation frequency f. actual The frequency deviation between the clock signal CLK1 and the target oscillation frequency f1 can be determined according to the user's needs, and it can be determined whether the actual oscillation frequency f1 of the clock signal CLK1 needs to be adjusted or fine-tuned. actual For example, the processor 110 can control the oscillation circuit 105 to try using multiple different frequency levels in order to find a frequency level with a smaller frequency difference compared to the target oscillation frequency f1.

[0045] In one embodiment, the specific time period TCP can be configured as a clock cycle corresponding to the target oscillation frequency f2 of the clock signal CLK2 in the monitoring system 200. In this example, the value of CNTR2 is configured to 1, and the optical sensor device 100 can calculate the count reference value based solely on the target frequencies f1 and f2. The value of the target frequency f2 can be sent from the monitoring system 200 to the optical sensor device 100 when it is powered on. That is, in this embodiment, the monitoring system 200 does not need to send the CNTR2 value separately. Furthermore, in other embodiments, the user can manually set the parameter value of the target frequency f2 to configure the optical sensor device 100, thus eliminating the need for negotiation between the monitoring system 200 and the optical sensor device 100. In this case, the monitoring system 200 does not need to send the target frequency f2 information to the optical sensor device 100 when it is powered on, effectively allowing the optical sensor device 100 to dynamically calibrate the frequency of its clock signal CLK1 by referring only to the target frequency f2 of the monitoring system 200.

[0046] In one embodiment, processor 110 may be configured to perform an image calibration operation, such as a de-flicker operation, to compensate for flickering in the image. One or more parameters of the image calibration operation may be based on the actual oscillation frequency f. actual The adjustment is made based on the frequency deviation calculated between the target oscillation frequency f1 and the target oscillation frequency. For example (but not limited to), a parameter used in this image calibration operation can be configured to be proportional to or inversely proportional to the calculated frequency deviation.

[0047] Alternatively, in one embodiment, the processor 110 may be configured to perform a specific processing operation, which may include a specific information value that is affected by the aforementioned frequency deviation. In this embodiment, the processor 110 may utilize the actual oscillation frequency f. actual The frequency deviation calculated between the target oscillation frequency f1 and the target oscillation frequency is used to calibrate this specific information value. For example, a default value for a deflash operation could be equal to... If a frequency deviation occurs, it may be changed to At this time, processor 110 can convert this value Calibration is set to default value It should be noted that this specific processing operation is not limited to the deflickering operation, but can also be related to operations such as time-of-flight (TOF) calculation, heart rate calculation, and automatic exposure.

[0048] Furthermore, in one embodiment, the count reference value CNTR1 can also be a default value or a predetermined value, and the optical sensor device 100 does not need to negotiate with the monitoring system 200 to obtain information to calculate the count reference value CNTR1. If the count reference value CNTR1 is not configured, the optical sensor device 100 will be arranged to negotiate with the monitoring system 200 to determine the count reference value CNTR1. For example, the aforementioned parameters f2 and CNTR2 (or a specific time period TCP) can be transmitted from the monitoring system 200 to the optical sensor device 100 after negotiation.

[0049] The advantage of using an acknowledgment signal as the specific communication signal and sending it multiple times is that the operation of sending two or more acknowledgment signals when the monitoring system 200 exits power-saving mode becomes simpler for the monitoring system 200. This eliminates the need for additional circuitry and complex algorithms implemented in the monitoring system 200. Furthermore, another advantage is that if image flickering or malfunctions are caused by a frequency deviation of the clock signal CLK1, the processor 110 can promptly calibrate the frequency of the clock signal CLK1 after receiving multiple acknowledgment signals corresponding to the image flickering or malfunction. In one scenario example (but not limited to), if a frequency shift occurs in the clock signal CLK1 due to temperature / process / pressure changes, the accuracy of capturing one or more images will be affected and degraded. Therefore, there is a high probability that the optical sensor device 100 may misinterpret this as a frequent motion event in the monitored screen and frequently send alarm interruption signals to the monitoring system 200. Therefore, configuring this specific communication signal as an acknowledgment signal upon successful reception of an alarm interruption signal can effectively improve performance. By directly referencing multiple signal receptions of confirmation signals transmitted from monitoring system 200 to optical sensor device 100, the calibration method / procedure executed by optical sensor device 100 can determine whether calibration is required and how to calibrate the clock signal CLK1 of oscillation circuit 105.

[0050] In other embodiments, the monitoring system 200 may be used to send the aforementioned confirmation signal or specific communication signal to the optical sensor device 100 after receiving a control signal different from the aforementioned alarm interruption signal, and may also be used to cause the monitoring system 200 to exit the power saving mode and enter the normal operation mode.

[0051] In one embodiment, the monitoring system 200 may send the specific communication signal (e.g., an acknowledgment signal) to the optical sensor device 100 more than twice. Figure 3 This is an example diagram illustrating a scenario of communication between a monitoring system 200 and an optical sensor device 100 according to another embodiment of the present invention. Figure 3 In this scenario, the monitoring system 200 initially operates in power-saving mode. Upon receiving an alarm interruption signal from the optical sensor device 100, the monitoring system 200 exits power-saving mode and enters normal operation mode. In this example, the monitoring system 200 then sends a specific communication signal (i.e., an acknowledgment signal ACK) back to the optical sensor device 100 more than twice, and any two consecutive transmissions of the acknowledgment signal are separated by a specific time period (TCP). The total number of acknowledgment signal transmissions can be a default setting or can be pre-negotiated between the optical sensor device 100 and the monitoring system 200.

[0052] exist Figure 3 When the first transmission of the confirmation signal reaches the optical sensor device 100, the optical sensor device 100 (or processor 110) will utilize the actual oscillation frequency f of the clock signal CLK1. actual The counting process begins. When the last transmission of the acknowledgment signal reaches the optical sensor device 100, the processor 110 stops counting and obtains a result count value. The processor 110 then calculates an average count value by dividing the obtained result count value by (M-1), where M is the total number of acknowledgment signal transmissions. The processor 110 compares this average count value with the count reference value CNTR1 to determine whether to adjust / fine-tune the clock signal CLK1, and how to adjust / fine-tune it. One advantage of using this average count value is that the final result count value can be more accurate.

[0053] In one embodiment, the optical sensor device 100 may be configured to negotiate with the monitoring system 200 to send multiple transmissions of multiple sets of specific communication signals (e.g., acknowledgment signals) when the monitoring system 200 enters or is in normal operating mode. Figure 4 This is an example diagram illustrating a scenario of communication between a monitoring system 200 and an optical sensor device 100 according to another embodiment of the present invention. Figure 4 In this system, the monitoring system 200 initially operates in power-saving mode. Upon receiving an alarm interruption signal from the optical sensor device 100, it exits power-saving mode and enters normal operation mode. In this example, the monitoring system transmits two sets of communication signals, each set including multiple transmissions of a specific communication signal (e.g., an acknowledgment signal). Within each set, any two consecutive transmissions of the acknowledgment signal can be separated by a specific time period (TCP). Confirmation signal transmissions in different sets can be separated by a specific time period (TCP), or they can be separated without a specific time period (TCP). The total number of multiple transmissions of the acknowledgment signal can be a default setting or can be determined in advance through negotiation between the optical sensor device 100 and the monitoring system 200.

[0054] exist Figure 4 In the process, when the first transmission of the confirmation signal in the first group reaches the optical sensor device 100, the optical sensor device 100 (or processor 110) uses the actual oscillation frequency f of the clock signal CLK1. actual To begin counting, a count value is obtained. When the last transmission of the confirmation signal in the first group reaches the optical sensor device 100, the processor 110 stops counting and obtains a first result count value. Then, when the first transmission of the confirmation signal in the second group reaches the optical sensor device 100, the optical sensor device 100 (or the processor 110) uses the actual oscillation frequency f of the clock signal CLK1.actual To begin counting another count value, the processor 110 stops counting and obtains a second result count value when the last transmission of the confirmation signal in the second group reaches the optical sensor device 100. The processor 110 then calculates an average count value by averaging the first and second result count values. The processor 110 compares this average count value with the count reference value CNTR1 to determine whether to adjust / fine-tune the clock signal CLK1 and how to do so. One advantage of using this average count value is that the final count value can be more accurate.

[0055] In one embodiment, the specific communication signal (e.g., an acknowledgment signal (but not limited to)) may be configured to be transmitted only once by the monitoring system 200 to the optical sensor device 100. In this case, the monitoring system 200 can adjust the duration of a single transmission of the acknowledgment signal or the length of a packet (e.g., a payload sequence) to be equal to or proportional to that specific time period. The processor 110 may be used to start another specific counter to utilize the actual oscillation frequency f of the clock signal CLK1. actual Let's start counting another count value. Figure 5 This is a schematic diagram of a specific packet signal of an acknowledgment signal transmitted from a monitoring system 200 to an optical sensor device 100 according to another embodiment of the present invention. Figure 5 In this specific packet signal, there are a start portion S1, a control data portion C1, a data payload sequence portion P1, and an end portion E1, wherein the data payload sequence portion P1 may include an encoded data portion ED1.

[0056] For example, in one embodiment, the optical sensor device 100 (or processor 110) may start counting a specific count value when the optical sensor device 100 receives the beginning portion S1 of the specific packet signal, and stop counting when the optical sensor device 100 receives the end portion E1 of the specific packet signal to obtain a result count value. The specific count value is incremented by one each time a signal edge (rising edge or falling edge) of the clock signal CLK1 occurs. That is, in this embodiment, the processor 110 can be used to calculate the duration of the specific packet signal of the acknowledgment signal.

[0057] Alternatively, in one embodiment, the optical sensor device 100 (or processor 110) may begin counting a specific count value when the optical sensor device 100 receives the beginning of the data payload sequence portion P1, and stop counting when the optical sensor device 100 receives the end of the data payload sequence portion P1 to obtain a result count value. That is, the processor 110 may be used to count the time length of the data payload sequence portion P1 corresponding to the acknowledgment signal to obtain the result count value, in order to determine whether correction is needed and how to correct the frequency of the clock signal CLK1. In other embodiments, the optical sensor device 100 (or processor 110) may begin counting a specific count value when the optical sensor device 100 receives the beginning of the encoded data portion ED1 in the data payload sequence portion P1, and the processor 110 may stop counting when the optical sensor device 100 receives the end of the encoded data portion ED1 in the data payload sequence portion P1 to obtain a result count value. That is, the processor 110 can be used to count the duration of a specific encoded data portion ED1 generated by the monitoring system 200 to obtain the result count value, and to determine whether to calibrate and how to calibrate the frequency of the clock signal CLK1.

[0058] It should be noted that in different embodiments, the obtained result count values ​​may be the same or different values, and these different values ​​will be associated with different designs negotiated between the monitoring system 200 and the optical sensor device 100. For example, one or more data lengths, data payload sequence portion P1, and / or encoded data portion ED1 of a particular packet signal can be configured to be associated with that particular time period TCP.

[0059] Furthermore, in one embodiment, either the optical sensor device 100 or the monitoring system 200 can be arranged to trigger one or more transmissions of the specific communication signal. For example, the operation of sending the specific communication signal once or multiple times to determine whether to calibrate the clock signal CLK1 can be performed periodically by the monitoring system 200 according to the user's request, or the operation can be triggered immediately by the user himself.

[0060] In other embodiments, the specific communication signal may be configured to differ from the aforementioned acknowledgment signal, and may be sent once or multiple times after the acknowledgment signal has been sent. In this case, the calibration method / procedure is triggered in response to the receipt of the acknowledgment signal, and performs the determination of whether to calibrate and how to calibrate the clock signal CLK1 by referring to one or more transmissions of the specific communication signal, without referring to the acknowledgment signal.

[0061] Furthermore, the control data section C1 may also include an information flag marked by the monitoring system 200 to indicate which of the multiple transmissions of a specific communication signal, such as the confirmation signal, it is. For example, the information flag may be implemented using one bit or multiple bits. For example, in... Figure 2 In this context, the first and second transmissions of the confirmation signal can be marked with different information flags, such as F1 and F2, to indicate that the second transmission corresponding to flag F2 is not a copy of the first transmission. A copy of the first transmission refers to a transmission repeatedly sent by the monitoring system 200 when communication between the optical sensor device 100 and the monitoring system 200 is unstable. Similarly, in... Figure 3 In this context, more than two different transmissions of the confirmation signal can also be marked with different information flags.

[0062] In addition, Figure 4 In the first group's confirmation signal, the first, second, and third transmissions can be marked with different information flags to indicate that these transmissions belong only to the first group, unlike other groups, and also to indicate that these transmissions are slightly different from each other. Similarly, the first, second, and third transmissions in the second group's confirmation signal can be marked with different information flags to indicate that these transmissions belong only to the second group, unlike other groups, and also to indicate that these transmissions are slightly different from each other. Therefore, for example (but not limited to), a signal transmission belonging to the first group, such as the last signal transmission of the first group, will not be misidentified as a signal transmission of the second group. Therefore, the frequency of the oscillation circuit 105 can be correctly calibrated. Equivalently, each marked information flag can be used to indicate that a specific transmission of a particular communication signal corresponds to the nth transmission in the mth group.

[0063] In one embodiment, the monitoring system 200 can be configured to have two modes, wherein in a first mode, the monitoring system 200 is arranged to send the specific communication signal multiple times, and in a second mode, the monitoring system 200 is arranged to send the specific communication signal only once. The monitoring system 200 can be used to select either the first or second mode based on network traffic conditions according to the communication protocol 115. For example, if the processor 110 determines that the communication condition is below a threshold, the processor 110 determines to use and operate in the second mode, in which the clock signal CLK1 is calibrated in response to the data length of the first communication signal sent only once by the monitoring system 200 externally coupled to the optical sensor device 100, or it can be calibrated in response to the data length of the encoded data portion of the first communication signal sent only once.

[0064] In one embodiment, when the probability of network traffic congestion is low, the monitoring system 200, by default, uses a first mode to send the specific communication signal to the optical sensor device 100 multiple times. When the probability of network traffic congestion is high or network traffic congestion has already occurred, the monitoring system 200 can negotiate with the optical sensor device 100 to use a second mode to transmit the specific communication signal to the optical sensor device 100 only once. The optical sensor device 100 can count the duration of a single transmission of the specific communication signal, the length of its packet / payload, or the length of its specific encoded data content. This effectively avoids the performance of the calibration method / process being affected by poor network traffic conditions. The above-described mode selection operation can be performed automatically or manually by the user. Furthermore, when the optical sensor device 100 is installed in a location or powered on, the optical sensor device 100 can be configured to negotiate with the monitoring system 200 to determine which of the first and second modes to use initially.

[0065] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. An optical sensor device, characterized in that, include: An oscillating circuit is used to generate a clock signal; as well as A processor, coupled to the oscillation circuit, is used to generate multiple monitoring frames according to the clock signal; The clock signal calibration is in response to at least one of the following: a first communication signal that is transmitted multiple times from a monitoring system externally coupled to the optical sensor device and received by the optical sensor device; the data length of the first communication signal that is transmitted only once from the monitoring system externally coupled to the optical sensor device; and the data length of the encoded data portion of the first communication signal that is transmitted only once.

2. The optical sensor device as claimed in claim 1, characterized in that, The clock signal is calibrated based on the number of transmissions of the first communication signal or the interval between two transmissions of the first communication signal.

3. The optical sensor device as described in claim 2, characterized in that, The interval between two transmissions of the first communication signal is equal to a specific time period; the processor is used to count the interval between two receptions of the first communication signal received by the processor using the actual frequency of the clock signal to generate a count value; and the processor is used to compare the count value with a count reference value to determine whether the actual frequency of the clock signal needs to be calibrated.

4. The optical sensor device as described in claim 3, characterized in that, The processor calculates an average count value based on multiple count values ​​and compares the average count value with the count reference value to determine whether the actual frequency of the clock signal needs to be calibrated.

5. The optical sensor device as described in claim 3, characterized in that, The calibration of the clock signal is in response to another event, the other event being a second communication signal that is repeatedly transmitted by the monitoring system coupled externally to the optical sensor device and received by the optical sensor device; and the last transmission of the first communication signal being separated from the first transmission of the second communication signal by an interval different from the specific time period.

6. The optical sensor device as claimed in claim 1, characterized in that, The first communication signal is a confirmation signal issued by the monitoring system, which indicates that the monitoring system exits the power-saving mode and enters the normal operation mode.

7. The optical sensor device as claimed in claim 1, characterized in that, The processor is configured to use the actual frequency of the clock signal to count the data length of the first communication signal or the data length of the encoded data portion to generate a count value; and the processor is configured to compare the count value with a count reference value to determine whether the actual frequency of the clock signal needs to be calibrated.

8. An optical sensor device, characterized in that, include: An oscillating circuit is used to generate a clock signal; as well as A processor, coupled to the oscillation circuit, is used to generate multiple monitoring frames according to the clock signal; The adjustment of the clock signal is based on the network traffic status of the communication protocol between the optical sensor device and the monitoring system externally coupled to the optical sensor device, using either a first mode or a second mode. In the first mode, the monitoring system is configured to send a specific communication signal multiple times, while in the second mode, the monitoring system is configured to send a specific communication signal only once.

9. The optical sensor device as claimed in claim 8, characterized in that, The clock signal is adjusted by using the first mode, in which the actual frequency of the clock signal is calibrated in response to signal events of a first communication signal repeatedly sent by the monitoring system coupled to the optical sensor device from the outside and received by the optical sensor device. In addition, in the first mode, the clock signal is calibrated based on the number of transmissions of the first communication signal or based on the interval between two transmissions of the first communication signal.

10. The optical sensor device as claimed in claim 9, characterized in that, In the first mode, the interval between the two transmissions of the first communication signal is equal to a specific time period; the processor is configured to use the actual frequency of the clock signal to count the interval between the two receptions of the first communication signal received by the processor to generate a count value; and the processor is configured to compare the count value with a count reference value to determine whether the actual frequency of the clock signal needs to be calibrated.

11. The optical sensor device as claimed in claim 10, characterized in that, The processor calculates an average count value based on multiple count values ​​and compares the average count value with the count reference value to determine whether the actual frequency of the clock signal needs to be calibrated.

12. The optical sensor device as claimed in claim 10, characterized in that, The clock signal is calibrated in response to another event, which refers to a second communication signal that is repeatedly sent by the monitoring system externally coupled to the optical sensor device and received by the optical sensor device. Furthermore, the last transmission of the first communication signal and the first transmission of the second communication signal are separated by an interval different from the specific time period.

13. The optical sensor device as claimed in claim 9, characterized in that, The first communication signal is a confirmation signal sent by the monitoring system, which indicates that the monitoring system exits the power-saving mode and enters the normal operation mode.

14. The optical sensor device as claimed in claim 8, characterized in that, The clock signal is adjusted by using a second mode in which the actual frequency of the clock signal is calibrated in response to the data length of a first communication signal sent only once by the monitoring system externally coupled to the optical sensor device, or in response to the data length of the encoded data portion of the first communication signal sent only once.

15. The optical sensor device as claimed in claim 14, characterized in that, The processor is configured to use the actual frequency of the clock signal to count the data length of the first communication signal or the data length of the encoded data portion to generate a count value; and the processor is configured to compare the count value with a count reference value to determine whether the actual frequency of the clock signal needs to be calibrated.

16. The optical sensor device as claimed in claim 8, characterized in that, The processor automatically switches between the first mode and the second mode based on the communication status between the optical sensor device and the monitoring system.

17. The optical sensor device as claimed in claim 16, characterized in that, When the processor determines that the communication condition is below a threshold, the processor will determine to use and operate in the second mode, in which the clock signal is calibrated in response to the data length of the first communication signal sent only once by the monitoring system coupled to the optical sensor device from the outside, or in response to the data length of the encoded data portion of the first communication signal sent only once.

18. The optical sensor device as claimed in claim 8, characterized in that, The processor switches between the first mode and the second mode in response to events associated with manual adjustments by the user.

19. A method for using an optical sensor device, characterized in that, Including: Use an oscillator circuit to generate a clock signal; and Multiple monitoring frames are generated based on the clock signal; The clock signal calibration is in response to at least one of the following: a first communication signal that is transmitted multiple times from a monitoring system externally coupled to the optical sensor device and received by the optical sensor device; the data length of the first communication signal that is transmitted only once from the monitoring system externally coupled to the optical sensor device; and the data length of the encoded data portion of the first communication signal that is transmitted only once.

20. The method as described in claim 19, characterized in that, The clock signal is calibrated based on the number of transmissions of the first communication signal or the interval between two transmissions of the first communication signal.