The spatio-temporal clustering feature classifies files in a dataset based on their time and location. This feature works on indexed files, such as images and videos, that contain shooting time and location data. These classifications can represent content from a user's trip, where files have similar timestamps and locations. The classifications can also represent content shot at different places where a user lives or works. Analyzing the locations and time ranges of these classifications lets you categorize media files, create highlight reels, and generate photo and video stories.
Operation description
-
Before you use this operation, you must understand the billing methods and pricing of Intelligent Media Management (IMM).
Important Asynchronous tasks do not have a guaranteed processing time. -
Before you call this operation, you must index files into a dataset. You can index files by binding data sources using CreateBinding or by indexing files using IndexFileMeta or BatchIndexFileMeta.
-
Each call to this operation processes the files in the specified
Datasetincrementally. You can call this operation periodically to process new files. -
After clustering is complete, you can call the QueryLocationDateClusters operation to retrieve the clustering results.
-
Deleting a file from a dataset does not change the spatio-temporal clusters. To delete existing spatio-temporal clusters, you can call the DeleteLocationDateCluster operation.
-
This is an asynchronous operation. After a task starts, its information is saved for only 7 days. You cannot retrieve task information after 7 days. You can call the GetTask or ListTasks operation to view task information using the returned
TaskId. You can also configure the Notification parameter to receive task information through message notifications.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
imm:CreateLocationDateClusteringTask |
create |
*Dataset
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectName |
string |
Yes |
The project name. For more information, see Create a project. |
test-project |
| DatasetName |
string |
Yes |
The dataset name. For more information, see Create a dataset. |
test-dataset |
| UserData |
string |
No |
Custom information that is returned in the asynchronous notification message. This helps you associate the notification message with your system. The maximum length is 2,048 bytes. |
test-data |
| Tags |
object |
No |
Custom tags used to search for and filter asynchronous tasks. |
{ "User": "Jane" } |
| DateOptions |
object |
Yes |
The date clustering settings. Important Modifying this setting also affects existing spatio-temporal clusters in your Dataset. |
|
| GapDays |
integer |
Yes |
The maximum number of gap days allowed in a single spatio-temporal group. The value must be in the range of 0 to 99,999. For example, a user has photos from March 4–5 and March 7, but not from March 6. If you assume that the photos from March 4–7 belong to the same trip, set this parameter to Set this parameter to a value from 0 to 3. |
1 |
| MinDays |
integer |
Yes |
The minimum number of days in a single spatio-temporal group. The value must be in the range of 1 to 99,999. Clusters with fewer days than this value are not detected or stored. For example, if you do not want to include one-day trips in the generated groups, set this parameter to 2. |
1 |
| MaxDays |
integer |
Yes |
The maximum number of days in a single spatio-temporal group. The value must be in the range of 1 to 99,999. Clusters with more days than this value are not detected or stored. For example, if a user takes photos in the same location for more than 15 consecutive days, this location might be their residence rather than a travel destination. If you want to exclude this time period and location from the spatio-temporal clusters, set this parameter to 15. |
15 |
| LocationOptions |
object |
Yes |
The location clustering settings. Important Modifying this setting also affects existing spatio-temporal clusters in your Dataset. |
|
| LocationDateClusterLevels |
array |
Yes |
A list of administrative levels for grouping. You can select multiple levels. For example, a user uploads photos taken in Hangzhou from March 3 to March 5 and photos taken in Jiaxing from March 6 to March 8. If you set this parameter to
|
|
|
string |
Yes |
The administrative level for grouping. Valid values:
|
province |
|
| Notification | Notification |
No |
The message notification configuration. For more information, see Notification. For the format of asynchronous notification messages, see Asynchronous notification message format. |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The information about the spatio-temporal clustering task. |
||
| RequestId |
string |
The ID of the request. |
B121940C-9794-4EE3-8D6E-F8EC525F**** |
| TaskId |
string |
The task ID. |
LocationDateClustering-c10dce07-1de7-4da7-abee-1a3aba7**** |
| EventId |
string |
The event ID. |
25B-1W2ChgujA3Q8MbBY6mSp2mh**** |
Examples
Success response
JSON format
{
"RequestId": "B121940C-9794-4EE3-8D6E-F8EC525F****",
"TaskId": "LocationDateClustering-c10dce07-1de7-4da7-abee-1a3aba7****",
"EventId": "25B-1W2ChgujA3Q8MbBY6mSp2mh****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.