Skip to content

feat(location): 智能行程聚合 — 将连续多天的同地区照片自动归为一个 Trip #63

Description

@LC044

功能描述

当前 timeline 是按天聚合的,如果同一次旅行跨越多天但都在同一城市,会拆成很多节点。增加"行程(Trip)"概念:连续多天在同一地区(或相邻地区)的照片自动归为一个行程。

实现思路

  • timeline_nodes 按时间排序后,如果相邻节点地理位置接近(如 < 100km)且时间连续(间隔 < 3天),就合并为一个 Trip
  • 后端新增 /api/locations/trips 接口,返回聚合后的行程列表
  • 每个 Trip 包含:起止日期、覆盖的城市/景区列表、照片数量、代表性照片
  • 前端在 timeline 视图中增加"按行程"聚合模式,可折叠展开查看每日详情
  • 轨迹视图也可按 Trip 维度展示,不同行程用不同颜色区分

优先级

中 — 解决 timeline 碎片化问题,但算法需要调参

依赖

  • 需要后端新增 Trip 聚合逻辑和 API

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions