實體類型是語意相關特徵的集合。您可以根據與用途相關的概念,自行定義實體類型。舉例來說,電影服務可能具有 movie 和 user 實體類型,這些類型會將對應電影或顧客的相關特徵分組。
實體
實體是實體類型的例項。舉例來說,movie_01 和 movie_02 是 movie 實體類型的實體。在特徵商店中,每個實體都必須有不重複的 ID,且類型必須為 STRING。
功能
特徵是實體類型的可量化屬性。舉例來說,movie 實體類型具有 average_rating 和 title 等特徵,可追蹤電影的各種屬性。特徵與實體類型相關聯。
特徵在特定實體類型中不得重複,但不必是全域唯一值。舉例來說,如果您對兩種不同的實體類型使用 title,Vertex AI 特徵儲存庫 (舊版) 會將 title 解讀為兩種不同的特徵。讀取特徵值時,您會在要求中提供特徵及其實體類型。
建立特徵時,您會指定特徵的值類型,例如 BOOL_ARRAY、DOUBLE、DOUBLE_ARRAY 和 STRING。這個值會決定特定特徵可匯入的值類型。如要進一步瞭解支援的值類型,請參閱 API 參考資料中的 valueType。
特徵值
Vertex AI 特徵儲存庫 (舊版) 會擷取特定時間點的特徵值。換句話說,您可以為特定實體和特徵設定多個值。舉例來說,movie_01 實體可以有多個 average_rating 特徵的特徵值。這個值可以先是 4.4,之後再設為 4.8。Vertex AI 特徵儲存庫 (舊版) 會將元組 ID 與每個特徵值 (entity_id、feature_id、timestamp) 建立關聯,Vertex AI 特徵儲存庫 (舊版) 會在服務期間使用這些 ID 查詢值。
即使時間是連續的,Vertex AI 特徵儲存庫 (舊版) 仍會儲存離散值。在時間 t 要求特徵值時,Vertex AI 特徵儲存庫 (舊版) 會傳回時間 t 之前或當時儲存的最新值。舉例來說,如果 Vertex AI 特徵儲存庫 (舊版) 儲存車輛在 100 和 110 時間點的位置資訊,則在 100 (含) 和 110 (不含) 之間的所有時間,系統都會使用 100 時間點的位置資訊來處理要求。如果需要更高解析度,可以推斷值之間的間隔,或提高資料的取樣率。
匯入特徵
特徵匯入是指將特徵工程工作計算出的特徵值匯入特徵儲存庫的程序。匯入資料之前,必須先在特徵商店中定義相應的實體類型和特徵。Vertex AI 特徵儲存庫 (舊版) 提供批次和串流匯入功能,可讓您大量或即時新增特徵值。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間: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)."]]