QueryVideoCognitionJob

Updated at:

Queries the result of a video understanding job.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ice:QueryVideoCognitionJob

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

JobId

string

Yes

The ID of the intelligent tagging job to query. You can obtain the ID from the response parameters of the Submit a smart tagging job operation.

****20b48fb04483915d4f2cd8ac****

Params

string

No

The additional request parameters, represented as a JSON string.

{}

IncludeResults

object

No

Specifies whether to include the complete algorithm results in the query results.

NeedAsr

boolean

No

Specifies whether to display the automatic speech recognition (ASR) results.

true

NeedOcr

boolean

No

Specifies whether to display the optical character recognition (OCR) results.

true

NeedProcess

boolean

No

Specifies whether to display the links to the original results of the operators.

true

Response elements

Element

Type

Description

Example

object

JobStatus

string

The status of the task. Valid values:

  • Success: The task is processed successfully.

  • Fail: The task fails to be processed.

  • Processing: The task is being processed.

  • Submitted: The task is submitted and waiting to be processed.

Success

RequestId

string

The ID of the request.

******11-DB8D-4A9A-875B-275798******

UserData

string

The custom user information.

{"userId":"123432412831"}

Results

object

result

array<object>

The array of analysis result objects.

object

The video content understanding results.

Type

string

The type of the analysis result. Valid values:

  1. TextLabel: text tags.

  2. VideoLabel: video tags.

  3. ASR: original automatic speech recognition (ASR) results. By default, this value is not returned.

  4. OCR: original optical character recognition (OCR) results. By default, this value is not returned.

  5. NLP: natural language processing (NLP) results. By default, this value is not returned.

  6. Process: links to the original results of the operators. By default, this value is not returned.

ASR

Data

string

The specific data of the analysis result, represented as a JSON string. For the data structures of different types, see the Result parameter description below.

{"title":"example-title-****"}

TemplateId

string

The ID of the smart tagging template.

S00000101-100040

Params

string

The extended parameters.

{"directOssAccess":true}

Input

object

The input media asset information of the task.

Type

string

The type of the input file. Valid values: OSS.

OSS

Media

string

The URL of the input file.

https://example-bucket.oss-cn-hangzhou.aliyuncs.com/test/video.mp4

Result parameter description

VideoLabel data structure

NameTypeDescription
personsJSONArrayThe detected person results.
persons.nameStringThe name of the recognized person.
persons.categoryStringThe type of the person. Valid values: celebrity (celebrity), politician (politician), sensitive (sensitive person), unknown (unknown person), and the ID of the custom person library (returned when the recognized person is a custom person).
persons.ratiodoubleThe appearance rate of the person. Valid values: 0 to 1.
persons.occurrencesJSONArrayThe detailed information about the person's appearances.
persons.occurrences.scoredoubleThe confidence score.
persons.occurrences.fromdoubleThe start time when the person is detected, in seconds.
persons.occurrences.todoubleThe end time when the person is detected, in seconds.
persons.occurrences.positionJSONObjectThe face coordinates.
persons.occurrences.position.leftTopint[]The x and y coordinates of the upper-left corner.
persons.occurrences.position.rightBottomint[]The x and y coordinates of the lower-right corner.
persons.occurrences.timestampdoubleThe timestamp of the face coordinates, in seconds.
persons.occurrences.sceneStringThe person shot type. Valid values: closeUp (close-up), medium-closeUp (medium close-up), medium (medium shot), and medium-long (medium long shot).
tagsJSONArrayThe detected tags for objects and scenes. For examples, see the following table.
tags.mainTagNameStringThe main tag.
tags.subTagNameStringThe sub-tag.
tags.ratiodoubleThe appearance rate. Valid values: 0 to 1.
tags.occurrencesJSONArrayThe detailed information about the appearances.
tags.occurrences.scoredoubleThe confidence score.
tags.occurrences.fromdoubleThe start time, in seconds.
tags.occurrences.todoubleThe end time, in seconds.
classificationsJSONArrayThe video classification information.
classifications.scoredoubleThe confidence score.
classifications.category1StringThe level-1 category, such as life, anime, and automobile.
classifications.category2StringThe level-2 category, such as health and home under the life category.

Examples of video tags

mainTagNamesubTagName
ProgramFor example, Where Are We Going, Dad? and Happy Comedian.
Character roleFor example, doctor, nurse, and teacher.
ObjectFor example, piano, water cup, desk, scrambled eggs with tomatoes, car, and cosmetics.
LogoFor example, CCTV1, CCTV2, Youku, and Dragon TV.
Action and eventFor example, dancing, kissing, hugging, meeting, singing, making a phone call, horse riding, and fighting.
RegionFor example, Tiananmen Square in Beijing, Statue of Liberty, Leshan Giant Buddha, China, and United States.
SceneFor example, bedroom, subway station, terraced fields, beach, and desert.

ImageLabel data structure

NameTypeDescription
personsJSONArrayThe detected person results.
persons.nameStringThe name of the recognized person.
persons.categoryStringThe type of the person. Valid values: celebrity (celebrity), politician (politician), and sensitive (sensitive person).
persons.scoredoubleThe confidence score of the person.
persons.positionJSONObjectThe face coordinates.
persons.position.leftTopint[]The x and y coordinates of the upper-left corner.
persons.position.rightBottomint[]The x and y coordinates of the lower-right corner.
persons.sceneStringThe person shot type. Valid values: closeUp (close-up), medium-closeUp (medium close-up), medium (medium shot), and medium-long (medium long shot).
tagsJSONArrayThe detected tags for objects and scenes. For examples, see the following table.
tags.mainTagNameStringThe main tag.
tags.subTagNameStringThe sub-tag.
tags.scoredoubleThe confidence score.

Examples of image tags

mainTagNamesubTagName
Character roleFor example, doctor, nurse, and teacher.
RegionFor example, Tiananmen Square in Beijing, Statue of Liberty, Leshan Giant Buddha, China, and United States.
Action and eventFor example, speaking.
LogoFor example, CCTV1, CCTV2, Youku, and Dragon TV.
Action and eventFor example, dancing, kissing, hugging, meeting, singing, making a phone call, horse riding, and fighting.
ObjectFor example, piano, water cup, desk, scrambled eggs with tomatoes, car, and cosmetics.
SceneFor example, bedroom, subway station, terraced fields, beach, and desert.

TextLabel data structure (derived from ASR and OCR)

NameTypeDescription
tagsJSONArrayThe text tag information. For examples, see the following table.
tags.nameStringThe tag category.
tags.valueStringThe tag values. Multiple tag values are separated by commas (,).

Examples of tags

namevalue
RegionFor example, Tiananmen Square in Beijing, Statue of Liberty, Leshan Giant Buddha, China, and United States.
OrganizationFor example, China Wildlife Conservation Association and China Media Group.
LogoFor example, Nike and Li-Ning.
KeywordFor example, core force.

CPVLabel data structure

  • cates: categories (level-1, level-2, and level-3 categories).

  • entities: category attributes (with knowledge graph information).

  • hotwords: hotwords (list of user interests).

  • freeTags: free tags (keywords).

NameTypeExampleDescription
typeStringhmiThe result type. Valid values: hmi (human-machine collaboration result) and autp (machine tagging result).
catesJSONArray-The classification category results.
cates.labelLevel1StringTourismThe level-1 tag.
cates.labelLevel2StringTourism sceneryThe level-2 tag.
cates.labelString""The tag name. The algorithm may return an empty value.
cates.appearanceProbabilitydouble0.96The appearance rate.
cates.detailInfoJSONArray--
cates.detailInfo.scoredouble0.9The confidence score.
cates.detailInfo.startTimedouble0.021The start time.
cates.detailInfo.endTimedouble29.021The end time.
entitiesJSONArray--
entities.labelLevel1StringRegionThe level-1 tag.
entities.labelLevel2StringLandmarkThe level-2 tag.
entities.labelStringHuangguoshu WaterfallThe tag name.
entities.appearanceProbabilitydouble0.067The appearance rate.
entities.knowledgeInfoString{"name": "Huangguoshu Waterfall", "nameEn": "Huangguoshu Waterfall", "description": "One of the four major waterfalls in Asia"}The knowledge graph information. For all fields, see the attached tables: Film and TV IP graph, music graph, person graph, landmark graph, and object graph.
entities.detailInfoJSONArray--
entities.detailInfo.scoredouble0.33292606472969055The confidence score.
entities.detailInfo.startTimedouble6.021The start time.
entities.detailInfo.endTimedouble8.021The end time.
entities.detailInfo.trackDataJSONArray-The structured information of the entity tag.
entities.detailInfo.trackData.scoredouble0.32The confidence score.
entities.detailInfo.trackData.bboxinteger[]23, 43, 45, 67The bounding box coordinates.
entities.detailInfo.trackData.timestampdouble7.9The timestamp.
hotwordsJSONArray--
hotwords.labelLevel1StringKeywordThe level-1 tag.
hotwords.labelLevel1StringKeywordThe level-2 tag.
hotwords.labelLevel2String""The level-2 tag.
hotwords.labelStringChina Meteorological AdministrationThe content of the highlight word.
hotwords.appearanceProbabilitydouble0.96The appearance rate.
hotwords.detailInfoJSONArray
hotwords.detailInfo.scoredouble1.0The confidence score.
hotwords.detailInfo.startTimedouble0.021The start time.
hotwords.detailInfo.endTimedouble29.021The end time.
freeTagsJSONArray
freeTags.labelLevel1StringKeywordThe level-1 tag.
freeTags.labelLevel2String""The level-2 tag.
freeTags.labelStringNational Meteorological CenterThe content of the highlight word.
freeTags.appearanceProbabilitydouble0.96The appearance rate.
freeTags.detailInfoJSONArray
freeTags.detailInfo.scoredouble0.9The confidence score.
freeTags.detailInfo.startTimedouble0.021The start time.
freeTags.detailInfo.endTimedouble29.021The end time.

