Skip to content

Add tag relationship graph visualization for topic clusters#890

Merged
zanllp merged 7 commits into
mainfrom
feature/tag-relationship-graph
Jan 17, 2026
Merged

Add tag relationship graph visualization for topic clusters#890
zanllp merged 7 commits into
mainfrom
feature/tag-relationship-graph

Conversation

@zanllp

@zanllp zanllp commented Jan 10, 2026

Copy link
Copy Markdown
Owner

No description provided.

wuqinchuan-kanyun and others added 7 commits January 11, 2026 00:53
Features:
- Tag-based relationship graph using force-directed layout
- Hybrid weight calculation (frequency + TF-IDF)
- Automatic community detection using Louvain algorithm
- Interactive visualization with ECharts
- Support for Tag and Cluster nodes
- Click to search images by tag
- Top-N filtering to avoid visual clutter

Backend:
- New API endpoint: POST /db/cluster_tag_graph
- Tag weight calculation with configurable alpha
- Category inference (character/style/scene/object)
- Community detection (requires networkx, optional)

Frontend:
- New component: TagRelationGraph.vue
- Switch between Cluster Cards and Tag Graph views
- Interactive graph with drag/zoom/pan
- Node details panel with search functionality
- Stats panel showing tags/clusters/images count

Documentation:
- Added TAG_GRAPH_README.md with usage guide

Co-Authored-By: Claude <noreply@anthropic.com>
- Install echarts@6.0.0 for graph visualization
- Update TagRelationGraph.vue to use echarts instead of custom canvas
- Build completed successfully
- Add get_all_keywords_frequency method to TopicTitleCache
- Initialize keyword frequency from historical cached cluster keywords
- Prioritize top 100 high-frequency keywords when generating new keywords
- Update LLM prompt to prefer existing keywords from frequency list
- Reduce duplicate/similar keyword generation across clusters
- Add streaming support for tag_graph LLM requests
- Increase LLM timeout and retry limits for better reliability
…cache banner

- Add keyword count limit (default 600) for Tag layer to improve performance
- Implement irregular node layout with random perturbations
- Add layer spacing based on adjacent layer widths for consistent gaps
- Add cache result banner with collapse/expand functionality
- Add streaming response utility for LLM API calls
- Update i18n translations for new cache banner texts
- Optimize tag graph: increase max tags to 500, add level-2 tiered requirements
- Fix keyword deduplication and null handling in tag graph
@zanllp zanllp force-pushed the feature/tag-relationship-graph branch from edc5192 to 7b2af32 Compare January 17, 2026 17:29
@zanllp zanllp merged commit 1a5ceea into main Jan 17, 2026
@zanllp zanllp deleted the feature/tag-relationship-graph branch June 6, 2026 03:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants