Creates a spatiotemporal clustering task to cluster photos and videos based on geolocation and time information. Spatiotemporal clustering allows you to group photos and videos taken during a travel or at different places by their spatial and temporal similarity. Based on spatiotemporal clustering, you can develop media capabilities such as media file categorization, photo collections, and image and video-based stories.
Operation description
-
Before you call this operation, make sure that you are familiar with the billing of Intelligent Media Management (IMM).****
**
Note Asynchronous processing does not guarantee timely task completion.
-
Before you call this operation, make sure that you have indexed file metadata into the dataset automatically by calling the CreateBinding operation or manually by calling the IndexFileMeta or BatchIndexFileMeta operation.
-
Each call to the operation incrementally processes metadata in the dataset.****`` You can regularly call this operation to process incremental files.
-
After a spatiotemporal clustering task is complete, you can call the QueryLocationDateClusters operation to query the spatiotemporal clustering result.
-
Removing metadata from a dataset does not affect existing spatiotemporal clusters for the dataset. To delete a spatiotemporal cluster, call the DeleteLocationDateCluster operation.
-
This operation is an asynchronous operation. After a task is executed, the task information is retained only for seven days and cannot be retrieved when the retention period elapses. You can call the GetTask or ListTasks operation to query information about the task.`` If you specify Notification , you can obtain information about the task based on notifications.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
imm:CreateLocationDateClusteringTask | create | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ProjectName | string | Yes | test-project | |
DatasetName | string | Yes | test-dataset | |
UserData | string | No | The custom information, which is returned in an asynchronous notification and facilitates notification management. The maximum length of the value is 2,048 bytes. | test-data |
Tags | object | No | The custom tags. You can search for or filter asynchronous tasks by custom tag. | { "User": "Jane" } |
DateOptions | object | Yes | The date configurations for clustering. Note
Adjusting these configurations affects existing spatiotemporal clusters for the dataset.
| |
GapDays | long | Yes | The maximum number of days allowed in a gap for a single spatiotemporal cluster. Valid values: 0 to 99999. For example, if travel photos were produced on March 4, 5, and 7, 2024, but not on Marh 6, 2024, and you set the parameter to 1, IMM considers the travel spanning the date range from March 4, 2024 to March 7, 2024 and includes photos within the data range in the same cluster.```` We recommend that you set the parameter to a value within the range from 0 to 3. | 1 |
MinDays | long | Yes | The minimum number of days that a single spatiotemporal cluster can span. Valid values: 1 to 99999. IMM does not create a cluster that spans less than the minimum number of days. For example, if you do not want a one-day tour cluster, you can set the parameter to 2. | 1 |
MaxDays | long | Yes | The maximum number of days that a single spatiotemporal cluster can span. Valid values: 1 to 99999. IMM does not create a cluster that spans more than the maximum number of days. For example, if you want to create travel photo clusters, you may want to exclude photos that were taken within 15 consecutive days in the same city, because it is likely that these photos were not taken during a travel. In this case, you can set the parameter to 15 to exclude this time range and location from the clustering task. | 15 |
LocationOptions | object | Yes | The geolocation configurations for clustering. Note
Adjusting these configurations affects existing spatiotemporal clusters for the dataset.
| |
LocationDateClusterLevels | array | Yes | The administrative division levels. You can specify multiple administrative division levels. For example, you uploaded photos that were taken from March 3, 2024 to March 5, 2024 in Hangzhou and photos that were taken from March 6, 2024 to March 8, 2024 in Jiaxing. When you call the operation and set the parameter to
| |
string | Yes | The administrative division level. Enumerated values:
| province | |
Notification | Notification | No | The notification settings. For information about the asynchronous notification format, see Asynchronous message examples. |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "B121940C-9794-4EE3-8D6E-F8EC525F****",
"TaskId": "LocationDateClustering-c10dce07-1de7-4da7-abee-1a3aba7****",
"EventId": "25B-1W2ChgujA3Q8MbBY6mSp2mh****"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-04-03 | The request parameters of the API has changed | View Change Details |
2023-03-09 | The request parameters of the API has changed | View Change Details |