The OSS compliance check Universal Edition is for customers who need to scan new data in Object Storage Service (OSS). It offers near-real-time scanning, integrates the detection capabilities of Content Moderation Enhanced Edition, supports a wider range of risk types and more detailed risk labels, and lets you handle OSS detection results through a self-service interface. This feature integrates directly with other cloud products like OSS buckets and Log Service (SLS), improving the user experience. This topic describes how to use the Universal Edition to incrementally scan images, audio, videos, and documents stored in OSS.
Activation and authorization
The OSS compliance check Universal Edition uses the detection service of Content Moderation Enhanced Edition. Therefore, before you use the OSS compliance check Universal Edition, you must activate Content Moderation Enhanced Edition. For more information, see Activation and billing.
Before using the OSS compliance check Universal Edition, you must grant Content Moderation access to your OSS buckets and Log Service. After you grant the authorization, the OSS compliance check Universal Edition pushes detection results to Log Service. Log Service provides features such as query, analysis, and data processing to help you understand content risk trends and perform real-time monitoring.
In the authorization section of the page, click Authorize OSS and Log Service Access to complete the authorization.
Pushing logs and performing queries and analyses do not incur additional fees. You must activate Log Service and grant the required permissions. For more billing information, see OSS compliance check Universal Edition V2.0: Introduction and billing.
Configure incremental scan task
-
Log on to the Content Moderation console. In the left-side navigation pane, choose OSS compliance check Universal Edition>Scan Tasks.
-
On the OSS compliance check Universal Edition page, click Incremental Scan Task.
Use the wizard to configure the following settings.
-
Select a detection task type and click Next.
Parameter
Description
Task Name
The name of the incremental scan task. The name must be unique.
Select bucket (multiple choice)
-
The service supports public cloud OSS in all mainland China regions and the US (Virginia) region.
For more information about OSS-supported regions, see OSS endpoints and data centers.
-
Supports the region-independent (Chinese mainland) attribute for public cloud OSS.
-
Enter multiple bucket names, separated by commas.
Select a task type
Supports incremental tasks for images, audio, videos, and documents.
Image tasks
Supported image formats: PNG, JPG, JPEG, BMP, WEBP, TIFF, SVG, ICO, and HEIF.
Image size must not exceed 20 MB. Larger image files are not detected.
By default, Disable Extensionless File Check. If you enable this feature, files without a suffix are identified as images based on their
content-type.Audio and video tasks
Supported video formats: AVI, FLV, MP4, MPG, ASF, WMV, MOV, WMA, RMVB, RM, FLASH, and TS.
Supported audio formats: MP3, WAV, AAC, WMA, OGG, M4A, AMR, FLAC, 3GP, and APE.
The audio or video file size must not exceed 1 GB. Larger files are not detected.
By default, both Video Files and Audio Files are detected.
Document tasks
Supported document formats: DOC, DOCX, PPT, PPTX, PPS, PPSX, PDF, XLS, XLSX, XLTX, XLTM, HTML, and TXT.
Document size must not exceed 200 MB. Larger document files are not detected.
select scan service
You can click Manage Moderation Services or Rule Configuration for a specific service to adjust its settings for the current task. You can select multiple detection services. For more information about how to configure Content Moderation Enhanced Edition services, see Console Operation Guide.
ImportantOSS Universal Edition detection tasks and Content Moderation API calls share the same rule configuration, so any modification affects both.
Image detection services
Large model services for detection:
Image Moderation for Large and Small Model Integration (Recommended): Combines the capabilities of the large image detection model and expert models to comprehensively identify various types of non-compliant content, including pornography, sexually suggestive content, political content, terrorism, prohibited items, religious content, advertisement redirection, and undesirable content.
Image Moderation Service Based on LLMs: A large model trained for image detection scenarios that can identify risks such as pornographic, political, terrorism-related, prohibited, undesirable, abusive, and advertising content.
Large Model-Powered Ad Traffic Detection: Based on a large model, this service can effectively identify various evasive advertisement redirections and AI-generated advertisement content.
General scenarios:
OSS baseline check: Suitable for detecting red-line violations such as pornographic, political, and terrorism-related content in images stored in OSS.
BaselineCheck: Detects red-line violations or content that is unsuitable for dissemination in images.
We recommend that you select this option if your files include publicly accessible images.
baselineCheck_pro: Provides more fine-grained labels in addition to the features of General baseline detection.
We recommend that you select this option if you have more granular processing needs and some custom requirements for images.
TonalityImprove: Detects content in images that may disrupt platform order, affect content tone, or degrade user experience.
We recommend that you use this service in addition to General baseline detection based on your governance needs.
AIGC scenarios:
AIGC Image Risk Check: Designed for AIGC scenarios, this service detects whether AIGC-generated images contain non-compliant or inappropriate content.
We recommend that you select this option if your files include AIGC-generated images.
AIGC image detection: Determines whether an image was generated by AIGC across various scenarios.
AIGC Detection_Professional Edition: For various scenarios, determines if an image is likely AI-generated or synthetically altered.
AI Image Detection (Video Screenshots): For video screenshot scenarios, determines whether an image was generated by AIGC.
AIGC Violation Detection: For AIGC scenarios, this service detects elements such as trademarks, special logos, and people in an image to identify potential infringement risks.
Business scenarios:
Profile Photo Check: For profile photo scenarios, this service detects non-compliant, inappropriate, or platform-disrupting content.
Post Comment Image Moderation: For images in posts and comments, this service detects non-compliant, inappropriate, or platform-disrupting content.
Advertising Check: For marketing materials, this service detects content that violates advertising laws, is non-compliant, inappropriate, or disrupts platform order.
Live Stream Check: For video and live stream screenshots, this service detects non-compliant, inappropriate, or platform-disrupting content.
Special scenarios:
Moderate Images for Malicious Content: Detects malicious use of images to hide video clips or video players, preventing attackers from exploiting your OSS and CDN traffic.
Audio and video detection services
Video File Moderation_LLM-based Version (Recommended): Uses the large model service for image detection to detect non-compliant visual or audio information in video files. We recommend using this for all publicly accessible video files.
Video Detection: Detects non-compliant or inappropriate content in video files. We recommend using this for all publicly accessible video files.
Document detection services
General Document Moderation (Large Model Edition) (Recommended): Uses the large model service for image detection on the visual parts of documents to detect non-compliant image or text information, including baseline violations like pornography, sexually suggestive content, political content, terrorism, and prohibited items.
General Document Moderation: Detects non-compliant image or text information in documents, including baseline violations like pornography, sexually suggestive content, political content, terrorism, and prohibited items.
-
-
Specify the scope of the detection task based on your business needs, and then click Next.
Parameter
Description
Specify the upper limit
-
unlimited quantity: Scans all files. Content Moderation scans all your files.
-
Set Detection Limit: Set a limit based on your business needs. There is no system-defined maximum for this limit.
ImportantThe displayed file count is for reference only. The number of images, audio files, videos, or documents cannot be estimated in advance.
Filter
Configure the scan to include or exclude files based on their prefixes. For example, adding
img/test_means that only files in the OSS Bucket with theimg/test_prefix are scanned.NoteIf the files to be scanned are in a specific directory, you can add the directory path before the filename to create the full prefix.
-
-
Configure callback and handling settings.
Parameter
Description
Callback notification
You can select an existing callback notification plan or create a new one. Detection results are sent based on your Message Notification settings.
NoteYou can manage callback notifications on the Notification page. For more information, see Configure Message Notification.
Result handling
By default, Automatic Result Freezing is disabled. You can enable it to process results based on the freezing scope and freezing method you select.
Disposal Scope:
Image tasks
You can choose to freeze high-risk content and medium-risk content.
By default, Freeze High-risk Content. You can choose whether to also freeze medium-risk content based on your business needs. You can manage the risk level thresholds in the image detection rule settings.
Audio and video tasks
For video frames and audio, you can choose to freeze high-risk content and medium-risk content respectively.
By default, Freeze High-risk Content for both video frames and audio. You can choose whether to also freeze medium-risk content based on your business needs. The risk level is calculated based on all captured video frames and audio clips from the video file.
Document tasks
For document images and text, you can choose to freeze high-risk content and medium-risk content respectively.
By default, Freeze High-risk Content for both document images and text. You can choose whether to also freeze medium-risk content based on your business needs. The risk level is calculated based on all captured screenshots and all text from the document file.
Disposal Method:
Modify permissions: Sets the access permission of the OSS file that meets the freezing criteria to private.
Move files: Moves the flagged OSS file to a backup directory in the bucket (location: ${bucket}/alicip_riskfile_backup/) or a custom dump directory, and then deletes the original file.
ImportantEnabling Automatic Result Freezing requires OSS authorization. Once enabled, this feature directly processes any OSS files that meet the specified criteria. Ensure the detection scope and conditions are correctly configured. If an OSS file is frozen by mistake, you can restore it from the results page or by following the instructions in Use the OSS API to restore a frozen file.
-
-
Click Submit.
Note-
The task list displays the cumulative number of scanned files. Because detection tasks are asynchronous, there may be a delay of about one minute before the task information is updated in the list.
-
You can filter the task list by time, view task results, and check task configurations. Detection tasks and results from the last 180 days can be queried.
-
Configure message notification
-
On the OSS compliance check Universal Edition page, click Notification in the navigation pane.
-
On this page, you can manage all message notification plans, including adding, editing, and deleting plans.
-
Create New Notification: Click Create New Notification to open the creation page. Enter the callback plan information and click OK to add the plan.
-
Title: Up to 12 characters, including Chinese characters, English letters, underscores (_), and digits.
-
Callback URL: A publicly accessible URL for receiving callback messages that supports the POST method over HTTP or HTTPS, support for the form parameters checksum and content, and the data format
application/x-www-form-urlencoded. Ensure that the URL can respond properly. -
Encryption algorithm: Select an appropriate encryption algorithm.
-
Audit Result: Select Results with detected risks (returns only results with identified risk labels) or All Results (returns all detection results).
-
Seed: Automatically generated after you configure the message notification in the console. You can view it in the message notification management settings.
-
-
Edit Notification: You can edit a notification plan. If you edit a plan that is in use, the changes affect all tasks using that plan. Proceed with caution.
-
Delete Notification: You can delete notification plans that are not in use. Plans that are in use cannot be deleted.
-
-
Message notification content.
After you enable callback notifications, Content Moderation sends callback notifications for OSS compliance checks based on your callback configurations. The checksum value is generated by concatenating <user UID> + <Seed> + <content> into a string and using the encryption algorithm that you configured in the console. After you receive the result, you can use the same algorithm to calculate the checksum and compare it with the checksum returned by the system to verify that the content has not been tampered with. The following table describes the content field structure in the callback notification.
|
Parameter |
Type |
Example |
Description |
|
Code |
String |
200 |
The status code. |
|
RequestId |
String |
ABCD1234-1234-1234-1234-123**** |
The unique request ID generated by Alibaba Cloud. You can use this ID to troubleshoot issues. |
|
Data |
Object |
The content detection results. For more information, see Data. |
Table 2. Data
|
Parameter |
Type |
Example |
Description |
|
OssBucketName |
String |
AAAAA-BBBBB-2024*-0307* |
The name of the bucket in which the OSS file is stored. |
|
OssObjectName |
String |
videoId**** |
The name of the OSS file. |
|
OssRegionId |
JSONObject |
The region where the bucket is located. |
|
|
Results |
JSONObject |
The results returned by an image detection task. For more information about the fields, see Image moderation response data. |
|
|
FrameResult |
JSONObject |
The video frame results returned by a video detection task. For more information about the fields, see Video moderation response data. |
|
|
AudioResult |
JSONObject |
The audio results returned by a video detection task. For more information about the fields, see Video moderation response data. |
|
|
PageResult |
JSONObject |
The results returned by a document detection task. For more information about the fields, see Document moderation response data. |
Response examples:
Image detection
The following code provides an example of a callback for an image detection task. For more information about the fields, see Response data.
{
"Code": 200,
"Data": {
"OssObjectName": "test/img.webp",
"OssBucketName": "tmpsample",
"OssRegionId": "cn-shanghai",
"Results": [
{
"Service": "oss_baselineCheck",
"RiskLevel": "high",
"Result": [
{
"Confidence": 95.89,
"Label": "sexual_partialNudity"
}
]
}
]
},
"RequestId": "AAAAA-BBBBB-CCCC-DDDDD"
}
Audio and video detection
The following code provides an example of a callback for an audio and video detection task. For more information about the fields, see Response data.
{
"Code": 200,
"Data": {
"TaskId": "ABCDEF_vi_0502zsx1314520yhxforever-12345",
"OssObjectName": "test/test_video.mp4",
"OssRegionId": "cn-shanghai",
"OssBucketName": "tmpsample",
"RiskLevel": "high",
"FrameResult": {
"FrameNum": 2,
"RiskLevel": "medium",
"FrameSummarys": [
{
"Label": "violent_explosion",
"LabelSum": 8
},
{
"Label": "sexual_cleavage",
"LabelSum": 5
}
],
"Frames": [
{
"Offset": 1,
"RiskLevel": "none",
"Results": [
{
"Result": [
{
"Label": "nonLabel"
}
],
"Service": "baselineCheck_global"
}
],
"TempUrl": "http://abc.oss-ap-southeast-1.aliyuncs.com/test1.jpg"
},
{
"Offset": 2,
"RiskLevel": "medium",
"Results": [
{
"Result": [
{
"Confidence": 1,
"Label": "sexual_cleavage"
},
{
"Confidence": 74.1,
"Label": "violent_explosion"
}
],
"Service": "baselineCheck_global"
}
],
"TempUrl": "http://abc.oss-ap-southeast-1.aliyuncs.com/test2.jpg"
}
]
},
"AudioResult": {
"AudioSummarys": [
{
"Label": "sexual_sounds",
"LabelSum": 3
}
],
"RiskLevel": "high",
"SliceDetails": [
{
"EndTime": 60,
"EndTimestamp": 1698912813192,
"Labels": "",
"RiskLevel": "none",
"StartTime": 30,
"StartTimestamp": 1698912783192,
"Text": "Content Moderation",
"Url": "http://abc.oss-cn-shanghai.aliyuncs.com/test.wav"
},
{
"EndTime": 30,
"EndTimestamp": 1698912813192,
"Extend": "{\"customizedWords\":\"service\",\"customizedLibs\":\"test\"}",
"Labels": "C_customized",
"RiskLevel": "high",
"StartTime": 0,
"StartTimestamp": 1698912783192,
"Text": "Welcome to Alibaba Cloud Content Moderation service",
"Url": "http://abc.oss-cn-shanghai.aliyuncs.com/test.wav"
}
]
}
},
"RequestId": "9d93d864-ebb9-469f-b7f9-b66ee3a9c41c"
}
Document detection
The following code provides an example of a callback for a document detection task. For more information about the fields, see Response data.
{
"Code": 200,
"Data": {
"OssObjectName": "test/Test_Document.docx",
"OssBucketName": "tmpsample",
"OssRegionId": "cn-shanghai",
"PageSummary": {
"PageSum": 2,
"ImageSummary": {
"RiskLevel": "high",
"ImageLabels": [
{
"LabelSum": 2,
"Label": "nonLabel"
},
{
"LabelSum": 1,
"Label": "pornographic_adultContent_tii"
}
]
},
"TextSummary": {
"TextLabels": [
{
"LabelSum": 2,
"Label": "contraband"
}
],
"RiskLevel": "high"
}
},
"PageResult": [
{
"ImageResult": [
{
"Description": "Image content moderation for the document page",
"LabelResult": [
{
"Label": "nonLabel"
}
],
"RiskLevel": "none",
"Service": "baselineCheck"
}
],
"ImageUrl": "http://oss.aliyundoc.com/a.png",
"PageNum": 1,
"TextResult": [
{
"Description": "Text content moderation for the document page",
"Labels": "",
"RiskLevel": "none",
"RiskTips": "",
"RiskWords": "",
"Service": "pgc_detection",
"Text": "Content Moderation product test case a"
}
]
},
{
"ImageResult": [
{
"Description": "Image content moderation for the document page",
"LabelResult": [
{
"Confidence": 89.01,
"Label": "pornographic_adultContent_tii"
}
],
"RiskLevel": "high",
"Service": "baselineCheck"
}
],
"ImageUrl": "http://oss.aliyundoc.com/b.png",
"PageNum": 10,
"TextResult": [
{
"Description": "Text content moderation for the document page",
"Labels": "contraband,sexual_content",
"RiskLevel": "high",
"RiskTips": "contraband_prohibited_items,sexual_content_media_resource,sexual_content_vulgarity",
"RiskWords": "Risk word A,Risk word B",
"Service": "ad_compliance_detection",
"Text": "Content Moderation product test case b"
}
]
}
]
},
"RequestId": "1d122669-f580-4e17-aafd-87b6803dd830"
}
Task detection results
-
In the task list on the Inclusive Edition of OSS Content Moderation page, find the task that you want to manage and click View Results in the Actions column.
-
On the Detection Results tab, you can query task results by incremental task schedule date, detection time range, object name, bucket, risk level, search label, and automatic handling status.
You can query detection results from the last 180 days and display or export up to 50,000 records. All query results are pushed to Log Service. Log Service provides features such as query, analysis, and data processing to help you understand content risk trends and perform real-time monitoring. For more information, see Log storage for OSS compliance check results.
The OSS compliance check Universal Edition annotates files with the labels that are returned by Content Moderation Enhanced Edition. For information about label values and definitions, see Image Moderation Enhanced Edition V2.0 synchronous detection API for images, video frames, or document snapshots, Audio Moderation Enhanced Edition API for audio, and Text Moderation Enhanced Edition API for document text.
Detection may fail due to reasons such as oversized files, unsupported formats, or file access failures. These failures do not incur fees, and their results are not displayed in the list. If you need information about the results of failed detections, join the DingTalk group (ID: 35573806) to consult with product and technical experts.
-
For an audio and video incremental task, click Sound Picture Results in the Actions column to view detailed moderation results for video frames and audio.
The results page has two tabs: Frame Moderation Results and Audio Moderation Results. Details for frames and audio segments are retained for 30 days. On the Frame Moderation Results tab, you can filter frame results by Frame Labels. Each frame displays its timestamp and detected labels.
-
For a document incremental task, click 文档页结果 in the Actions column to view detailed moderation results for document snapshots and text.
The results page has two tabs: Image Moderation Results and Text Moderation Results. Result details are retained for 30 days. On the Image Moderation Results tab, you can filter document page results by Image Labels. Each document page displays its detected labels.
-
Click View in the Actions column for a specific file to view a preview and the detailed response.
To export detection results, click the
icon in the upper-right corner of the query results list to export an XLSX file.
Self-service handling
The Self-service Handling feature lets you manually freeze, unfreeze, and provide feedback on automatic detection results. It also supports batch operations, auto-refresh, and data export.
-
In the task list on the Inclusive Edition of OSS Content Moderation page, find the task that you want to manage and click View Results in the Actions column.
-
Switch to the Self-service Handling tab. You can query results by the detection time range of the incremental task, risk label, object name, bucket, risk level, automatic handling status, manual handling status, and feedback.
-
Self-service handling results are stored for a maximum of 30 days. You can display and export up to 50,000 records. Download and store your data in a timely manner after handling.
-
The time range filter supports quick selections to query data for specific periods. You can query by multiple criteria at the same time.
The page displays detection results as cards. Each card includes a file thumbnail, View and Feedback links, the Automatic handling status (such as auto-frozen or not auto-handled), the Automatic detection result (risk level and detection labels), and Manual handling controls (freeze and unfreeze buttons).
-
-
Freeze/unfreeze operations: The list displays the automatic handling status, automatic detection result, and manual handling status by default. You can perform freeze and unfreeze operations in the manual handling section. Batch operations are supported.
-
For results that were automatically frozen, you can unfreeze them. After the unfreeze operation, the manual handling status changes to unfrozen.
-
For results that were not automatically handled, you can freeze them. After the freeze operation, the manual handling status changes to frozen.
-
You can freeze or unfreeze manually handled data again. The system records the last manual handling action, the operator who performed the action, and the time when the action was performed.
-
You can select multiple items for batch handling. After the batch operation is complete, the system displays a summary of the results.
The summary includes statistics for Total, Succeeded, Duplicates, and Invalid.
-
-
Feedback operation: You can provide feedback on the results for images, audio, videos, and documents, including suggestions such as "Missed non-compliant content" and "false positive." Batch feedback is supported.
-
After you provide feedback, the feedback result appears below the Feedback button for the corresponding item.
The feedback result, such as Missed non-compliant content, is displayed below the Feedback button. You can also view the Automatic handling, Automatic detection result, and Manual handling status for that data.
-
You can query and export results with feedback, which is convenient for viewing and storing the corresponding data.
-
-
Refresh the list: You can refresh the list manually or set it to automatically refresh. Three auto-refresh intervals are available.
You can set the auto-refresh interval to 15s, 30s, or 1 min.
-
Click View for a specific file to view a preview and the detailed response.
To export detection results, click the
icon in the upper-right corner of the query results list to export an XLSX file.
Disable and cancel incremental tasks
-
To disable an incremental task, go to the Inclusive Edition of OSS Content Moderation page and click Disable Incremental Task. After a task is disabled, you can still view and export the results of completed scans.
-
To stop a running task, click Disable Incremental Task. A stopped task cannot be canceled. Because detection is asynchronous, the stop operation may take about one minute to take effect. Any files being scanned or already in the queue will continue to be processed until completion.
-
If you need to modify a task's configuration due to an error, you must disable the existing task and create a new one.