Filter Rule
A filter rule is used to configure the filter modes of the candidate sets to filter out the inappropriate candidates. For details, see Figure 1.
Creating a Filter Rule
Choose Combined Jobs > Filter Rule > Create to display a page where you can configure different strategies to process target data to generate appropriate candidate sets.
To add a filter rule, perform the following steps:
- Choose Offline Jobs > Filter Rule. Click Create to enter a page where you can create a filter rule.
- On the Create Filter Rule page, set Name, Scenario, and Description.
- Name: Name of the filter rule to be created, which must start with Filter- and consists of only letters, digits, hyphens (-), and underscores (_). The name must contain no more than 64 characters.
- Scenario: You can select a scenario created on the Global Configurations page.
- Set parameters related to the compute engine and storage platform by referring to Table 1 and set Historical Behavior Filtering based on business requirements, as shown in Figure 2.
Table 1 Parameters Parameter
Description
Compute Engine
- Service Name: Name of the selected service that functions as the compute engine. Compute engine can perform offline and nearline computing tasks in RES.
- Cluster Name: Name of the selected clusters. Currently, only the DLI clusters bound in Related Resources are available.
- Configuration File Path: OBS path for storing the JSON configuration files that are automatically generated when creating jobs. The compute engine reads these files to perform offline computing tasks.
- Name: Name of the required resource. For details about the resource specifications required by normal running of the DLI jobs, click View.
Storage Platform
- Service Name: Name of the selected service that functions as the storage platform and stores the online data and candidate sets recommended to you. Currently, only CloudTable is supported.
- Cluster Name: Name of the selected clusters. The CloudTable clusters bound in Related Resources are supported.
- Table Name: Name of a stored table
Filter Rule Alias
Name of a custom filter rule, which consists of letters, digits, underscores (_), spaces, or hyphens (-) and cannot start or end with a space. The name can contain no more than 60 characters.
Blacklist Address
Path where blacklists reside. Items whose IDs are included in blacklists cannot appear in the final recommendation lists. The blacklist content must be stored on OBS.
Whitelist Address
Path where whitelists reside. Items whose IDs are excluded in whitelists cannot appear in the final recommendation lists. The whitelist content must be stored on OBS.
Historical Behavior Filtering
Click
to add historical behaviors to be filtered out and click
to delete the behaviors. Needed when you specify the filter rules for the generation of a personalized candidate set. For example, content like news that you viewed in the past three days can be filtered out from the final recommendation lists.The options are as follows:
- view: Indicates that an item/content is exposed to users.
- click: Indicates a user clicks an item or content.
- collect: Indicates a user adds an item or content to favorites.
- uncollect: Indicates a user removes an item or content from favorites.
- search_click: Indicates a user clicks an item in the search results.
- comment: Indicates that a user makes comments on an item or content.
- share: Indicates that a user shares an item/content with others.
- like: Indicates a user gives an item or content a thumb-up.
- dislike: Indicates a user gives an item or content a thumb-down.
- grade: Indicates that a user rates an item/content.
- consume: Indicates that a user buys an item (primarily refers to commodities).
- use: Indicates that a user watches videos/listens to a kind of music/reads something (primarily refers to content)...
Behavior Filter Logic
Logic used between each historical behavior filter rule. For example, the AND logic means to select items that are both liked and consumed more than 3 times in the last 7 days; the OR logic means to select items that are either liked or consumed more than 3 times in the last 7 days.
Data Source
Data source type. The options are Standard and General.
NOTE:If Historical Behavior Filtering is required by Filter Rule, use User Operation Behavior Table to select the target data.
Standard
User Operation Behavior Table: Data in this table is in the Standard format.
General- General Data: General data is generated by the Initial User Profile-Item Profile-Standard Wide Table Generation operator in Feature Engineering. General data is JSON data generated by extracting user attributes, item attributes, and user behaviors from User Attribute Table, Item Attribute List, and User Operation Behavior Table.
- Time Range: A period for collecting behavior data. You can specify the start and/or end time, or leave it blank.
- After configuring all parameters, click OK.
You can switch to the filter rule list to view the basic information about filter rules. In the filter rule list, the status of the newly created rule is Computing. When it changes to Successful, the job execution is complete. The generated candidate set ID will be used by the online service to generate a recommendation list. If the status of a filter rule changes to Failed, click the rule name. On the rule details page that is displayed, view the logs and troubleshoot the faults.
Last Article: Ranking Strategy
Next Article: Effect Evaluation


Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.