主权项 |
1. A method comprising:
receiving time series data for a series of events, the time series data including data for an occurrence of an event, the data including one or more attributes of the event and a time at which the event occurred; generating a first key for the event and a second key for the event, each of the first key and second key being a composite key of a key-value database, wherein:
the first key includes a representation of the one or more attributes of the event and a representation of a first time window in which the event occurred, the first time window having a window start time and a first duration; andthe second key includes the representation of the one or more attributes of the event and a representation of a second time window in which the event occurred, the second time window having the same window start time and a second duration that is longer than the first duration; issuing a first command to store a representation of the occurrence of the event as a value in the key-value database in a first record that is associated with the first key, the first record being retrievable by a first query having a condition specifying a first time range that matches the first duration in length; and issuing a second command to store the occurrence of the event as a value in the key-value database in a second record that is associated with the second key, the second record being retrievable by a second query having a condition specifying a second time range that matches the second duration in length.
|