All Products
Search
Document Center

:Ensure the timeliness of recommended content for the news industry through publish settings and scene creation

Last Updated:May 18, 2023

1. Publish settings

In the AIRec console, the pub_time and expire_time fields are used to specify the time when news or content is automatically published or expires. pub_time: the timestamp at which content or news is published, in seconds.

a. You can use this field to determine whether the published content is the latest release. b. This field is required. If you do not specify this field, the accuracy of algorithm-specific calculation results is affected, and the timeliness of recommended content cannot be ensured. c. If you are a first-time user of AIRec and all the news you uploaded is historical news whose precise publish time cannot be obtained, we recommend that you set this field to a time in the past for all of the news. For news that was written recently, set this field to the actual publish time of the news. expire_time: the timestamp at which content or news expires, in seconds.

a. If the current system time of your server is later than the value of this field, items expire and are no longer recommended. b. If all data becomes invalid, specific services cannot be started. c. If this field is set to Null, the recommended content or news never expires.

For more information, see data specifications for the news industry.

Example: Use a server SDK to report the settings of the pub_time and expire_time fields in an item table. The last published news expires in five days.

Code in the JSON format:

[{
    "cmd": "add",
    "fields": {
        "item_id": "item001",
        "item_type": "article",
        "author": "zhangsan",
        "pub_time": "1597308140",
        "expire_time": "1597734175",
        "channel": "Entertainment",
        "scene_id": "a101",
        "title": "xxx",
        "content": "xxx",
        "tags": "Entertainment",
        "category_level": "2",
        "category_path": "1_1",
        "weight": "1",
        "status": "1"
    }
}]

a. The pub_time field is set to 1597308140, which indicates August 13. b. The expire_time field is set to 1597734175, which indicates August 18. The interval between the dates specified by the pub_time and expire_time fields is five days. This indicates that the news is valid only for five days. For more information about how to use a server SDK to push data, see Push data.

2. Manage scenes in the console

You can specify the expiration time of each scene on the Scene Management page. In the sample scene described in this topic, the interval between the item publish time and the current time is less than or equal to five days. For detailed configurations, see the following procedure. Take note that the item publish time is specified by the pub_time field. Make sure that this field is set to a valid value.

a. Go to the scene creation page.

Log on to the AIRec console. In the left-side navigation pane, choose Business Operation > Scene Management. On the page that appears, click Create Scene.1

b. Specify parameters in the Configure Basic Information step.

2

c. Specify parameters in the Filter Items step.

Set the interval between the item publish time and the current time to a period less than or equal to five days. In this case, all the items in this sample scene will be valid only for five days.3

If a scene requires higher timeliness, set the interval to a period less than or equal to three days. If this interval is reached, the items of this scene will not be recommended.

For more information about subsequent steps and usage notes, see Create a recommendation scene by configuring product selection rules.