Porn Detection Event Notification

Last updated: 2020-09-17 15:10:47

    LVB porn detection takes real-time screenshots of suspiciously pornographic video images in live streams and stores them in COS. The porn detection callback is used to push the information of detected pornographic images, including their type, score, and screenshot time. You need to configure the server address receiving porn detection callback messages in the callback template and associate the template with the push domain name. When a porn detection event is triggered by a live stream, the Tencent Cloud LVB backend will call back the pornographic image information to the configured receiving server.

    This document describes the fields in callback message notifications sent by Tencent Cloud LVB after a porn detection callback event is triggered.

    Notes

    • You need to understand how to configure the callback feature and receive callback messages on Tencent Cloud LVB before reading this document. For more information, please see How to Receive Event Notification.
    • By default, only questionable results will be called back for LVB porn detection.
    • We recommend you use the [type](#type) of an image to judge whether it is pornographic. As the detection results are not 100% accurate and there may be false positives or false negatives, you can confirm them manually if necessary.

    Screencapturing Event Parameter Description

    Event type parameters

    Event Type Field Value Description
    LVB porn detection event_type = 317

    Common callback parameters

    Field NameTypeDescription
    t int64 Expiration time, which is the Unix timestamp when the event notification signature expires.
    • The default expiration time of a message notification from Tencent Cloud is 10 minutes. If the time specified by the `t` value in a message notification has elapsed, it can be determined that this notification is invalid, thereby preventing network replay attacks.
    • The format of `t` is a decimal Unix timestamp, i.e., the number of seconds that has elapsed since January 01, 1970 00:00 (UTC/GMT time).
    sign string Security signature of event notification (sign = MD5(key + t)).
    Note: Tencent Cloud splices the encryption `key` and `t`, calculates the `sign` value through MD5, and places it in the notification message. After 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.

    Note:

    <span id="key"></span>key is the callback key in Feature Template > Callback Configuration, which is mainly used for authentication. In order to protect the security of your data, we recommend you enter it.

    Callback message parameters

    Parameter Required Data Type Description
    tid No Number Alert policy ID. Video content alert: 20001
    streamId No String Stream name
    channelId No string Channel ID
    img Yes string Link to alerted image
    type Yes Array Image type, 0: normal, 1: pornographic, 2: sexy, 3: politically sensitive, 4: illegal, 5: terrorism, 6–9: others
    confidence Yes Number Confidence level of the detected pornographic image ranges from 0 to 100, which is an overall score factoring in normalScore, hotScore, and pornScore
    normalScore Yes Number Score for normal image
    hotScore Yes Number Score for sexy image
    pornScore Yes Number Score for pornographic image
    level No Number Image level
    ocrMsg No string OCR recognition information of image (if any)
    screenshotTime Yes Number Screenshot time
    sendTime Yes Number Request sent time (UNIX timestamp)
    abductionRisk No Array An array containing the AbductionRisk structure
    faceDetails No Array An array containing the face attribute (faceDetail) structure
    gameDetails No Object Game details
    polityScore No Number Score for image involving politically sensitive information
    illegalScore No Number Score for image involving illegal information
    terrorScore No Number Score for image involving terrorism information
    similarScore No Number Score for image similarity
    stream_param No String Push parameter
    app No String Push domain name
    appid No Number APPID
    appname No String Push path

    AbductionRisk

    Parameter *Required * Data Type Description
    level Yes Number Risk level ranges from 0 to 4. The larger the number, the greater the risk. 3 and 4 indicate maliciousness and we recommend you deal with such images
    type Yes Number Risk type. 20002: porn

    faceDetail

    *Parameter Name *Required * Type Description
    gender No Number Gender [0 (female)–100 (male)]
    age No Number Age
    expression No Number Expression [0 (normal)–50 (smile)–100 (laugh)]
    beauty No Number Attractiveness [0–100]
    x No Number x coordinate of the top-left corner of face frame
    y No Number y coordinate of the top-left corner of face frame
    width No Number Face frame width
    height No Number Face frame height

    gameDetails

    *Parameter Name *Required * Type Description
    battlegrounds No Object PUBG information
    gameList No Array Game list

    gameList

    *Parameter Name *Required * Type Description
    name No String Game name
    confidence No Number Probability

    Sample callback message

    HTTP Body:

    {
        "event_type":317,
    
        "ocrMsg":"",
    
        "type":[2],
    
        "confidence":0,
    
        "normalScore":2,
    
        "hotScore":97,
    
        "pornScore":0,
    
        "screenshotTime":1575513174,
    
        "level":0,
    
        "img":"http://test-10000.cos.ap-shanghai.myqcloud.com/2019-12-05/teststream-screenshot-10-32-54-960x540.jpg",
    
        "abductionRisk":[ ],
    
        "faceDetails":[ ],
    
        "sendTime":1575513176,
    
        "illegalScore":0,
    
        "polityScore":0,
    
        "similarScore":0,
    
        "terrorScore":0,
    
        "tid":20001,
    
        "streamId":"teststream",
    
        "channelId":"teststream",
    
        "stream_param":"txSecret=40f38f69f574fd51126c421a3d96c374&txTime=5DEBEC80",
    
        "app":"testlive.myqcloud.com",
    
        "appname":"live",
    
        "appid":10000
    }  

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback
    Help