QueryVideoCognitionJob

Updated at:

Queries the task result of the video understanding node.

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 this ID from the response parameters of the Submit an intelligent 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 include the automatic speech recognition (ASR) results.

true

NeedOcr

boolean

No

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

true

NeedProcess

boolean

No

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

true

Response elements

Element

Type

Description

Example

object

JobStatus

string

The status of the job. Valid values:

  • Success: The job is completed.

  • Fail: The job failed.

  • Processing: The job is being processed.

  • Submitted: The job 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 labels.

  2. VideoLabel: video labels.

  3. ASR: original automatic speech recognition (ASR) results, which are not returned by default.

  4. OCR: original optical character recognition (OCR) results, which are not returned by default.

  5. NLP: natural language processing (NLP) results, which are not returned by default.

  6. Process: links to the original results of the operators, which are not returned by default.

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

Params

string

Input

object

The input media asset information of the job.

Type

string

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

Media

string

The URL of the input file.

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 (political figure), sensitive (sensitive figure), 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 coordinates of the face.
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 shot type of the person. 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 more information, 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. For example, the life category can be subdivided into health and home.

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, horseback riding, and fighting.
RegionFor example, Tiananmen Square in Beijing, Statue of Liberty, Leshan Giant Buddha, China, and the 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 (political figure), and sensitive (sensitive figure).
persons.scoredoubleThe confidence score of the person.
persons.positionJSONObjectThe coordinates of the face.
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 shot type of the person. 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 more information, 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 the 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, horseback 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 more information, see the following table.
tags.nameStringThe tag category.
tags.valueStringThe tag value. Multiple tag values are separated by commas (,).

Examples of text tags

namevalue
RegionFor example, Tiananmen Square in Beijing, Statue of Liberty, Leshan Giant Buddha, China, and the 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: hot words (user-followed lists)

  • 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 string.
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 Variety 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 highlight word content.
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 highlight word content.
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.

Automatic 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.

Optical character recognition (OCR) results

NameTypeDescription
detailsJSONArrayThe detailed results of the job.
details.timestampdoubleThe timestamp information, in seconds.
details.infoJSONArrayThe specific information recognized at the timestamp.
details.info.scoredoubleThe confidence score.
details.info.positionJSONObjectThe coordinates of the text.
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 job by calling SubmitSmarttagJob, the original title entered by the user is returned when you call QuerySmarttagJob to query the results.

NameTypeDescription
titleStringThe title.

Subtitle extraction results

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

Content of the subtitle result URL: Sequence number + Time period + Subtitle content (each subtitle sentence occupies one line).

Natural language processing (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 with 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 speaker 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 corresponding 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 minutes extraction, including keyword, key sentence, and to-do item extraction)

ParameterTypeDescription
meetingAssistanceobjectThe intelligent 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 key sentence sequence number.
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": "",
  "Params": "",
  "Input": {
    "Type": "",
    "Media": ""
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.