US-20260129288-A1 - INDICATING CLOCK DRIFT OF AN INTERNAL CLOCK IN A SENSOR DEVICE
Abstract
A method for indicating clock drift of an internal clock comprised in a sensor device comprises: capturing, by the sensor device, first data frame; associating, by the sensor device, the first data frame with a first point in time indicating a point in time of the internal clock when the first data frame being captured; receiving, by the sensor device via a network protocol for clock synchronization, time synchronisation data; determining, by the sensor device using the time synchronisation data, a reference point in time indicating a point in time of a reference clock when the first data frame being captured; determining, by the sensor device, an offset between the first point in time and the reference point in time; and upon the offset exceeding a threshold offset, associating, by the sensor device, the first data frame with data indicating the offset.
Inventors
- Andreas Bank
- Christian Storm
Assignees
- AXIS AB
Dates
- Publication Date
- 20260507
- Application Date
- 20251017
- Priority Date
- 20241106
Claims (15)
- 1 . A method for indicating clock drift of an internal clock comprised in a sensor device, the method comprising: capturing, by the sensor device, a first data frame; associating, by the sensor device, the first data frame with a first point in time indicating a point in time of the internal clock when the first data frame being captured; receiving, by the sensor device via a network protocol for clock synchronization, time synchronisation data; determining, by the sensor device using the time synchronisation data, a reference point in time indicating a point in time of a reference clock when the first data frame being captured; determining, by the sensor device, an offset between the first point in time and the reference point in time; and upon the offset exceeding a threshold offset, associating, by the sensor device, the first data frame with data indicating the offset.
- 2 . The method of claim 1 , wherein the sensor device is a network camera, wherein the first data frame is a first image frame, and wherein associating, by the network camera, the first image frame with data indicating the offset comprises: adding graphical data visualizing the data indicating the offset to an overlay associated with the first image frame.
- 3 . The method of claim 1 , wherein associating, by the sensor device, the first data frame with data indicating the offset comprises adding the data indicating the offset as first metadata associated with the first data frame.
- 4 . The method of claim 3 , wherein the first metadata associated with the first data frame is provided as at least one of: data stream metadata, metadata added to a header of the first data frame, or a separate metadata stream.
- 5 . The method of claim 3 , further comprising: determining a signature using sensor data of the first data frame and the first metadata; and integrating the signature into a recording comprising the first data frame and the first metadata.
- 6 . The method of claim 1 , wherein associating, by the sensor device, the first data frame with the first point in time comprises: adding the first point in time as second metadata associated with the first data frame.
- 7 . The method of claim 1 , wherein the sensor device is a network camera, wherein the first data frame is a first image frame, and wherein associating, by the network camera, the first image frame with the first point in time comprises: adding graphical data visualizing the first point in time to an overlay associated with the first image frame.
- 8 . The method of claim 1 , further comprising: continuously capturing, by the sensor device, data frames; for each captured data frame, associating, by the sensor device, the captured data frame with a further point in time indicating a point in time of the internal clock when the captured data frame being captured; at predetermined intervals while continuously capturing the data frames: receiving, by the sensor device via the network protocol for clock synchronization, time synchronisation data; determining, by the sensor device using the time synchronisation data, a further reference point in time indicating a point in time of the reference clock when the latest captured data frame being captured; determining a further offset between the further point in time associated with the latest captured image frame and the further reference point in time; upon the further offset exceeding a threshold offset, associating, by the sensor device, the latest captured data frame with data indicating the further offset.
- 9 . The method of claim 1 , further comprising: adjusting the internal clock to reduce the offset, wherein the size of the adjustment is limited by a specification of the network protocol for clock synchronization.
- 10 . The method of claim 1 , further comprising: determining, at a device separate from the sensor device, an accurate point in time of the capturing of the first data frame using the first point in time and the data indicating the offset.
- 11 . The method of claim 10 , further comprising: determining, at the device separate from the sensor device, an accurate point in time of capturing of a second data frame using: a second point in time associated with the second data frame, the second point in time indicating a point in time of the internal clock of the sensor device when the second data frame being captured; and the data indicating the offset associated with the first data frame.
- 12 . A non-transitory computer-readable storage medium having stored thereon instructions for implementing the method, when executed on one or more devices having processing capabilities, the method for indicating clock drift of an internal clock comprised in a sensor device, the method comprising: capturing, by the sensor device, a first data frame; associating, by the sensor device, the first data frame with a first point in time indicating a point in time of the internal clock when the first data frame being captured; receiving, by the sensor device via a network protocol for clock synchronization, time synchronisation data; determining, by the sensor device using the time synchronisation data, a reference point in time indicating a point in time of a reference clock when the first data frame being captured; determining, by the sensor device, an offset between the first point in time and the reference point in time; and upon the offset exceeding a threshold offset, associating, by the sensor device, the first data frame with data indicating the offset.
- 13 . A sensor device configured for indicating clock drift of an internal clock comprised in the sensor device, the sensor device configured for: capturing a first data frame; associating the first data frame with a first point in time indicating a point in time of the internal clock when the first data frame being captured; receiving, via a network protocol for clock synchronization, time synchronisation data; determining, using the time synchronisation data, a reference point in time indicating a point in time of a reference clock when the first data frame being captured; determining an offset between the first point in time and the reference point in time; and upon the offset exceeding a threshold offset, associating the first data frame with data indicating the offset.
- 14 . A system comprising the sensor device of claim 13 and a device separate from the sensor device configured for: determining an accurate point in time of the capturing of the first data frame by the sensor device using the first point in time and the data indicating the offset.
- 15 . The system of claim 14 , wherein the device separate from the sensor device is further configured for: determining an accurate point in time of capturing of a second data frame by the sensor device using: a second point in time associated with the second data frame the second point in time indicating a point in time of the internal clock of the sensor device when the second data frame being captured; and the data indicating the offset associated with the first data frame.
Description
TECHNICAL FIELD The present invention relates to networked systems and time synchronization protocols, and in particular to methods, devices and systems for indicating clock drift of an internal clock in a sensor device. BACKGROUND In modern networked environments, sensor devices such as video cameras, and microphones, and other network-based sensor devices rely heavily on accurate timekeeping to ensure synchronized operations. These devices often utilize network protocols for clock synchronization, which allow them to regularly adjust their internal clocks to match a central time reference. This synchronization is critical for applications that depend on precise timestamping, such as video surveillance and event monitoring. One widely used protocol for clock synchronization is the Network Time Protocol (NTP). NTP enables devices to periodically adjust their clock frequency to gradually align with the NTP server's time, ensuring that the internal clock time remains accurate over time (i.e., achieves the same time value and average time-ticking speed as the NTP server). NTP and other similar protocols often have specific rules regarding how quickly devices adjust their clocks after detecting a discrepancy to avoid abrupt time shifts. For example, when devices are connected to the synchronization server, they may regularly make small adjustments to their internal clocks employing mechanisms such as slew adjustments, where the clock is gradually corrected over time to align with the server's time. This poses a problem when a device temporarily loses connection to the synchronization server, which can result from network issues, server downtime, or other interruptions. During this offline period, the sensor device's internal clock may begin to drift away from the correct time provided by the server. This drift can occur if the sensor's real-time clock (RTC) is malfunctioning, causing it to lose precision or accuracy over time. This issue is particularly problematic in applications where precise time alignment is critical, such as video surveillance. For instance, in multi-camera setups, if one or more cameras experience clock drift during a period of disconnection from the synchronization server, their clocks may continue to show different times even after reconnection. There is thus a need for improvements in this context. SUMMARY In view of the above, solving or at least reducing one or several of the drawbacks discussed above would be beneficial, as set forth in the attached independent patent claims. According to a first aspect of the present disclosure, there is provided a method for indicating clock drift of an internal clock comprised in a sensor device, the method comprising: capturing, by the sensor device, a first data frame; associating, by the sensor device, the first data frame with a first point in time indicating a point in time of the internal clock when the first data frame being captured; receiving, by the sensor device via a network protocol for clock synchronization, time synchronisation data; determining, by the sensor device using the time synchronisation data, a reference point in time indicating a point in time of a reference clock when the first data frame being captured; determining, by the sensor device, an offset between the first point in time and the reference point in time; and upon the offset exceeding a threshold offset, associating, by the sensor device, the first data frame with data indicating the offset. The present disclosure provides several advantages in indicating clock drift of an internal clock in a sensor device. For example, using the techniques described herein, recording and associating clock drift information with sensor data when the drift exceeds a predefined threshold (such as 0.5, 1, 2, 3, 6, etc., seconds) is facilitated. This ensures that systems implementing the techniques described herein maintains awareness of any significant time discrepancies, which later can be used to reconstruct the actual time of data frames, e.g., for event detection. Such recorded drift information may be thus used when synchronizing sensor data and/or events detected therein between different sensor devices where clock drift may differ. By having access to this drift data, operators, analysis systems, and post-processing tools, such as those used by law enforcement or security agencies, may adjust for time discrepancies and align events across multiple sensor devices, ensuring accurate time-based event reconstruction. Additionally, using the techniques described herein, data handling may be improved by avoiding the inclusion of unnecessary drift information when the drift is minimal and below the threshold. If the drift is small and insignificant, embedding this information may not provide any meaningful value, and the system can skip recording it. Such selective recording may reduce the overhead in both data storage and transmission, resulting in more efficient use of resources