tencent cloud

Feedback

Querying Live Stream Moderation Job Result

Last updated: 2024-02-19 14:59:07

    Feature Description

    This API is used to query the result of a specified live stream moderation job. The live stream moderation feature is async. You can submit a job to moderate your live streams, and then use the API for querying live stream moderation job result to get the moderation results.

    Request

    Sample request

    GET /video/auditing/<jobId> HTTP/1.1
    Host: <BucketName-APPID>.ci.<Region>.myqcloud.com
    Date: <GMT Date>
    Authorization: <Auth String>
    Note:
    Authorization: Auth String (for more information, see Request Signature).
    When this feature is used by a sub-account, relevant permissions must be granted.

    Request headers

    This API only uses common request headers. For more information, see Common Request Headers.

    Request body

    This request does not have a request body.

    Response

    Response headers

    This API only returns common response headers. For more information, see Common Response Headers.

    Response body

    The response body returns application/xml data. The following contains all the nodes:
    <Response>
    <JobsDetail>
    <Code>Success</Code>
    <Message>Success</Message>
    <DataId></DataId>
    <JobId></JobId>
    <State></State>
    <CreationTime></CreationTime>
    <Type>live_video</Tpye>
    <SnapshotCount></SnapshotCount>
    <Result>1</Result>
    <Label></Label>
    <PornInfo>
    <HitFlag></HitFlag>
    <Count></Count>
    </PornInfo>
    <AdsInfo>
    <HitFlag></HitFlag>
    <Count></Count>
    </AdsInfo>
    <Snapshot>
    <Url></Url>
    <Text></Text>
    <Label></Label>
    <Result>1</Result>
    <SnapshotTime></SnapshotTime>
    <PornInfo>
    <HitFlag></HitFlag>
    <Score></Score>
    <Label></Label>
    <Category></Category>
    <SubLabel></SubLabel>
    </PornInfo>
    <AdsInfo>
    <HitFlag></HitFlag>
    <Score></Score>
    <Label></Label>
    <Category></Category>
    <SubLabel></SubLabel>
    </AdsInfo>
    </Snapshot>
    <AudioSection>
    <Url></Url>
    <OffsetTime>0</OffsetTime>
    <Duration>3000</Duration>
    <Text>Haha</Text>
    <Label></Label>
    <Result>1</Result>
    <PornInfo>
    <HitFlag></HitFlag>
    <Score></Score>
    <Category></Category>
    <Keywords></Keywords>
    </PornInfo>
    <AdsInfo>
    <HitFlag></HitFlag>
    <Score></Score>
    <Category></Category>
    <Keywords></Keywords>
    </AdsInfo>
    </AudioSection>
    </JobsDetail>
    <RequestId></RequestId>
    </Response>
    The nodes are as described below:
    Node Name (Keyword)
    Parent Node
    Description
    Type
    Response
    None
    Full information of the live stream moderation result.
    Container
    Response has the following sub-nodes:
    Node Name (Keyword)
    Parent Node
    Description
    Type
    JobsDetail
    Response
    Details of the live stream moderation job.
    Container
    RequestId
    Response
    The ID automatically generated by the server for a request when the request is sent, which can help locate problems faster.
    String
    JobsDetail has the following sub-nodes:
    Node Name (Keyword)
    Parent Node
    Description
    Type
    Code
    Response.JobsDetail
    Error code, which will be returned only if State is Failed. For more information, see Error Codes.
    String
    Message
    Response.JobsDetail
    Error message, which will be returned only if State is Failed.
    String
    DataId
    Response.JobsDetail
    This field will return the original content if the DataId parameter is configured during job submission, which can contain up to 512 bytes. You can use this field to uniquely identify the data to be moderated in your business.
    String
    JobId
    Response.JobsDetail
    ID of the live stream moderation job.
    String
    State
    Response.JobsDetail
    Status of the live stream moderation job. Valid values: Submitted, Success, Failed, Auditing.
    String
    CreationTime
    Response.JobsDetail
    Creation time of the live stream moderation job.
    String
    SnapshotCount
    Response.JobsDetail
    If the moderated live stream contains a video stream, this field indicates the total number of live stream screenshots.
    String
    Label
    Response.JobsDetail
    This field is used to return the maliciousness tag with the highest priority in the detection result, which represents the moderation result suggested by the model. We recommend you handle different types of violations and suggestions based on your business needs. Returned values: Normal, Porn, Ads, and other types of unsafe or inappropriate content.
    String
    Result
    Response.JobsDetail
    This field indicates the moderation result. You can perform subsequent operations based on the result. We recommend you handle different results based on your business needs.
    Valid values: 0 (normal), 1 (sensitive), and 2 (suspiciously sensitive, with human review recommended).
    Integer
    PornInfo
    Response.JobsDetail
    The moderation result of the pornographic information moderation scene.
    Container
    AdsInfo
    Response.JobsDetail
    The moderation result of the advertising information moderation scene.
    Container
    Snapshot
    Response.JobsDetail
    This field is used to return the result of live stream image moderation.
    Container Array
    AudioSection
    Response.JobsDetail
    If the moderated live stream contains an audio stream, this field is used to return the result of live stream sound moderation. If no audio is detected, it will not be returned.
    Container Array
    UserInfo
    Response.JobsDetail
    Business field. This field will not exist if UserInfo is not set during job creation.
    Container
    Type
    Response.JobsDetail
    Moderation type, which is fixed at live_video for live stream moderation.
    String
    PornInfo and AdsInfo have the following sub-nodes:
    Node Name (Keyword)
    Parent Node
    Description
    Type
    HitFlag
    Response.JobsDetail.*Info
    Whether the moderation type is hit. Valid values: 0 (miss), 1 (hit), 2 (suspected).
    Integer
    Count
    Response.JobsDetail.*Info
    The number of screenshots that hit this moderation scene.
    Integer
    Snapshot has the following sub-nodes:
    Node Name (Keyword)
    Parent Node
    Description
    Type
    Url
    Response.JobsDetail.Snapshot
    URL of the current live stream screenshot, at which you can view the screenshot. It must be a standard URL.
    Note: Each URL is valid for two hours. If you need to view the data after two hours, initiate a new query request.
    String
    SnapshotTime
    Response.JobsDetail.Snapshot
    This field returns the timestamp of the current screenshot in milliseconds, such as 1649387157000.
    Integer
    Text
    Response.JobsDetail.Snapshot
    This field is used to return the OCR text recognition result of the current screenshot. It will be returned only if text content detection is enabled in the moderation policy.
    String
    Label
    Response.JobsDetail.Snapshot
    This field is used to return the maliciousness tag with the highest priority in the detection result, which represents the moderation result suggested by the model. We recommend you handle different types of violations and suggestions based on your business needs. Returned values: Normal, Porn, Ads, and other types of unsafe or inappropriate content.
    String
    Result
    Response.JobsDetail.Snapshot
    This field indicates the moderation result. You can perform subsequent operations based on the result. We recommend you handle different results based on your business needs.
    Valid values: 0 (normal), 1 (sensitive), and 2 (suspiciously sensitive, with human review recommended).
    Integer
    PornInfo
    Response.JobsDetail.Snapshot
    The moderation result of the pornographic information moderation scene.
    Container
    AdsInfo
    Response.JobsDetail.Snapshot
    The moderation result of the advertising information moderation scene.
    Container
    PornInfo and AdsInfo have the following sub-nodes:
    Node Name (Keyword)
    Parent Node
    Description
    Type
    HitFlag
    Response.JobsDetail.Snapshot.*Info
    Whether the moderation type is hit. Valid values: 0 (miss), 1 (hit), 2 (suspected).
    Integer
    Score
    Response.JobsDetail.Snapshot.*Info
    The confidence the moderation result hits the moderation scene. Value range: 0–100. The higher the value, the more likely the content hits the currently returned moderation scene.
    For example, Porn 99 means that the content is very likely to be pornographic.
    Integer
    Label
    Response.JobsDetail.Snapshot.*Info
    This field indicates the overall result tag of the screenshot, which may be SubLabel, a person name, etc.
    String
    Category
    Response.JobsDetail.Snapshot.*Info
    This field indicates the specific hit moderation type.
    Note: This field may return null.
    String
    SubLabel
    Response.JobsDetail.Snapshot.*Info
    This field indicates the specific sub-tag hit by the moderation job; for example, SexBehavior is a sub-tag under the Porn tag.
    Note: This field may return null, indicating that no specific sub-tags are hit.
    String
    OcrResults
    Response.JobsDetail.Snapshot.*Info
    This field represents the detailed OCR result, including the text coordinate information and text recognition result. It will be returned if there is non-compliant content.
    Container Array
    LibResults
    Response.JobsDetail.Snapshot.*Info
    This field returns results based on recognition against the risk library.
    Note: This field will not be returned if no samples in the risk library are hit.
    Container Array
    LibResults has the following sub-nodes:
    Node Name (Keyword)
    Parent Node
    Description
    Type
    ImageId
    Response.JobsDetail.Snapshot.*Info.LibResults
    This field represents the hit image sample ID in the risk library.
    String
    Score
    Response.JobsDetail.Snapshot.*Info.LibResults
    This field returns the confidence under the current tag. Value range: 0–100. The higher the value, the more likely the image hits a sample in the risk library. For example, Porn 99 means that the content is very likely to hit a pornographic sample in the library.
    Integer
    OcrResults has the following sub-nodes:
    Node Name (Keyword)
    Parent Node
    Description
    Type
    Text
    Response.JobsDetail.Snapshot.*Info.OcrResults
    The specific text content recognized by OCR in the image.
    String
    Keywords
    Response.JobsDetail.Snapshot.*Info.OcrResults
    Keywords hit by the current moderation scene.
    String Array
    Location
    Response.JobsDetail.Snapshot.*Info.OcrResults
    This parameter is used to return the position (X and Y coordinates of the top-left corner, length, width, and rotation angle) of the OCR detection frame in the image for quick location of the recognized text.
    Container
    ObjectResults has the following sub-nodes:
    Node Name (Keyword)
    Parent Node
    Description
    Type
    Name
    Response.JobsDetail.Snapshot.*Info.ObjectResults
    This field is used to return the name of the recognized object, such as person name.
    String
    Location
    Response.JobsDetail.Snapshot.*Info.ObjectResults
    This parameter is used to return the position (X and Y coordinates of the top-left corner, length, width, and rotation angle) of the recognition result in the image for you to quickly locate information.
    Container
    Location has the following sub-nodes:
    Node Name (Keyword)
    Description
    Type
    X
    This parameter is used to return the pixel position of the abscissa (X) of the top-left corner of the detection frame. It can be combined with other parameters to uniquely determine the size and position of the detection frame.
    Float
    Y
    This parameter is used to return the pixel position of the ordinate of the top-left corner (Y) of the detection frame. It can be combined with other parameters to uniquely determine the size and position of the detection frame.
    Float
    Height
    This parameter is used to return the height of the detection frame (the length starting from the top-left corner and extending down the Y axis). It can be combined with other parameters to uniquely determine the size and position of the detection frame.
    Float
    Width
    This parameter is used to return the width of the detection frame (the length starting from the top-left corner and extending to the right on the X axis). It can be combined with other parameters to uniquely determine the size and position of the detection frame.
    Float
    Rotate
    This parameter is used to return the rotation angle of the detection frame. Valid values: 0–360 (degrees), and the direction is counterclockwise rotation. This parameter can be combined with the X and Y coordinate parameters to uniquely determine the specific position of the detection frame.
    Float
    AudioSection has the following sub-nodes:
    Node Name (Keyword)
    Parent Node
    Description
    Type
    Url
    Response.JobsDetail.AudioSection
    URL of the current live stream sound segment, at which you can get the content of the segment. It must be a standard URL.
    Note: Each URL is valid for two hours. If you need to view the data after two hours, initiate a new query request.
    String
    Text
    Response.JobsDetail.AudioSection
    This field is used to return the ASR text recognition result of the current live stream sound segment.
    String
    OffsetTime
    Response.JobsDetail.AudioSection
    This field returns the timestamp of the current sound segment in milliseconds, such as 1649387157000.
    Integer
    Duration
    Response.JobsDetail.AudioSection
    The duration of the current sound segment in milliseconds.
    Integer
    Label
    Response.JobsDetail.Snapshot
    This field is used to return the maliciousness tag with the highest priority in the detection result, which represents the moderation result suggested by the model. We recommend you handle different types of violations and suggestions based on your business needs. Returned values: Normal, Porn, Ads, and other types of unsafe or inappropriate content.
    String
    Result
    Response.JobsDetail.Snapshot
    This field indicates the moderation result. You can perform subsequent operations based on the result. We recommend you handle different results based on your business needs.
    Valid values: 0 (normal), 1 (sensitive), and 2 (suspiciously sensitive, with human review recommended).
    Integer
    PornInfo
    Response.JobsDetail.AudioSection
    The moderation result of the pornographic information moderation scene.
    Container
    AdsInfo
    Response.JobsDetail.AudioSection
    The moderation result of the advertising information moderation scene.
    Container
    PornInfo and AdsInfo have the following sub-nodes:
    Node Name (Keyword)
    Parent Node
    Description
    Type
    HitFlag
    Response.JobsDetail.AudioSection.*Info
    Whether the moderation type is hit. Valid values: 0 (miss), 1 (hit), 2 (suspected).
    String
    Score
    Response.JobsDetail.AudioSection.*Info
    The confidence the moderation result hits the moderation scene. Value range: 0–100. The higher the value, the more likely the content hits the currently returned moderation scene.
    For example, Porn 99 means that the content is very likely to be pornographic.
    String
    Category
    Response.JobsDetail.AudioSection.*Info
    This field indicates the specific hit moderation type.
    Note: This field may return null.
    String
    Keywords
    Response.JobsDetail.AudioSection.*Info
    Keywords hit by the current moderation scene. Nothing will be returned if there is none.
    String Array
    LibResults
    Response.JobsDetail.AudioSection.*Info
    This field returns results based on recognition against the risk library. Note: This field will not be returned if no samples in the risk library are hit.
    Container Array
    LibResults has the following sub-nodes:
    Node Name (Keyword)
    Parent Node
    Description
    Type
    LibType
    Response.JobsDetail.AudioSection.*Info.LibResults
    Type of the hit risk library. Valid values: 1 (preset risk library); 2 (custom risk library).
    Integer
    LibName
    Response.JobsDetail.AudioSection.*Info.LibResults
    Name of the hit risk library.
    String
    Keywords
    Response.JobsDetail.AudioSection.*Info.LibResults
    Keywords hit in the library. There may be multiple returned values representing multiple hit keywords.
    String Array
    UserInfo has the following sub-nodes:
    Node Name (Keyword)
    Parent Node
    Description
    Type
    Required
    TokenId
    Request.Input.UserInfo
    Account information, which can contain up to 128 bytes.
    String
    No
    Nickname
    Request.Input.UserInfo
    Nickname information, which can contain up to 128 bytes.
    String
    No
    DeviceId
    Request.Input.UserInfo
    Device information, which can contain up to 128 bytes.
    String
    No
    AppId
    Request.Input.UserInfo
    Unique app ID, which can contain up to 128 bytes.
    String
    No
    Room
    Request.Input.UserInfo
    Room ID information, which can contain up to 128 bytes.
    String
    No
    IP
    Request.Input.UserInfo
    IP address information, which can contain up to 128 bytes.
    String
    No
    Type
    Request.Input.UserInfo
    Business type, which can contain up to 128 bytes.
    String
    No
    ReceiveTokenId
    Request.Input.UserInfo
    User account to receive messages, which can contain up to 128 bytes.
    String
    No
    Gender
    Request.Input.UserInfo
    Gender information, which can contain up to 128 bytes.
    String
    No
    Level
    Request.Input.UserInfo
    Level information, which can contain up to 128 bytes.
    String
    No
    Role
    Request.Input.UserInfo
    Role information, which can contain up to 128 bytes.
    String
    No

    Error codes

    There are no special error messages for this request. For common error messages, see Error Codes.

    Samples

    Request

    GET /video/auditing/vab1ca9fc8a3ed11ea834c525400863904 HTTP/1.1
    Accept: */*
    Authorization: q-sign-algorithm=sha1&q-ak=AKIDZfbOAo7cllgPvF9cXFrJD0a1ICvR****&q-sign-time=1497530202;1497610202&q-key-time=1497530202;1497610202&q-header-list=&q-url-param-list=&q-signature=28e9a4986df11bed0255e97ff90500557e0e****
    Host: examplebucket-1250000000.ci.ap-beijing.myqcloud.com

    Response

    HTTP/1.1 200 OK
    Content-Type: application/xml
    Content-Length: 666
    Connection: keep-alive
    Date: Thu, 15 Jun 2017 12:37:29 GMT
    Server: tencent-ci
    x-ci-request-id: NTk0MjdmODlfMjQ4OGY3XzYzYzhf****
    
    <Response>
    <JobsDetail>
    <JobId>vab1ca9fc8a3ed11ea834c525400863904</JobId>
    <State>Success</State>
    <CreationTime>2019-07-07T12:12:12+0800</CreationTime>
    <Type>live_video</Tpye>
    <SnapshotCount>1</SnapshotCount>
    <Label>Normal</Label>
    <Result>0</Result>
    <PornInfo>
    <HitFlag>0</HitFlag>
    <Count>0</Count>
    </PornInfo>
    <AdsInfo>
    <HitFlag>0</HitFlag>
    <Count>0</Count>
    </AdsInfo>
    <Snapshot>
    <Url>http://examplebucket-1250000000.cos.ap-chongqing.myqcloud.com/0.jpg</Url>
    <SnapshotTime>1649387157000</SnapshotTime>
    <Text>Haha</Text>
    <Label>Normal</Label>
    <Result>0</Result>
    <PornInfo>
    <HitFlag>0</HitFlag>
    <Score>0</Score>
    <Label></Label>
    <SubLabel></SubLabel>
    </PornInfo>
    <AdsInfo>
    <HitFlag>0</HitFlag>
    <Score>0</Score>
    <Label></Label>
    <SubLabel></SubLabel>
    </AdsInfo>
    </Snapshot>
    <AudioSection>
    <AdsInfo>
    <HitFlag>0</HitFlag>
    <Score>0</Score>
    </AdsInfo>
    <Duration>30000</Duration>
    <OffsetTime>1649387157000</OffsetTime>
    <Label>Normal</Label>
    <Result>0</Result>
    <PornInfo>
    <HitFlag>0</HitFlag>
    <Score>0</Score>
    </PornInfo>
    <Text>wc xx</Text>
    <Url>https://auditing-1250000000.cos.ap-guangzhou.myqcloud.com/q9MhdztF/0.mp3</Url>
    </AudioSection>
    </JobsDetail>
    <RequestId>xxxxxxxxxxxxxx</RequestId>
    </Response>
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support