以下部分介绍了 Vertex AI Feature Store(旧版)数据模型,以及用于描述 Vertex AI Feature Store(旧版)资源和组件的术语。
Vertex AI Feature Store(旧版)数据模型
Vertex AI Feature Store(旧版)使用时间序列数据模型来存储一系列特征值。此模型使 Vertex AI Feature Store(旧版)能够在特征值随时间变化时保留它们。Vertex AI Feature Store(旧版)按以下顺序分层整理资源:Featurestore -> EntityType -> Feature。您必须先创建这些资源,然后才能将数据导入到 Vertex AI Feature Store(旧版)。
例如,假设您使用以下来自 BigQuery 表的示例源数据。此源数据与影片及其特征有关。
在将数据导入到 Vertex AI Feature Store(旧版)之前,您需要创建一个特征存储区,该特征存储区是其他所有资源的顶层容器。在特征存储区中,创建实体类型以分组和包含相关特征。然后,您可以创建特征以映射到源数据中的特征。实体类型和特征的名称可以反映列标题名称,但这不是必需的。
在此示例中,movie_id 列标题可以映射到实体类型 movie。average_rating、title 和 genre 是 movie 实体类型的特征。每一列中的值映射到实体类型的特定实例或特征(称为实体和特征值)。
实体类型是一组语义上相关的特征。您可以根据与用例相关的概念定义自己的实体类型。例如,影片服务可能具有实体类型 movie 和 user,可对与影片或客户对应的相关特征进行分组。
实体
实体是实体类型的实例。例如,movie_01 和 movie_02 是 movie 实体类型的实体。在特征存储区中,每个实体必须具有唯一 ID,并且必须是 STRING 类型。
特征
特征是实体类型的可衡量属性或特性。例如,movie 实体类型具有 average_rating 和 title 等特征,用于跟踪影片的各种属性。特征与实体类型相关联。在一个给定的实体类型中,特征必须互不相同,但特征不需要是全局唯一的。例如,如果您为两个不同的实体类型使用 title,Vertex AI Feature Store(旧版)会将 title 解释为两个不同的特征。读取特征值时,您需要在请求中提供特征及其实体类型。
创建特征时,您需要指定其值类型,例如 BOOL_ARRAY、DOUBLE、DOUBLE_ARRAY 和 STRING。此值决定了您可以为特定特征导入的值类型。如需详细了解受支持的值类型,请参阅 API 参考文档中的 valueType。
特征值
Vertex AI Feature Store(旧版)会在特定时间点捕获特征值。换言之,给定实体和特征可以具有多个值。例如,movie_01 实体可以具有多个 average_rating 特征值。该值在某个时间可以是 4.4,而在稍后某个时间可以是 4.8。Vertex AI Feature Store(旧版)会将元组标识符与每个特征值(entity_id、feature_id、timestamp)相关联,以供 Vertex AI Feature Store(旧版)在传送时用来查询值。
尽管时间是连续的,但 Vertex AI Feature Store(旧版)存储离散值。当您在 t 时请求特征值,Vertex AI Feature Store(旧版)会返回 t 当时或之前的最新存储值。例如,如果 Vertex AI Feature Store(旧版)存储了一辆汽车在时间 100 和 110 的位置信息,那么时间 100 的位置将用于 100(含)到 110(不含)之间的所有时间的请求。如果您需要更高的分辨率,则可以推断值之间的位置或提高数据的采样率。
特征导入
特征导入是将特征工程作业计算的特征值导入特征存储区的过程。在导入数据之前,您必须在特征存储区中定义相应的实体类型和特征。Vertex AI Feature Store(旧版)提供批量导入和流式导入功能,您可以批量或实时添加特征值。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-04。"],[],[],null,["# Data model and resources\n\nThe following sections introduce the Vertex AI Feature Store (Legacy) data model\nand terminology that is used to describe Vertex AI Feature Store (Legacy)\nresources and components.\n\nVertex AI Feature Store (Legacy) data model\n-------------------------------------------\n\nVertex AI Feature Store (Legacy) uses a time series data model to store a\nseries of values for features. This model enables\nVertex AI Feature Store (Legacy) to maintain feature values as they change\nover time. Vertex AI Feature Store (Legacy) organizes resources hierarchically\nin the\nfollowing order: `Featurestore -\u003e EntityType -\u003e Feature`. You must create these\nresources before you can import data into Vertex AI Feature Store (Legacy).\n\nAs an example, assume that you have the following sample source data from a\nBigQuery table. This source data is about movies and their features.\n\nBefore you can import this data into Vertex AI Feature Store (Legacy), you\nneed to create a *featurestore* , which is a top-level container for all other\nresources. In the featurestore, create *entity types* that group and contain\nrelated features. You can then create features that map to features in your\nsource data. The names of the entity type and features can mirror the column\nheader names, but that is not required.\n\nIn this example, the `movie_id` column header can map to an entity type\n`movie`. The `average_rating`, `title`, and `genre` are features of the\n`movie` entity type. The values in each column map to specific instances of an\nentity type or features, which are called *entities* and *feature values*.\n\nThe timestamp column indicates when the feature values were generated. In the\nfeaturestore, the timestamps are an attribute of the feature values, not a\nseparate resource type. If all feature values were generated at the same time,\nyou are not required to have a timestamp column. You can specify the timestamp\nas part of your import request.\n\n### Featurestore\n\nA featurestore is the top-level container for entity types, features, and\nfeature values. Typically, an organization creates one shared featurestore to\nimport, serve, and share features across all teams in the organization.\nHowever, sometimes you might choose to create multiple featurestores within\nthe same project to isolate environments. For example, you might have separate\nfeaturestores for experimentation, testing, and production.\n| **Note:** Featurestore is the name of the resource and Vertex AI Feature Store (Legacy) is a component of Vertex AI.\n\n### Entity type\n\nAn entity type is a collection of semantically related features. You define your\nown entity types, based on the concepts that are relevant to your use case. For\nexample, a movie service might have the entity types `movie` and `user`,\nwhich group related features that correspond to movies or customers.\n\n### Entity\n\nAn entity is an instance of an entity type. For example, `movie_01` and\n`movie_02` are entities of the entity type `movie`. In a\nfeaturestore each entity must have a unique ID and must be of type `STRING`.\n\n### Feature\n\nA feature is a measurable property or attribute of an entity type. For example,\nthe `movie` entity type has features such as `average_rating` and `title` that\ntrack various properties of movies. Features are associated with entity types.\nFeatures must be distinct within a given entity type, but they don't need\nto be globally unique. For example, if you use `title` for two different entity\ntypes, Vertex AI Feature Store (Legacy) interprets `title` as two different\nfeatures. When reading feature values, you provide the feature and its entity\ntype as part of the request.\n\nWhen you create a feature, you specify its value type such as `BOOL_ARRAY`,\n`DOUBLE`, `DOUBLE_ARRAY`, and `STRING`. This value determines what value types\nyou can import for a particular feature. For more information about the\nsupported value types, see the `valueType` in the\n[API reference](/vertex-ai/docs/reference/rest/v1/projects.locations.featurestores.entityTypes.features).\n\n### Feature value\n\nVertex AI Feature Store (Legacy) captures feature values for a feature at a\nspecific point in time. In other words, you can have multiple values for a given\nentity and feature. For example, the `movie_01` entity can have multiple feature\nvalues for the `average_rating` feature. The value can be `4.4` at one time and\n`4.8` at some later time. Vertex AI Feature Store (Legacy) associates a tuple\nidentifier with each feature value (`entity_id`, `feature_id`, `timestamp`),\nwhich Vertex AI Feature Store (Legacy) uses to look up values at serving time.\n\nVertex AI Feature Store (Legacy) stores discrete values even though time is\ncontinuous. When you request a feature value at time `t`,\nVertex AI Feature Store (Legacy) returns the latest stored value at or before\ntime `t`. For example, if the Vertex AI Feature Store (Legacy) stores the\nlocation information of a car at times `100` and `110`, the location at time\n`100` is used for requests at all times between `100` (inclusive) and `110`\n(exclusive). If you require higher resolution, you can, for example, infer the\nlocation between values or increase the sampling rate of your data.\n\nFeature import\n--------------\n\nFeature import is the process of importing feature values computed by your\nfeature engineering jobs into a featurestore. Before you can import data, the\ncorresponding entity type and features must be defined in the featurestore.\nVertex AI Feature Store (Legacy) offers batch and streaming import, letting\nyou add feature values in bulk or in real time.\n\nFor example, you might have computed source data that live in locations such as\nBigQuery or Cloud Storage. You can batch import data\nfrom those sources into a central featurestore so that those feature values can\nbe served in a uniform format. As your source data changes, you can use\nstreaming import to quickly get those changes into your featurestore. That\nway, you have the latest data available for online serving scenarios.\n\nFor more information, see [Batch import feature\nvalues](/vertex-ai/docs/featurestore/ingesting-batch) or [Streaming\nimport](/vertex-ai/docs/featurestore/ingesting-stream).\n\nFeature serving\n---------------\n\nFeature serving is the process of exporting stored feature values for training\nor inference. Vertex AI Feature Store (Legacy) offers two methods for serving\nfeatures: batch and online. Batch serving is for high throughput and serving\nlarge volumes of data for offline processing (like for model training or batch\npredictions). Online serving is for low-latency data retrieval of small batches\nof data for real-time processing (like for online predictions).\n\nFor more information, see [online](/vertex-ai/docs/featurestore/serving-online) or\n[batch](/vertex-ai/docs/featurestore/serving-batch) serving.\n\n### Entity view\n\nWhen you retrieve values from a featurestore, the service returns an *entity\nview* that contains the feature values that you requested. You can think of an\nentity view as a projection of the features and values that\nVertex AI Feature Store (Legacy) returns from an online or batch serving\nrequest:\n\n- For online serving requests, you can get all or a subset of features for a particular entity type.\n- For batch serving requests, you can get all or a subset of features for one or more entity types. For example, if features are distributed across multiple entity types, you can retrieve them together in a single request, which joins those features together. You can then use the results to feed to a machine learning or batch prediction request.\n\nExport data\n-----------\n\nVertex AI Feature Store (Legacy) lets you export data from your featurestores\nso that you can backup and archive feature values. You can choose to export the\nlatest feature values (snapshot) or a range of values (full export). For more\ninformation, see [Export feature values](/vertex-ai/docs/featurestore/export-features).\n\nWhat's next\n-----------\n\n- Learn about [setting up your project](/vertex-ai/docs/featurestore/setup) for Vertex AI Feature Store (Legacy).\n- Learn about [source data requirements](/vertex-ai/docs/featurestore/source-data)."]]