Data table configuration
After configuring the environment, you can begin the recommendation solution customization. To update an existing solution, click Update Solution. Recommendation solution customization is a guided workflow that starts with data table configuration. In this step, you add a behavior log table, a user table, and an item table. The configuration for the real-time behavior log table, used for real-time feature calculation, is skipped in this step.
1. Add behavior log table
On the Create Configuration page, set Table Type to Behavior Log Table. For Behavior Table Name, select rec_sln_demo_behavior_table. For Time-based Partition, select the ds field and set its format to yyyymmdd. Expand the Behavior Information Configuration section and configure the following fields: set Request ID to request_id, Behavior Event to event, and Behavior Event Enumeration Values to expr,click,praise. Set Behavior Value to playtime, Behavior Timestamp to event_time, and Timestamp Format to unixtime. Finally, set Behavior Scenario to page and Key Scenario Enumeration Values to scene.
Behavior information configuration
-
Behavior Table Name: Select the behavior log table that you have registered.
-
Time-based Partition: The partitioning field of the behavior table.
-
Request ID: The request ID field from the behavior log. This field is optional. If provided, it affects the accuracy of samples, simulated real-time features, and real-time sequence features.
-
Behavior Event: The field that indicates the type of behavior.
-
Behavior Event Enumeration Values: The enumerated values for the behavior event, such as impression, click, add-to-cart, or purchase.
-
Behavior Value: The field that indicates the depth of a behavior, such as the transaction price or watch duration.
-
Behavior Timestamp: The time when the log was generated. This is typically a 10-digit Unix timestamp, accurate to the second. You may need to specify the format in special cases.
-
Timestamp Format: Used in conjunction with the behavior timestamp.
-
Behavior Scenario: The field that indicates the scenario where the log was generated, such as the homepage, search page, or product details page.
-
Key Scenario Enumeration Values: Important values from the behavior scenario field. These can be used in downstream feature configurations.
The user information configuration form contains the following fields: User ID (user_id), where you select the user ID field; User Categorical Feature (user_category_field), where you enter categorical features such as net_type; User Numeric Feature (user_numeric_field); User Tag Feature (user_tag_field); and User IP Address (ip). Click Add to configure a User Text Feature (requires a feature name and delimiter) and a User Key-value Feature (requires a feature name and key field name).
User-side fields
-
User ID: The identifier for the user in the behavior table.
-
User Categorical Feature: User-side categorical features in the behavior table, such as network type, operating system, or gender.
-
User Numeric Feature: User-side numeric features in the behavior table, such as the number of followers or posts.
-
User Tag Feature: User-side multi-value categorical features in the behavior table, such as hobbies.
-
User IP Address: The user's IP address, if available in the behavior log. If provided, the system automatically resolves the IP address into categorical features such as country, province, and city in downstream processing.
-
User Text Feature: User-side text features that may exist in the behavior table.
-
User Key-value Feature: User-side, weighted multi-value categorical features that may exist in the behavior table.
Item-side field configuration in the behavior table includes the following fields: Item ID (item_id, required), Item Categorical Feature (item_category_field), Item Numeric Feature (item_numeric_field), and Item Tag Feature (item_tag_field). Click Add to configure an Item Text Feature (item_text_field), which requires a feature name and delimiter, or an Item Key-value Feature (item_kv_field), which requires a feature name and key field name.
Item-side fields
-
Item ID: The identifier for the item in the behavior table.
-
We recommend that you do not configure the following features on the item side of the behavior table. Instead, configure them in the item table. If you configure these features here, you must pass the item features when making requests to the EasyRec processor inference service.
-
Item Categorical Feature: Item-side categorical features in the behavior table, such as category.
-
Item Numeric Feature: Item-side numeric features in the behavior table, such as view count.
-
Item Tag Feature: Item-side multi-value categorical features in the behavior table, such as size.
-
Item Text Feature: Item-side text features that may exist in the behavior table, such as title.
-
Item Key-value Feature: Item-side, weighted multi-value categorical features that may exist in the behavior table.
-
In the Other Configurations section, set the Tag Feature Delimiter (tag_separator) (default is |), Table Lifecycle (lifecycle), and DataWorks Node Name (node_name), then click OK.
Other fields
-
Tag Feature Delimiter: If user or item tag features exist, specify the correct delimiter for these multi-value features. The default is a vertical bar (
|). A comma (,) or semicolon (;) can also be used. -
Table Lifecycle: If specified, the behavior table is retained for the configured period. If left blank, the generated table inherits the lifecycle of its upstream table.
-
DataWorks Node Name: If specified, this name is used for the dependency node. If left blank, the dependency node name defaults to the behavior table name.
2. Add user table
In the Create Configuration dialog box, select a User Table Name. Fill in core fields such as Time-based Partition, User ID, and Registration Timestamp. Set Timestamp Format to unixtime (for a 10-digit Unix timestamp) and enter | (vertical bar) for Tag Feature Delimiter.
-
User Table Name: Select the user table that you have registered.
-
Time-based Partition: The partitioning field of the user table.
-
User ID: The user ID field in the user table.
-
Registration Timestamp: The time of user registration. This is typically a 10-digit Unix timestamp, accurate to the second. You may need to specify the format in special cases.
-
Timestamp Format: Used in conjunction with the registration timestamp configuration.
-
Categorical Feature: Categorical fields in the user table, such as gender, age group, or city.
-
Numeric Feature: Numeric fields in the user table, such as number of posts or points.
-
Tag Feature: Multi-value categorical fields, separated by the tag feature delimiter.
-
User IP Address: The IP address field, if available in the user table. Downstream processes automatically resolve it into province and city information.
-
Key-value Feature: Multi-value user features with a delimiter.
-
Embedding Feature: Embedding features associated with the user.
3. Add item table
In the item information configuration form, select item_id for Item ID, author for Owner ID, and pub_time for Release Timestamp. Enter unixtime for Timestamp Format. Select category for Categorical Feature. For Numeric Feature, select fields such as click_count, praise_count, and duration. Enter | for the Tag Feature Delimiter. For Text Feature, click Add and enter title as the feature name.
-
Item Table Name: Select the item table that you have registered.
-
Time-based Partition: The partitioning field of the item table.
-
Item ID: The item ID field in the item table.
-
Owner ID: The owner of the item.
-
Release Timestamp: The time the item was listed. This is typically a 10-digit Unix timestamp, accurate to the second. You may need to specify the format in special cases.
-
Timestamp Format: Used in conjunction with the release timestamp configuration.
-
Categorical Feature: Categorical fields in the item table, such as category.
-
Numeric Feature: Numeric fields in the item table, such as price, cumulative sales, or like count. Note: If a field represents a cumulative value, this data must be updated daily to be used for daily features.
-
Tag Feature: Multi-value categorical fields, separated by the tag feature delimiter.
-
Text Feature: Text features of the item, such as title or description.
-
Key-value Feature: Multi-value item features with a delimiter.
-
Embedding Feature: Embedding features associated with the item.