Event Type | Parameter Value |
Image moderation | event_type = 317 |
Parameter | Type | Description |
t | int64 | Expiration time, which is the Unix timestamp when the event notification signature expires. The default validity period of a message notification from Tencent Cloud is 10 minutes. If the time specified by the t value in a message notification has elapsed, then this notification is considered invalid, thereby preventing network replay attacks.The format of t is a decimal Unix timestamp, i.e., the number of seconds that have elapsed since 00:00:00 (UTC/GMT time), January 1, 1970. |
sign | string | Event notification security signature sign = MD5(key + t). Note: Tencent Cloud concatenates the encryption key and t , calculates the sign value through MD5, and places it in the notification message. When your backend server receives the notification message, it can confirm whether the sign is correct based on the same algorithm and then determine whether the message is indeed from the Tencent Cloud backend. |
Parameter | Required or Not | Data Type | Description |
streamId | Mandatory | String | Stream name. |
channelId | Mandatory | String | Channel ID. |
img | Mandatory | String | Link to the moderated image |
type | Mandatory | Array | Categories of negative labels with the highest priority in the detection result. For details, see the description of label . |
score | Mandatory | Array | Scores of type |
ocrMsg | Optional | String | OCR result (if any) |
suggestion | Mandatory | String | Suggestion. Valid values: Block Review Pass |
label | Optional | String | Negative label with the highest priority in the detection result(labelResults,objectResults,ocrResults). This is the moderation result suggested by the model. We recommend you handle different types of violations and suggestions based on your business needs. |
subLabel | Mandatory | String | Sub-label under the negative label with the highest priority in the detection result, such as porn - sexual acts. If no content is sub-labeled, this parameter will be empty. |
labelResults | Optional | Negative label hit details of the category model, including the detected porn content, ads, terrorism content, and politically sensitive content. Note: This field may return null , indicating that no valid values can be obtained. | |
objectResults | Optional | Detection result of the object model, including label name, hit score, coordinates, scenario, and suggested operation regarding objects, advertising logos, QR codes, etc. For details, see the description of the data structure of ObjectResults . Note: This field may return null , indicating that no valid values can be obtained. | |
ocrResults | Optional | OCR result, including text coordinates, recognized text, suggested operation, etc. For details, see the description of the data structure of OcrResults .Note: This field may return null , indicating that no valid values can be obtained. | |
libResults | Optional | Blocklist/Allowlist moderation result | |
screenshotTime | Mandatory | Number | Screenshot time |
sendTime | Mandatory | Number | Time when the request was sent, in Unix timestamp format |
stream_param | Mandatory | String | Push parameters |
app | Mandatory | String | Push domain name. |
appid | Mandatory | Number | Application ID |
appname | Mandatory | String | Push path |
Parameter | Type | Description |
Scene | String | Scenario identified by the model, such as advertising, pornographic, and harmful |
Suggestion | String | Operation suggested by the system for the current negative label. We recommend you handle different types of violations and suggestions based on your business needs. Returned values: Block Review Pass |
label | String | Negative label in the detection result |
SubLabel | String | Sub-label name |
Score | Integer | Hit score of the label model |
Details | Array of LabelDetailItem | Sub-label hit details of the category model |
Parameter | Type | Description |
Id | Integer | ID |
Name | String | Sub-label name |
Score | Integer | Sub-label score. Value range: 0-100 |
Parameter | Type | Description |
Scene | String | Object scenario identified, such as QR code, logo, and OCR |
Suggestion | String | Operation suggested by the system for the current negative label. We recommend you handle different types of violations and suggestions based on your business needs. Returned values: Block Review Pass |
label | String | Negative label in the detection result |
SubLabel | String | Sub-label name |
Score | Integer | Sub-label hit score of the scenario model. Value range: 0-100 |
Names | Array of String | List of object names |
Details | Array of ObjectDetail | Object detection details |
Parameter | Type | Description |
Id | Integer | ID of the object identified |
Name | String | Object label identified |
Value | String | Value or content of the object label identified. For example, if the label is QR code ( QrCode ), this parameter is the URL of the QR code. |
Score | Integer | Hit score of the object label. Value range: 0-100. For example, QrCode 99 indicates a high likelihood that the content is a QR code. |
Location | Coordinates (of the top-left corner), dimensions, and rotation of the object detection frame |
Parameter | Type | Description |
X | Float | Horizontal coordinate of the top-left corner |
Y | Float | Vertical coordinate of the top-left corner |
Width | Float | Width |
Height | Float | Height |
Rotate | Float | Rotation angle of the detection frame |
Parameter | Type | Description |
Scene | String | Recognition scenario. Default value: OCR |
Suggestion | String | Operation suggested by the system for the negative label with the highest priority. We recommend you handle different types of violations and suggestions based on your business needs. Returned values: Block Review Pass |
label | String | Negative label in the detection result |
SubLabel | String | Sub-label name |
Score | Integer | Sub-label hit score of the scenario model. Value range: 0-100 |
Text | String | Text |
Details | Array of OcrTextDetail | OCR details |
Parameter | Type | Description |
Text | String | Text recognized (up to 5,000 bytes) |
label | String | Negative label in the detection result |
Keywords | Array of String | Keywords hit under the label |
Score | Integer | Hit score of the label model. Value range: 0-100 |
Location | OCR text coordinates |
Parameter | Type | Description |
Scene | String | Scenario recognition result of the model. Default value: Similar |
Suggestion | String | Operation suggested by the system. We recommend you handle different types of violations and suggestions based on your business needs. Returned values: Block Review Pass |
label | String | Negative label in the detection result |
SubLabel | String | Sub-label name |
Score | Integer | Recognition score of the image search model. Value range: 0-100 |
Details | Array of LibDetail | Blocklist/Allowlist details |
Parameter | Type | Description |
Id | Integer | ID |
ImageId | String | Image ID |
label | String | Negative label in the detection result |
Tag | String | Custom label |
Score | Integer | Model recognition score. Value range: 0-100 |
{"ocrMsg": "","type": [1],"socre": 99,"screenshotTime": 1610640000,"level": 0,"img": "http://1.1.1.1/download/porn/test.jpg","abductionRisk": [],"faceDetails": [],"sendTime": 1615859827,"suggestion": "Block","label": "Porn","subLabel": "PornHigh","labelResults": [{"HitFlag": 0,"Scene": "Illegal","Suggestion": "Pass","Label": "Normal","SubLabel": "","Score": 0,"Details": []}, {"HitFlag": 1,"Scene": "Porn","Suggestion": "Block","Label": "Porn","SubLabel": "PornHigh","Score": 99,"Details": [{"Id": 0,"Name": "PornHigh","Score": 99}, {"Id": 1,"Name": "WomenChest","Score": 99}]}, {"HitFlag": 0,"Scene": "Sexy","Suggestion": "Pass","Label": "Normal","SubLabel": "","Score": 0,"Details": []}, {"HitFlag": 0,"Scene": "Terror","Suggestion": "Pass","Label": "Normal","SubLabel": "","Score": 0,"Details": []}],"objectResults": [{"HitFlag": 0,"Scene": "QrCode","Suggestion": "Pass","Label": "Normal","SubLabel": "","Score": 0,"Names": [],"Details": []}, {"HitFlag": 0,"Scene": "MapRecognition","Suggestion": "Pass","Label": "Normal","SubLabel": "","Score": 0,"Names": [],"Details": []}, {"HitFlag": 0,"Scene": "PolityFace","Suggestion": "Pass","Label": "Normal","SubLabel": "","Score": 0,"Names": [],"Details": []}],"ocrResults": [{"HitFlag": 0,"Scene": "OCR","Suggestion": "Pass","Label": "Normal","SubLabel": "","Score": 0,"Text": "","Details": []}],"streamId": "teststream","channelId": "teststream","stream_param": "txSecret=40f38f69f574fd51126c421a3d96c374&txTime=5DEBEC80","app": "5000.myqcloud.com","appname": "live","appid": 10000,"event_type": 317,"sign": "ac920c3e66**********78cf1b5de2c63","t": 1615860427}
Was this page helpful?