本接口支持查询所有类型的DNA作业结果。
使用说明
- 提交DNA作业后,DNA服务会进行DNA对比,通过本接口可以查询作业结果。
- 查询文本DNA作业目前仅支持华东2(上海)地域使用。
QPS限制
本接口的单用户QPS限制为500次/秒。超过限制,API调用会被限流,这可能会影响您的业务,请合理调用。更多信息,请参见QPS限制。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
| 名称 | 类型 | 是否必选 | 示例值 | 描述 |
|---|---|---|---|---|
| Action | String | 是 | QueryFpShotJobList | 操作接口名,系统规定参数,取值: QueryFpShotJobList。 |
| JobIds | String | 否 | 88c6ca184c0e47098a5b665e2a12**** | 需要查询的DNA作业ID列表,可以通过[MPS控制台](https://mps.console.aliyun.com/overview) > 任务管理 > 视频DNA获取。一次最多查询10个,用半角逗号(,)分隔。 |
| NextPageToken | String | 否 | 16f01ad6175e4230ac42bb5182cd**** | 下一页标识。第一次请求无需传入,服务会返回,第二次请求传入即可。 |
| MaximumPageSize | Long | 否 | 10 | 每页最大返回数。
|
| State | String | 否 | All | 需要查询的作业状态。取值:
|
| StartOfJobCreatedTimeRange | String | 否 | 2021-12-22T03:48:05Z | 最早任务创建时间。
|
| EndOfJobCreatedTimeRange | String | 否 | 2022-02-14T02:16:07Z | 最晚任务创建时间。
|
| PipelineId | String | 否 | b11c171cced04565b1f38f1ecc39**** | 管道ID。可以通过**媒体处理控制台** > 全局设置 > 管道获取。 |
返回数据
| 名称 | 类型 | 示例值 | 描述 |
|---|---|---|---|
| RequestId | String | 25818875-5F78-4A13-BEF6-D7393642CA58 | 请求ID。 |
| NextPageToken | String | b11c171cced04565b1f38f1ecc39**** | 下一页标识。需记录下来,在下一次请求时传入即可。 |
| FpShotJobList | Array of FpShotJob | DNA作业信息。 |
|
| FpShotJob | |||
| FpShotResult | Object | DNA作业查询结果。 |
|
| AudioFpShots | Array of FpShot | 音频DNA查询结果。 |
|
| FpShot | |||
| PrimaryKey | String | 498ac941373341599c4777c8d884**** | 唯一主键。 |
| FpShotSlices | Array of FpShotSlice | 相似音频。 |
|
| FpShotSlice | |||
| Duplication | Object | DNA库中音频的开始时间和时长。 |
|
| Start | String | 0 | 开始时间。 |
| Duration | String | 3 | 时长。 |
| Similarity | String | 0 | 音频片段相似度。 |
| Input | Object | 输入音频的开始时间和时长。 |
|
| Start | String | 0 | 开始时间。 |
| Duration | String | 5 | 时长。 |
| Similarity | String | 0 | 音频整体相似度。 |
| FpShots | Array of FpShot | 视频DNA查询结果。 |
|
| FpShot | |||
| PrimaryKey | String | 498ac941373341599c4777c8d884**** | 视频唯一主键。 |
| FpShotSlices | Array of FpShotSlice | 相似视频。 |
|
| FpShotSlice | |||
| Duplication | Object | DNA库中视频的开始时间和时长。 |
|
| Start | String | 1260 | 开始时间。 |
| Duration | String | 48 | 时长。 |
| Similarity | String | 0 | 视频片段相似度。 |
| Input | Object | 输入视频的开始时间和时长。 |
|
| Start | String | 46 | 开始时间。 |
| Duration | String | 48 | 时长。 |
| Similarity | String | 0.8914769887924194 | 视频整体相似度。 说明 整体相似度是片段相似度的平均值。如果DNA库中存在多个相似段,会返回多个命中结果。 |
| TextFpShots | Array of TextFpShot | 文本DNA查询结果。 |
|
| TextFpShot | |||
| PrimaryKey | String | 3e34ac649945b53a1b0f863ce030**** | 文本唯一主键。 |
| Similarity | String | 1.0 | 文本相似度。 |
| TextFpShotSlices | Array of TextFpShotSlice | 重复文本。 |
|
| TextFpShotSlice | |||
| Similarity | String | 1.0 | 匹配片段的置信度。 |
| InputText | String | 今天下雪了 | 查询匹配的文本片段。 |
| DuplicationText | String | 今天下雪了 | 底库匹配的文本片段。 |
| InputFragment | Object | 查询匹配片段起始时间和时长。 |
|
| Start | String | 0 | 起始时间。 |
| Duration | String | 3 | 时长。 |
| CreationTime | String | 2017-01-10T12:00:00Z | 创建时间。 |
| FinishTime | String | 0 | 完成时间。 |
| State | String | Success | 作业状态,可取值:
|
| Message | String | The parameter \"Id\" is invalid.A uuid must:1)be comprised of chracters[a-f],numbers[0-9];2)be 32 characters long | 分析失败时错误信息。如果执行成功则不返回此参数。 |
| FpShotConfig | Object | 配置。 |
|
| PrimaryKey | String | 3ca84a39a9024f19853b21be9cf9**** | 唯一的视频主键,唯一性由用户保证。 |
| SaveType | String | save | 存储类型,取值:
|
| FpDBId | String | 2288c6ca184c0e47098a5b665e2a12**** | DNA库ID。 |
| FileId | String | ebb51ee30f0b49aba959823fa991**** | 文件ID。 |
| UserData | String | testid-001 | 用户自定义数据。 |
| Code | String | InvalidParameter.UUIDFormatInvalid | 分析失败时错误码。 |
| InputFile | Object | 作业输入。 |
|
| Object | String | test.mp4 | 作业输入所在的OSS Object。 |
| Location | String | oss-cn-beiing | 作业输入所在的OSS Location。 |
| Bucket | String | oss-test | 作业输入所在的OSS Bucket。 |
| PipelineId | String | 88c6ca184c0e47098a5b665e2a12**** | 管道ID。 |
| Id | String | 88c6ca184c0e47098a5b665e2a12**** | 作业ID。 |
| Input | String | {"Bucket":"oss-test","Location":"oss-cn-beiing","Object":"test.mp4"} | 作业输入。 |
| NonExistIds | Array of String | ae687c02fe944327ba9631e50da23128**** | 不存在的作业ID列表,无数据时该参数不返回。 |
示例
请求示例
http(s)://mts.cn-shanghai.aliyuncs.com/?Action=QueryFpShotJobList
&JobIds=88c6ca184c0e47098a5b665e2a12****
&<公共请求参数>
正常返回示例
XML格式
HTTP/1.1 200 OK
Content-Type:application/xml
<QueryFpShotJobListResponse>
<RequestId>25818875-5F78-4A13-BEF6-D7393642CA58</RequestId>
<FpShotJobList>
<FpShotResult>
<AudioFpShots>
<PrimaryKey>498ac941373341599c4777c8d884****</PrimaryKey>
<FpShotSlices>
<Duplication>
<Start>0</Start>
<Duration>3</Duration>
</Duplication>
<Similarity>0</Similarity>
<Input>
<Start>0</Start>
<Duration>5</Duration>
</Input>
</FpShotSlices>
<Similarity>0</Similarity>
</AudioFpShots>
<FpShots>
<PrimaryKey>498ac941373341599c4777c8d884****</PrimaryKey>
<FpShotSlices>
<Duplication>
<Start>1260</Start>
<Duration>48</Duration>
</Duplication>
<Similarity>0</Similarity>
<Input>
<Start>46</Start>
<Duration>48</Duration>
</Input>
</FpShotSlices>
<Similarity>0.8914769887924194</Similarity>
</FpShots>
<TextFpShots>
<PrimaryKey>3e34ac649945b53a1b0f863ce030****</PrimaryKey>
<Similarity>1.0</Similarity>
<TextFpShotSlices>
<Similarity>1.0</Similarity>
<InputText>今天下雪了</InputText>
<DuplicationText>今天下雪了</DuplicationText>
<InputFragment>
<Start>0</Start>
<Duration>3</Duration>
</InputFragment>
</TextFpShotSlices>
</TextFpShots>
</FpShotResult>
<CreationTime>2017-01-10T12:00:00Z</CreationTime>
<FinishTime>0</FinishTime>
<State>Success</State>
<Message>The parameter \"Id\" is invalid.A uuid must:1)be comprised of chracters[a-f],numbers[0-9];2)be 32 characters long</Message>
<FpShotConfig>
<PrimaryKey>3ca84a39a9024f19853b21be9cf9****</PrimaryKey>
<SaveType>save</SaveType>
<FpDBId>2288c6ca184c0e47098a5b665e2a12****</FpDBId>
</FpShotConfig>
<FileId>ebb51ee30f0b49aba959823fa991****</FileId>
<UserData>testid-001</UserData>
<Code>InvalidParameter.UUIDFormatInvalid</Code>
<InputFile>
<Object>test.mp4</Object>
<Location>oss-cn-beiing</Location>
<Bucket>oss-test</Bucket>
</InputFile>
<PipelineId>88c6ca184c0e47098a5b665e2a12****</PipelineId>
<Id>88c6ca184c0e47098a5b665e2a12****</Id>
<Input>{"Bucket":"oss-test","Location":"oss-cn-beiing","Object":"test.mp4"}</Input>
</FpShotJobList>
<NonExistIds>ae687c02fe944327ba9631e50da23128****</NonExistIds>
</QueryFpShotJobListResponse>
JSON格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "25818875-5F78-4A13-BEF6-D7393642CA58",
"FpShotJobList" : [ {
"FpShotResult" : {
"AudioFpShots" : [ {
"PrimaryKey" : "498ac941373341599c4777c8d884****",
"FpShotSlices" : [ {
"Duplication" : {
"Start" : "0",
"Duration" : "3"
},
"Similarity" : "0",
"Input" : {
"Start" : "0",
"Duration" : "5"
}
} ],
"Similarity" : "0"
} ],
"FpShots" : [ {
"PrimaryKey" : "498ac941373341599c4777c8d884****",
"FpShotSlices" : [ {
"Duplication" : {
"Start" : "1260",
"Duration" : "48"
},
"Similarity" : "0",
"Input" : {
"Start" : "46",
"Duration" : "48"
}
} ],
"Similarity" : "0.8914769887924194"
} ],
"TextFpShots" : [ {
"PrimaryKey" : "3e34ac649945b53a1b0f863ce030****",
"Similarity" : "1.0",
"TextFpShotSlices" : [ {
"Similarity" : "1.0",
"InputText" : "今天下雪了",
"DuplicationText" : "今天下雪了",
"InputFragment" : {
"Start" : "0",
"Duration" : "3"
}
} ]
} ]
},
"CreationTime" : "2017-01-10T12:00:00Z",
"FinishTime" : "0",
"State" : "Success",
"Message" : "The parameter \\\"Id\\\" is invalid.A uuid must:1)be comprised of chracters[a-f],numbers[0-9];2)be 32 characters long",
"FpShotConfig" : {
"PrimaryKey" : "3ca84a39a9024f19853b21be9cf9****",
"SaveType" : "save",
"FpDBId" : "2288c6ca184c0e47098a5b665e2a12****"
},
"FileId" : "ebb51ee30f0b49aba959823fa991****",
"UserData" : "testid-001",
"Code" : "InvalidParameter.UUIDFormatInvalid",
"InputFile" : {
"Object" : "test.mp4",
"Location" : "oss-cn-beiing",
"Bucket" : "oss-test"
},
"PipelineId" : "88c6ca184c0e47098a5b665e2a12****",
"Id" : "88c6ca184c0e47098a5b665e2a12****",
"Input" : "{\"Bucket\":\"oss-test\",\"Location\":\"oss-cn-beiing\",\"Object\":\"test.mp4\"}"
} ],
"NonExistIds" : [ "ae687c02fe944327ba9631e50da23128****" ]
}
错误码
访问错误中心查看更多错误码。