The following section describes the fields in the user table, item table, and behavior log table that are recommended for content recommendation scenarios. The more fields you specify, the better recommendation results you will obtain. You can also provide more fields that are not listed in the following tables to obtain better recommendation results.
User table
We recommend that the user table contains information about all users registered in your system. We recommend that you create a partition every day and synchronize daily data of all users to the partition.
Field | Required | Description |
user_id | Required for users who have logged on | The unique ID of a user. |
imei | Required for users who have not logged on | International Mobile Equipment Identity (IMEI) |
register_time | No. We recommend that you specify this field. | The time when the account was registered. Unit: seconds. Example: 1520017038. |
gender | No | The gender of the user. |
age | No | The age of the user. |
country | No | The country. |
province | No | The region, state, or province. |
city | No | The city. |
ip | No | The IP address of the last logon. |
education | No | The education background of the user. |
career | No | The occupation of the user. |
item_cnt | No | The number of content pieces that the user created from the time when the account was registered. |
favorite_cnt | No | The number of favorites. |
follow_cnt | No | The number of users that the user follows. |
follower_cnt | No | The number of followers of the user. |
last_login_time | No | The last logon time. |
tags | No | The tags of the user. |
Item table
We recommend that the item table contains information about all the content in your system. We recommend that you create a partition every day and synchronize daily data of all the content to the partition.
Field | Required | Description |
item_id | Yes | The ID of the content. |
item_type | Required for content that contains multiple types of information. | Content type, such as article and video. |
status | Yes | This field indicates whether the item can be recommended. |
duration | No. It is required for videos. | The duration of the video. |
pub_time | Yes | The time when the item is published. |
title | No. We recommend that you specify this field. | The title of the item. |
category | No. We recommend that you specify this field. | The level-1 tag. |
tags | No | The tags. You can configure multiple tags and separate them with semicolons (;). |
author | No. We recommend that you specify this field. | The author. |
abstract | No | The abstract of the content. |
content | No | The body part of the content. |
image_url | No | The image URL used for extracting image features. |
video_url | No | The video URL used for extracting video features. |
pv_count | No | The total number of times the content is exposed. |
click_count | No | The total number of times the content is clicked. |
praise_count | No | The total number of times the content is liked. |
comment_count | No | The total number of times the content is commented. |
collect_count | No | The total number of times the content is added to favorites. |
share_count | No | The total number of times the content is shared. |
download_count | No | The total number of times the content is downloaded. |
tip_count | No | The total number of times the content is rewarded. |
Behavior log table
The behavior log table contains the behavioral data of the app or the behavioral data in specific scenarios in the most recent period. We recommend that the most recent period is at least 30 to 60 days.
Field | Required | Description |
user_id | Required for users who have logged on | The unique ID of a user. |
imei | Required for users who have not logged on | IMEI |
item_id | Required | The ID of the content. |
item_type | Required for content that contains multiple types of information. | The content type, such as article and video. |
request_id | No | The request ID, which is the unique identifier of each recommendation. If you leave this field empty, the accuracy of samples is affected and real-time features cannot be added. This field is optional when you create a recommendation solution, and you must configure this field, modify the training sample code, prepare training samples again, and then perform model training after you create the recommendation solution. |
request_info | No. We recommend that you specify this field. | The request tracking information, such as experiment ID. |
exp_id | Yes | The experiment ID returned by the PAI-Rec recommendation interface. If the result is not recommended by PAI-Rec, set this parameter to default or other values. |
scene | Required in case of multiple scenarios. | The scenario. |
page | No. We recommend that you specify this field in case of multiple pages. | The page. |
source_page | No. We recommend that you specify this field in case of multiple pages. | The previous page. |
position | No | The position of the content. |
event | Yes | The behavior type, such as exposure, stay, click, favor, download, buy, cart, and evaluate. |
event_time | Yes | The time when the behavior occurred. |
playtime | No. We recommend that you specify this field. | The playback duration or the reading duration. Unit: seconds. |
comment | No | The comment content. |
net_type | No | The type of the network. |
device_platform | No. We recommend that you specify this field. | The platform of the client. |
device_brand | No | The brand of the client device. |
device_model | No | The model of the client device. |
device_system | No | The operating system of the client device. |
app_version | No | The app version. |
longitude | No | The longitude. |
latitude | No | The latitude. |
ip | No | Used to extract the country and city features. |