Live streaming recommendation
Build a live streaming recommendation model in AIRec by configuring three data tables: user, item (streamer), and behavior. Populate as many fields as possible for better results. Field names do not need to match exactly, and you can append additional fields.
The tables below list recommended fields for user, item, and behavior data. More complete data produces better recommendations. You can also add fields beyond those listed here, and field names do not need to match the names shown.
User table
The user table captures viewer demographics, device context, and preferences. Fields such as age, gender, and interests help the model segment audiences and match content to individual tastes.
| Field | Type | Required | Description |
|---|---|---|---|
user_id |
Integer or string | Yes | Unique identifier for the user. |
age |
Integer | No | User age. Segment into ranges (e.g., 0–12, 12–18, 18–24, 25–34) and convert to categorical features via discretization. |
gender |
String | No | User gender (e.g., male, female, other). Used as a categorical feature. |
occupation |
String | No | User occupation. Used as a categorical feature. |
education |
String | No | Educational background (e.g., high school, undergraduate, master's). Used as a categorical feature. |
income |
Integer or string | No | Income level (e.g., low, medium, high). Used as a categorical feature. |
user_level |
Integer or string | No | User level or membership tier on the platform. |
register_time |
Timestamp | No | Account registration time, in seconds. Segment by year, month, and day; convert to categorical features via discretization. |
country |
String | No | Country where the user is located. Used as a categorical feature. |
province |
String | No | Province where the user is located. Used as a categorical feature. |
city |
String | No | City where the user is located. Used as a categorical feature. |
active_time |
Integer or string | No | Time of day when the user is typically active (e.g., morning, afternoon, evening). Used as a categorical feature. |
device_type |
String | No | Device type (e.g., PC, mobile phone, tablet). Used as a categorical feature. |
os |
String | No | Operating system of the user's device. Used as a categorical feature. |
browser |
String | No | Browser used by the user. Used as a categorical feature. |
language |
String | No | Preferred language. Used as a categorical feature. |
interests |
String | No | User interests. Used as tag features to match content with viewer preferences. |
Item table
The item table describes each streamer and their content. Fields such as category, tags, and follow_count help the model assess content relevance and streamer popularity, matching streamers with viewers most likely to engage.
| Field | Type | Required | Description |
|---|---|---|---|
anchor_id |
Integer or string | Yes | Unique identifier for the streamer. |
name |
String | No | Streamer's name. |
nickname |
String | No | Streamer's display name, typically shown on the live streaming page. |
anchor_gender |
String or numeric | No | Streamer's gender (e.g., male, female, other). Used as a categorical feature. |
language |
String | No | Language used during the stream (e.g., Chinese, English, Japanese). |
level |
Integer | No | Streamer level on the platform. |
category |
String | No | Primary content category (e.g., talent show, game commentary). Used as a categorical feature. |
leaf_category |
String | No | Sub-category within the primary category. Used as a categorical feature. |
rating |
Float | No | Overall evaluation score. Convert to sentiment categories (positive, neutral, negative) for use as categorical features. |
status |
Numeric | No | Streamer status, such as whether the streamer is currently live. |
review_count |
Integer | No | Total number of viewer comments on the streamer. |
video_type |
String | No | Content format: live broadcast or recorded playback. |
duration |
Integer | No | Duration of a single live stream. |
release_date |
Date | No | Date when the live stream begins. |
director |
String | No | Director name for prerecorded programs. Leave blank if not applicable. |
actors |
String | No | List of live streaming guests. |
subtitles |
Boolean | No | Whether subtitle service is provided. |
region |
String | No | Region where the streamer is located. |
tags |
String | No | Keywords describing the live streaming topic. Helps match content with viewer interests. |
follow_count |
Integer | No | Number of followers the streamer has. A strong signal for popularity-based recommendations. |
Behavior table
The behavior table records how users interact with live streaming content. These signals serve as the primary training data for the recommendation model. Capturing diverse interaction types — especially gift and like events with their values — strengthens the model's learning signal.
| Field | Type | Required | Description |
|---|---|---|---|
request_id |
String | No | Unique identifier for each recommendation call. The absence of this field affects the accuracy of the sample and the addition of real-time features. New scenarios don't require this field initially, but add it before model training and update your training sample code accordingly. |
user_id |
Integer or string | Yes | ID of the user performing the interaction. |
item_id |
Integer or string | Yes | ID of the streamer item involved in the interaction. |
event |
String | Yes | Interaction type, such as exposure, click, like, gift, or comment. |
event_value |
Float | Yes | Numeric value associated with the event. For gift events, this is the gift amount. For like events, this is the number of likes. |
event_time |
Timestamp | No | Time when the interaction occurs, accurate to the second. |
ip |
String | No | User's IP address, used to determine the user's city and province. |
rating |
Float | No | Star rating or other feedback the user gives the streamer. |
scene |
String | No | Access entry point (e.g., homepage, search page). |
device_type |
String | No | Device used during the interaction. |
browser |
String | No | Browser used for access. |
mobile_brand |
String | No | Brand of the mobile device used by the user. |
os |
String | No | Operating system of the device. |
weather |
String | No | Real-time weather conditions based on IP geolocation. |
holiday |
Boolean | No | Whether the interaction takes place during a holiday. |
season |
String | No | Season during which the interaction occurs. |
longitude |
Float | No | Longitude of the user's location. |
latitude |
Float | No | Latitude of the user's location. |