Time series(时间序列)¶

What is time series data?¶
Time series data are a series of measurements taken over time, usually at a regular interval.
Some examples of time series data include:
- Total flights per day
- Production outputs per hour
- High frequency temperature readings at sub-second resolution
You can visualize and analyze changes that occur over time using Foundry applications like Quiver, Vertex, and Workshop. Learn more about using time series in Foundry.
Process overview¶
To use your data for time series analysis, you must set up two major components: a time series object type and a time series sync.
The time series object type defines the metadata of your time series dataset and allows Foundry applications to access the underlying time series data. The time series sync is a resource backed by a dataset or a stream that indexes time series data and provides values for time series properties.

Store time series in the Ontology¶
There are two ways to set up time series object types in the Ontology. The most common method is to add a time series property (TSP) directly to the object type. This option should be used whenever all objects of that object type have time series data for that TSP. These object types should form the basis of your analyses or operations.
Learn more about creating a time series object type and configuring TSPs.

The second, more advanced configuration option is to set up a sensor object type that is linked to the root object type for which it records data. The root object type can also have other TSPs set up directly on itself, as discussed in the first option. This setup is useful when your organization has equipment with a high number of configuration options.
End-user applications throughout Foundry can fetch and display TSPs that live on an object type or on a linked sensor object in a unified view. If you run a search-around on an object for its linked sensor objects, you should return a set of sensors with unique sensor names. Since each sensor object is uniquely named, you can generally have a single sensor object type.
Read more about setting up sensor object types.

:::callout{theme="neutral"} In the first configuration option, you can add time series properties by adding additional columns to the time series object type backing dataset. In the second option, you can add more time series properties that are effectively linked to the root object type by adding additional rows to the time series object type backing dataset for the sensor object type. :::
In the example below, because there are values for Temperature for all the machines, we should set Temperature as a TSP on the Machine object type.

Since Flow rate is only relevant for certain machines, we recommend placing the TSP on a sensor object type. This will help prevent numerous null entries in the time series object type backing dataset.

Sensor object types¶
Sensor object types provide flexibility to your Ontology by allowing each object of an object type to have its own set of time series data, that is, one time series per linked sensor. Some other advantages to using sensor object types include the following:
- Create a more robust time series object type backing dataset.
- Maintain metadata, such as units or interpolation, for each specific sensor in one place.
- Link supplementary object types like alerts or annotations to the sensor object type for easier discoverability from any linked object.
For example, consider an Equipment object type, where each piece of Equipment may be either be a Pump or a Reactor. The former has a Pressure reading, and the latter has a Temperature reading. You could create separate Pump and Reactor object types, but the more generic Equipment object type may be a better choice. In this case, without sensor objects, Equipment objects would need to have two TSPs; however, only one of these would actually have time series data for a given piece of Equipment. As the specialization of the Equipment grows, you will need to manage the sensors with sensor object types to maintain legibility, that is, to not show mostly empty TSPs for each object.
When you configure a sensor object type, special metadata is applied to parts of your Ontology to indicate that this object type is a sensor and is recording data for the specified root object type. At a higher-level, frontend applications that want to load all relevant time series data for an object set perform the following actions:
- Fetch all TSPs on the object set.
- Conduct a search-around on the object set for any links with this special metadata.
- Fetch the sensor names for the linked sensor objects.
Learn more about accessing sensor object types in Quiver or using them to create derived series.
中文翻译¶
时间序列¶

什么是时间序列数据?¶
时间序列数据(time series data)是指随时间推移(通常以固定时间间隔)采集的一系列测量值。
时间序列数据的示例包括:
- 每日航班总数
- 每小时生产产出
- 亚秒级分辨率的高频温度读数
您可以使用 Quiver、Vertex 和 Workshop 等 Foundry 应用来可视化和分析随时间发生的变化。了解如何在 Foundry 中使用时间序列。
处理流程概览¶
要使用数据进行分析,您需要设置两个主要组件:时间序列对象类型(time series object type)和时间序列同步(time series sync)。
时间序列对象类型定义了时间序列数据集的元数据,并允许 Foundry 应用访问底层的时间序列数据。时间序列同步是一种由数据集或数据流支持的资源,用于索引时间序列数据并为时间序列属性提供值。

在 Ontology 中存储时间序列¶
在 Ontology 中设置时间序列对象类型有两种方式。最常见的方法是直接将时间序列属性(TSP)添加到对象类型中。当该对象类型的所有对象都具有该 TSP 的时间序列数据时,应使用此选项。这些对象类型应构成分析或操作的基础。
了解更多关于创建时间序列对象类型和配置 TSP 的信息。

第二种更高级的配置选项是设置一个传感器对象类型,该类型与记录数据的根对象类型(root object type)相关联。根对象类型也可以直接在其自身设置其他 TSP,如第一种选项所述。当您的组织拥有配置选项较多的设备时,这种设置非常有用。
整个 Foundry 中的终端用户应用可以获取并显示位于对象类型或关联传感器对象上的 TSP,并以统一视图呈现。如果您对某个对象执行搜索以查找其关联的传感器对象,应返回一组具有唯一传感器名称的传感器。由于每个传感器对象都有唯一名称,通常可以只使用一个传感器对象类型。

:::callout{theme="neutral"} 在第一种配置选项中,您可以通过向时间序列对象类型的支持数据集(backing dataset)添加额外的列来增加时间序列属性。在第二种选项中,您可以通过向传感器对象类型的时间序列对象类型支持数据集添加额外的行,来增加更多与根对象类型有效关联的时间序列属性。 :::
在以下示例中,由于所有机器都有温度值,因此应将温度设置为机器对象类型上的 TSP。

由于流速仅与某些机器相关,我们建议将 TSP 放置在传感器对象类型上。这将有助于避免时间序列对象类型支持数据集中出现大量空条目。

传感器对象类型¶
传感器对象类型(sensor object types)通过允许对象类型中的每个对象拥有自己的时间序列数据集(即每个关联传感器对应一个时间序列),为您的 Ontology 提供了灵活性。使用传感器对象类型的其他优势包括:
- 创建更健壮的时间序列对象类型支持数据集。
- 在单一位置维护每个特定传感器的元数据,例如单位或插值方式。
- 将警报或注释等补充对象类型关联到传感器对象类型,以便从任何关联对象中更轻松地发现。
例如,考虑一个设备对象类型,其中每台设备可能是泵或反应器。前者有压力读数,后者有温度读数。您可以创建单独的泵和反应器对象类型,但更通用的设备对象类型可能是更好的选择。在这种情况下,如果没有传感器对象,设备对象将需要拥有两个 TSP;然而,对于给定的设备,实际上只有一个 TSP 会包含时间序列数据。随着设备特化程度的增加,您需要使用传感器对象类型来管理传感器,以保持可读性,即避免为每个对象显示大部分为空的 TSP。
当您配置传感器对象类型时,特殊的元数据会被应用到 Ontology 的某些部分,以指示该对象类型是一个传感器,并且正在为指定的根对象类型记录数据。在更高层面上,希望加载对象集所有相关时间序列数据的前端应用会执行以下操作:
- 获取对象集上的所有 TSP。
- 在对象集上搜索具有此特殊元数据的任何关联。
- 获取关联传感器对象的传感器名称。
了解更多关于在 Quiver 中访问传感器对象类型或使用它们创建派生序列的信息。