Sample management

更新时间:
复制 MD 格式

Use sample management to upload your blocklist and passlist samples and apply them to specific risk detection models, such as models for registration risk and marketing risk detection. After the upload is complete, if a request parameter matches a sample, the service returns a score and tag based on the selected sample type:

  • blocklist sample: score=100, tags=blockList

  • passlist sample: score=0, tags=passList.

The service supports two upload methods: console upload and API upload. Use console upload for single or small-batch uploads, and API upload for recurring or large-volume uploads.

image

1. Prerequisites

The risk detection model service must be activated.

Note

Before you activate the service, review the billing rules for risk detection. For more information, see billing methods.

2. Upload samples

2.1 Console upload

  1. Log on to the Risk Detection Management Console.

  2. In the left-side navigation pane, choose Scenario Risk Control > Sample Management

  3. On the Sample Management page, click Upload Samples.

  1. Configure the sample details.

    1. Sample Name: Use a descriptive name. The name can contain Chinese characters, letters, digits, and underscores (_), and must be no more than 32 characters long.

    2. Scenario Risk Control Service: Select your current model service.

    3. Sample Type: Select blocklist sample or passlist sample. The service returns a corresponding score and tag based on the selected type.

      1. blocklist sample: score=100, tags=blockList

      2. passlist sample: score=0, tags=passList

    4. Data Type: Select the data type for the samples. Supported types include mobile phone number, mobile phone number MD5, and IP address. Note: The selected data type must match the data format sent in your API requests. For example, if your application sends mobile phone number MD5 values in API requests, you must select mobile phone number MD5 as the data type. Otherwise, the samples will not take effect in the production environment.

    5. Sample Description: The description can contain Chinese characters, letters, digits, and underscores (_), and must be no more than 64 characters long.

    6. Upload Method:

      1. File Upload: Use for large-batch uploads. Download the sample template from the console and use it to upload your file.

      2. Text Box Upload: Use for uploads of 10 or fewer samples. Enter the sample data directly into the text box.

File requirements: The file must be in CSV UTF-8 (.csv) format, contain no more than 100,000 rows, and be no larger than 50 MB.

  1. Click OK to upload the samples.

Newly configured sample lists take effect in the production environment within 2 to 5 minutes.

  1. In the Operation column, click Sample Management to add or delete entries in the list.

2.2 API upload

For API documentation and integration details, see the Sample Upload API documentation. Samples uploaded via API can also be viewed, deleted, or downloaded from the Sample Management page in the console.

Sample management

  1. On the Sample Management page, you can view, delete, and download your uploaded sample files.

  2. View: To view a sample batch, find it in the Sample Management list, and then click Sample Management in the Operation column.

    1. You can search for samples by keyword or time range.

    2. On the sample details page, click Add Sample Content to add new entries.

    3. To delete sample entries, select their checkboxes and then click Delete.

  3. Delete: Click Delete in the Operation column to remove an entire sample batch. After a batch is deleted, its samples no longer take effect.

  4. Download: Click Download in the Operation column to save the sample file.