Video recommendation
AIREC analyzes user profiles, video metadata, and interaction signals to generate personalized video recommendations. Provide fields in the user, item, and behavior tables below to improve recommendation quality.
Field names in the following tables are suggestions — your actual names do not need to match. You can include additional fields not listed here; more fields generally produce better results.
Field priority
Not all fields contribute equally to recommendation quality. Use this priority guide to decide which fields to integrate first:
| Priority | Fields | Impact |
|---|---|---|
| Required | user_id, item_id, event, event_value, timestamp, scene |
Without these, the system cannot build or serve recommendations. |
| High-value optional | event types (exposure, click, watch), event_value (watch duration), interests, tags, category, video_type, duration |
These behavioral and content signals have the strongest effect on recommendation relevance. |
| Additional optional | Demographic fields (age, gender, occupation), device fields (device_type, os, browser), location fields (country, province, city) | Adding these fields improves personalization further, especially for cold-start users. |
Start with all required fields. Then add high-value optional fields based on the data you already collect. Demographic and device fields are worth adding if your data pipeline already captures them.
User table
| Field | Type | Required | Description |
|---|---|---|---|
user_id |
Integer or String | Yes | Unique identifier for the user. |
age |
Integer | No | User age. Segment into ranges (for example, 0–12, 12–18, 18–24, 25–34) and use as a categorical feature via discretization. |
gender |
String | No | User gender. Use values such as male and female, or integers 0, 1, and 2, as categorical features. |
occupation |
String | No | User occupation. Values such as student, teacher, and engineer work as categorical features. |
education |
String | No | User educational background. Values such as senior high school, undergraduate, and master work as categorical features. |
income |
Integer or String | No | User income level. Values such as low, medium, and high work as categorical features. |
user_level |
Integer or String | No | User level or membership tier on your platform. |
register_time |
Timestamp | No | Unix timestamp (seconds) of account registration. Segment by year, month, and day; convert to categorical features via discretization. |
country |
String | No | Country where the user is located. Use as a categorical feature. |
province |
String | No | Province where the user is located. Use as a categorical feature. |
city |
String | No | City where the user is located. Use as a categorical feature. |
active_time |
Integer or String | No | Period during which the user is typically active. Values such as morning, afternoon, and evening work as categorical features. |
device_type |
String | No | Device type used by the user. Values such as PC, mobile phone, and tablet work as categorical features. |
os |
String | No | Operating system of the user's device. Values such as iOS, Android, and Windows work as categorical features. |
browser |
String | No | Browser used by the user. Values such as Google Chrome, Firefox, and Safari work as categorical features. |
language |
String | No | Preferred language of the user. Values such as English, Chinese, and Spanish work as categorical features. |
interests |
String | No | User interest tags. Values such as sports, music, and travel work as tag features. Separate multiple values with commas (,). |
Item table
| Field | Type | Required | Description |
|---|---|---|---|
item_id |
Integer or String | Yes | Unique identifier for the video. |
category |
String | No | Main category of the video. Use as a categorical feature. |
leaf_category |
String | No | Sub-category of the video. Use as a categorical feature. |
brand |
String | No | Brand or production company associated with the video. Use as a categorical feature. |
video_type |
String | No | Type of video content. Values such as movie, TV series, documentary, and short film work as categorical features. |
duration |
Integer | No | Video duration. Discretize into ranges (for example, shorter than 10 minutes, 10–30 minutes, longer than 30 minutes) for use as categorical features. |
title |
String | No | Title of the video. |
series_name |
String | No | Series title the video belongs to (for example, Journey to the West). Use together with series_total_number and series_number to model episodic content. |
series_total_number |
Integer | No | Total number of episodes in the series. |
series_number |
Integer | No | Episode number within the series. For example, 1 indicates the first episode. |
release_date |
Timestamp | No | Unix timestamp (seconds) of the video's release date. Use as a numerical feature. |
director |
String | No | Director of the video. |
actors |
String | No | Main cast of the video. Separate multiple names with commas (,). Use as tag features. |
rating |
Float | No | Video rating score (for example, an IMDb or Douban rating). Use as a numerical feature. |
language |
String | No | Original language of the video. Values such as English, Chinese, and Japanese work as categorical features. |
has_subtitle |
Integer | No | Whether the video has subtitles. |
region |
String | No | Region where the video was produced. Values such as Hollywood, Bollywood, and Chinese mainland work as categorical features. |
tags |
String | No | Content tags for the video. Values such as comedy, action, and love work as tag features. Separate multiple values with commas (,). |
Behavior table
Collect user behaviors from all surfaces — recommendation feeds, hot-items lists, and search results — not just the recommendation scenario. Behaviors from other surfaces, such as search clicks and organic browsing, also reflect user preferences and improve model training.
| Field | Type | Required | Description |
|---|---|---|---|
user_id |
Integer or String | Yes | Unique identifier for the user. |
item_id |
Integer or String | Yes | Unique identifier for the video. |
event |
String | Yes | Type of user interaction. Values such as exposure, click, and like work as categorical features. |
event_value |
Numeric | Yes | Numeric value associated with the event. When event is watch, this field indicates the watch duration in seconds. |
timestamp |
Timestamp | Yes | Unix timestamp (seconds) of when the behavior occurred. Segment by hour, day of week, or holiday for use as categorical features. |
scene |
String | Yes | Surface where the behavior occurred. Use home_feed for the homepage recommendation feed, hot_items for the popular-items list, and search for the search scenario (which also requires the query field). This field is required for all scenarios. |
request_id |
String | No | Unique ID of the recommendation request that served this impression. Omitting this field reduces the accuracy of training samples and real-time feature generation. New scenarios do not require it initially, but add request_id and update your training sample code before running model training. |
query |
String | No | Search query string. Required when scene is search. |
device_type |
String | No | Device type used by the user. Values such as PC, mobile phone, and tablet work as categorical features. |
browser |
String | No | Browser used by the user. Values such as Google Chrome, Firefox, and Safari work as categorical features. |
mobile_brand |
String | No | Mobile phone brand used by the user. Use as a categorical feature. |
os |
String | No | Operating system of the user's device. Values such as iOS, Android, and Windows work as categorical features. |
ip |
String | No | IP address of the user. Used to infer province and city. Use as a categorical feature. |
rating |
Decimal | No | User-provided rating for the video (for example, 8.5 out of 10). |
weather |
String | No | Weather condition at the time of the behavior. Values such as sunny, rainy, and snowy work as categorical features. |
holiday |
Boolean | No | Whether the behavior occurred during a holiday. Values such as Spring Festival and National Day work as categorical features. |
season |
String | No | Season during which the behavior occurred. Values such as spring, summer, autumn, and winter work as categorical features. |
longitude |
Float | No | Longitude of the user's location. Use as a numerical feature, or discretize for categorical use. |
latitude |
Float | No | Latitude of the user's location. Use as a numerical feature, or discretize for categorical use. |