Speech recognition ASR results

NameTypeDescription
detailsJSONArrayThe detailed results of the job.
details.fromdoubleThe start timestamp, in seconds.
details.todoubleThe end timestamp, in seconds.
details.contentStringThe recognized text content.

OCR results

NameTypeDescription
detailsJSONArrayThe detailed results of the task.
details.timestampdoubleThe timestamp information, in seconds.
details.infoJSONArrayThe specific information recognized at the timestamp.
details.info.scoredoubleThe confidence score.
details.info.positionJSONObjectThe text coordinates.
details.info.position.leftTopint[]The x and y coordinates of the upper-left corner.
details.info.position.rightBottomint[]The x and y coordinates of the lower-right corner.
details.info.contentStringThe recognized text content.

Meta tagging results

Note

If you do not use human-machine tagging and specify needMetaData when submitting a task by calling SubmitSmarttagJob, QuerySmarttagJob returns the original title entered by the user.

NameTypeDescription
titleStringThe title.

Subtitle extraction results

NameTypeDescription
detailsJSONArrayThe detailed results of the task.
details.allResultUrlStringThe URL of all subtitle results. The URL is valid for half a year after the task is completed.
details.chResultUrlStringThe URL of the Chinese results. The URL is valid for half a year after the task is completed.
details.engResultUrlStringThe URL of the English results. The URL is valid for half a year after the task is completed.
Note

Subtitle result URL content: Sequence number + Time period + Subtitle content (each subtitle sentence is on a separate line).

NLP results

ParameterTypeDescription
transcriptionobjectThe speech transcription results.
autoChaptersobjectThe chapter overview results.
summarizationobjectThe large model summarization results.
meetingAssistanceobjectThe intelligent meeting minutes results.
translationobjectThe text translation results.

transcription (speech transcription)

ParameterTypeDescription
transcriptionobjectThe speech transcription result object.
transcription.paragraphslist[]The collection of speech transcription structures organized in paragraphs.
transcription.paragraphs[i].paragraphIdstringThe paragraph-level ID.
transcription.paragraphs[i].speakerIdstringThe speaker ID.
transcription.paragraphs[i].wordslist[]The word information contained in the paragraph.
transcription.paragraphs[i].words[i].idintThe word sequence number, which usually does not require attention.
transcription.paragraphs[i].words[i].sentenceIdintThe sentence ID. Word information belonging to the same SentenceId can be assembled into a sentence.
transcription.paragraphs[i].words[i].startlongThe start time of the word relative to the start time of the audio. It is a relative timestamp, in milliseconds.
transcription.paragraphs[i].words[i].endlongThe end time of the word relative to the start time of the audio. It is a relative timestamp, in milliseconds.
transcription.paragraphs[i].words[i].textstringThe word text.

summarization (full-text summary, speaker summary, and question summary)

ParameterTypeDescription
summarizationobjectThe summary result object, which may contain zero or more results of different summary types.
summarization.paragraphSummarystringThe full-text summary result.
summarization.conversationalSummarylist[]The list of speech summary results.
summarization.conversationalSummary[i].speakerIdstringThe speaker ID.
summarization.conversationalSummary[i].speakerNamestringThe speaker name.
summarization.conversationalSummary[i].summarystringThe summary corresponding to the speaker.
summarization.questionsAnsweringSummarylist[]The list of question answering summary results.
summarization.questionsAnsweringSummary[i].questionstringThe question.
summarization.questionsAnsweringSummary[i].sentenceIdsOfQuestionlist[]The list of SentenceIds of the original speech transcription from which the question is extracted.
summarization.questionsAnsweringSummary[i].answerstringThe answer to the question.
summarization.questionsAnsweringSummary[i].sentenceIdsOfAnswerlist[]The list of SentenceIds of the original speech transcription from which the answer is summarized.
summarization.mindMapSummarylist[object]The list of mind map summary results, which may contain summaries of various topics and relationships between topics.
summarization.mindMapSummary[i].titlestringThe title of the topic.
summarization.mindMapSummary[i].topiclist[object]The array containing each topic and its subtopics.
summarization.mindMapSummary[i].topic[i].titlestringThe title of the topic.
summarization.mindMapSummary[i].topic[i].topiclist[object]The array of subtopics of the topic, which can be an empty array.

