Oratis commited on
Commit
d185f62
·
verified ·
1 Parent(s): 13caebd

frames/events 补齐时间坐标:QPC 对齐窗口 + 段内/run 内相对时间 + 估算墙钟

Browse files
README.md CHANGED
@@ -117,6 +117,44 @@ metadata/sessions/ per-session session.json
117
  | `mean_bitrate_bps` | int64 | mean video bitrate |
118
  | `run_state`, `run_stop_reason` | string | run outcome |
119
  | `non_trainable`, `production_certified` | bool | compliance flags, verbatim |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
120
 
121
  ### `frames` fields
122
 
@@ -126,6 +164,10 @@ One row per rendered frame, aligned to the video by `video_t_us`.
126
  |---|---|---|
127
  | `frame`, `session_frame` | int32 | index within segment / within session |
128
  | `video_t_us` | int64 | presentation timestamp, µs from segment start |
 
 
 
 
129
  | `keys` | list[int32] | Windows virtual-key codes held on this frame |
130
  | `actions` | list[string] | semantic actions from the mapping (see below) |
131
  | `pointer_dx`, `pointer_dy` | int32 | relative mouse delta for this frame |
@@ -148,6 +190,9 @@ Raw input stream at full device resolution — finer-grained than the per-frame
148
  |---|---|---|
149
  | `seq` | int64 | monotonic sequence within the run |
150
  | `qpc` | int64 | high-resolution timebase tick (10 MHz) |
 
 
 
151
  | `type` | string | event kind (see mix below) |
152
  | `device` | string | salted per-device hash, e.g. `mouse:0b5c…` — not reversible |
153
  | `vk`, `scan_code`, `flags` | int32 | keyboard event detail |
 
117
  | `mean_bitrate_bps` | int64 | mean video bitrate |
118
  | `run_state`, `run_stop_reason` | string | run outcome |
119
  | `non_trainable`, `production_certified` | bool | compliance flags, verbatim |
120
+ | `qpc_start`, `qpc_end` | int64 | segment bounds on the capture timebase |
121
+ | `run_anchor_qpc`, `qpc_frequency` | int64 | the run's timebase origin and tick rate (10 MHz) |
122
+ | `run_t_us` | int64 | segment start, µs since the run anchor |
123
+ | `t_utc_est` | timestamp[µs, UTC] | segment start, estimated wall clock (see *Time model*) |
124
+
125
+ ## Time model
126
+
127
+ Three coordinates are carried on **both** the `frames` and `events` tables, so neither
128
+ has to be reconstructed from the other:
129
+
130
+ | coordinate | scope | use it for |
131
+ |---|---|---|
132
+ | `qpc` / `output_qpc_start`,`output_qpc_end` | run | the authoritative timebase: a 10 MHz monotonic tick |
133
+ | `video_t_us` | segment | seeking inside the segment's mp4; the coordinate the video itself uses |
134
+ | `run_t_us` | run | comparing across segments, which `video_t_us` cannot do |
135
+ | `t_utc_est` | absolute | wall clock — **an estimate**, see the caveat below |
136
+
137
+ **Attributing an event to a frame** is a half-open interval on the capture timebase:
138
+
139
+ ```python
140
+ frame_events = events[(events.qpc >= frame.output_qpc_start) &
141
+ (events.qpc < frame.output_qpc_end)]
142
+ ```
143
+
144
+ Frame windows tile the segment with no gaps, each spanning exactly one frame period.
145
+ The same attribution is also precomputed in `frames.frame_events_json` — but note that
146
+ the precomputed view is a **state-change** view: keyboard auto-repeat (the stream of
147
+ `key_down` events the OS emits while a key is held) is collapsed there, because `keys`
148
+ already carries the held state. The `events` table is the raw stream and keeps every
149
+ repeat, so it holds more rows than `sum(num_frame_events)`.
150
+
151
+ > **`t_utc_est` is derived, not recorded.** The capture output contains no wall clock
152
+ > anywhere; this column is reconstructed per session from the epoch-ms embedded in the
153
+ > session id, anchored at the run's timebase origin. Across the session-to-session
154
+ > intervals in this corpus the reconstruction holds to ±0.06 s, but it carries an
155
+ > unknown *constant* bias — the delay between session creation and the first captured
156
+ > frame. Treat it as an estimate for ordering and coarse dating, never as a recorded
157
+ > capture timestamp.
158
 
159
  ### `frames` fields
160
 
 
164
  |---|---|---|
165
  | `frame`, `session_frame` | int32 | index within segment / within session |
166
  | `video_t_us` | int64 | presentation timestamp, µs from segment start |
167
+ | `run_t_us` | int64 | µs from the run anchor — use this to compare across segments |
168
+ | `t_utc_est` | timestamp[µs, UTC] | estimated wall clock (see *Time model*) |
169
+ | `output_qpc_start`, `output_qpc_end` | int64 | half-open event-aggregation window for this frame |
170
+ | `source_qpc`, `source_seq` | int64 | the observation this frame actually came from; a duplicate frame reuses the previous source |
171
  | `keys` | list[int32] | Windows virtual-key codes held on this frame |
172
  | `actions` | list[string] | semantic actions from the mapping (see below) |
173
  | `pointer_dx`, `pointer_dy` | int32 | relative mouse delta for this frame |
 
190
  |---|---|---|
191
  | `seq` | int64 | monotonic sequence within the run |
192
  | `qpc` | int64 | high-resolution timebase tick (10 MHz) |
193
+ | `video_t_us` | int64 | µs from segment start — the same coordinate `frames` uses |
194
+ | `run_t_us` | int64 | µs from the run anchor |
195
+ | `t_utc_est` | timestamp[µs, UTC] | estimated wall clock (see *Time model*) |
196
  | `type` | string | event kind (see mix below) |
197
  | `device` | string | salted per-device hash, e.g. `mouse:0b5c…` — not reversible |
198
  | `vk`, `scan_code`, `flags` | int32 | keyboard event detail |
data/events.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e5847b96f66e802599f57a6c26a5eaa26ebd4a4b56a8c12e328e10e1465b9e01
3
- size 3918195
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6b844d99fb13e760994abf5e73571427bc255c986c7ba1c3fe0afd51774dd85d
3
+ size 9326061
data/frames.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c6444250c213444c90737c6546f142b4d13406c53fea6fe58e3fded3aae44bee
3
- size 2960564
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:879c3e2d1608cd00888fe4f0c82690936dd837511957b4ba5fbdb05ff9c099db
3
+ size 9541348
data/segments.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ee15f0cf26068a34f4931f36f20fddfc11bfee3cbad665729a699cb51a6791f3
3
- size 154779
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:df55a33bc12103c74789f602c3d21c294785535691d7f02452559887a4ad0f54
3
+ size 198731