translation (full-text translation)

ParameterTypeDescription
translationobjectThe translation result object.
translation.paragraphslist[]The collection of translation results organized in paragraphs, corresponding to the speech recognition result message.
translation.paragraphs.paragraphIdstringThe paragraph segmentation ID, corresponding to the ParagraphId in the speech recognition results.
translation.paragraphs.sentenceslist[]The collection of translated texts.
translation.paragraphs.sentences[i].sentenctIdlongThe sentence ID.
translation.paragraphs.sentences[i].startlongThe start time of the paragraph relative to the start time of the audio. It is a relative timestamp, in milliseconds.
translation.paragraphs.sentences[i].endlongThe end time of the paragraph relative to the start time of the audio. It is a relative timestamp, in milliseconds.
translation.paragraphs.sentences[i].textstringThe translated text, corresponding to the speech recognition result message.

autoChapters (chapter recognition)

ParameterTypeDescription
autoChapterslist[]The chapter overview collection, containing zero, one, or more chapter overview information.
autoChapters[i].idintThe sequence number of the chapter.
autoChapters[i].startlongThe start time of the chapter relative to the start time of the audio. It is a relative timestamp, in milliseconds.
autoChapters[i].endlongThe end time of the chapter relative to the start time of the audio. It is a relative timestamp, in milliseconds.
autoChapters[i].headlinestringThe one-sentence title of the chapter.
autoChapters[i].summarystringThe chapter summary.

meetingAssistance (intelligent meeting minutes extraction, including keywords, key sentences, and to-do items)

ParameterTypeDescription
meetingAssistanceobjectThe intelligent meeting minutes result object, which may contain zero or more results of different types.
meetingAssistance.keywordslist[]The keyword extraction results.
meetingAssistance.keySentenceslist[]The key sentence extraction results, also known as key content.
meetingAssistance.keySentences[i].idlongThe sequence number of the key sentence.
meetingAssistance.keySentences[i].sentenceIdlongThe sentence ID corresponding to the key sentence in the original ASR transcription.
meetingAssistance.keySentences[i].startlongThe start time relative to the start time of the audio. It is a relative timestamp, in milliseconds.
meetingAssistance.keySentences[i].endlongThe end time relative to the start time of the audio. It is a relative timestamp, in milliseconds.
meetingAssistance.keySentences[i].textstringThe key sentence information.
meetingAssistance.actionslist[]The collection of to-do content and to-do summaries.
meetingAssistance.actions[i].idlongThe to-do sequence number.
meetingAssistance.actions[i].sentenceIdlongThe sentence ID corresponding to the key sentence in the original ASR transcription.
meetingAssistance.actions[i].startlongThe start time relative to the start time of the audio. It is a relative timestamp, in milliseconds.
meetingAssistance.actions[i].endlongThe end time relative to the start time of the audio. It is a relative timestamp, in milliseconds.
meetingAssistance.actions[i].textstringThe to-do content.
meetingAssistance.classificationsobjectThe scene classification. Currently, there are only three scene classifications.
meetingAssistance.classifications.interviewfloatThe confidence score for the interview scene.
meetingAssistance.classifications.lecturefloatThe confidence score for the lecture scene.
meetingAssistance.classifications.meetingfloatThe confidence score for the meeting scene.

Examples

Success response

JSON format

{
  "JobStatus": "Success",
  "RequestId": "******11-DB8D-4A9A-875B-275798******\n",
  "UserData": "{\"userId\":\"123432412831\"}\n",
  "Results": {
    "result": [
      {
        "Type": "ASR",
        "Data": "{\"title\":\"example-title-****\"}\t\n"
      }
    ]
  },
  "TemplateId": "S00000101-100040",
  "Params": "{\"directOssAccess\":true}",
  "Input": {
    "Type": "OSS",
    "Media": "https://example-bucket.oss-cn-hangzhou.aliyuncs.com/test/video.mp4"
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.