gorse v0.3.1 版本更新介绍
发布日期: 2021-12-29
版本号: v0.3.1
本次更新包含以下内容:新增实时同步服务器节点最新项目和分类热门项目的功能;优化性能包括跳过重复映射、重用切片空间、为ClickHouse添加数据跳过索引及限制相似推荐反馈数量;修复配置并发读取、无反馈时worker故障及隐藏项效率问题。升级指南提示:需在配置文件中设置相似推荐反馈数量参数,ClickHouse用户需手动添加反馈表索引,Redis用户需清除旧版缓存键值。具体配置项包含num_feedback_fallback_item_based参数调整,执行ALTER TABLE添加bloom_filter索引,以及使用redis-cli删除popular_items和latest_items相关缓存。
更新内容 (中文)
功能
- 在服务节点实时更新最新物品 (#342)
- 在服务节点实时更新分类热门物品 (#343)
性能
- 通过跳过相同映射和复用切片空间优化 copier 性能 (#337)
- 为 ClickHouse 添加数据跳过索引 (#349)
- 限制回退的基于物品相似度推荐中使用的反馈数量 (#350)
修复
- 修复配置中的并发映射读取问题 (@winwill2012 授权,#338,#347)
- 修复无反馈数据时的 worker 故障 (#340)
- 修复隐藏物品的低效实现方式 (#341)
升级指南
- 配置: 新增选项用于限制回退的基于物品相似度推荐中使用的反馈数量。数值越大推荐越精准,但耗时更长
# 回退的基于物品相似度推荐中使用的反馈数量,默认值为10
num_feedback_fallback_item_based = 20
- ClickHouse: 使用 ClickHouse 作为数据存储时需手动添加索引
ALTER TABLE feedback ADD INDEX user_index user_id TYPE bloom_filter(0.01) GRANULARITY 1;
ALTER TABLE feedback ADD INDEX item_index item_id TYPE bloom_filter(0.01) GRANULARITY 1;
- Redis: 移除不兼容的陈旧缓存
redis-cli KEYS \"popular_items*\" | xargs redis-cli DEL
redis-cli KEYS \"latest_items*\" | xargs redis-cli DEL
更新内容 (原始)
Feature
- Update latest items in real-time on the server node (#342).
- Update categorized popular items in real-time on the server node (#343).
Performance
- Optimize copier by skipping equal maps and reusing slice space (#337).
- Add data skipping indices for ClickHouse (#349).
- Limit the number feedback used in fallback item-based similarity recommendation (#350).
Fix
- Fix concurrent map read in configuration (#338 authorized by @winwill2012, #347).
- Fix worker failure when there is no feedback (#340).
- Fix inefficient implementation of hidden items (#341).
Upgrade Guide
- Configuration: A new option has been added to limit the number feedback used in fallback item-based similarity recommendation. Larger value means more accurate recommendation but spend more time.
# The number of feedback used in fallback item-based similar recommendation. The default values is 10.
num_feedback_fallback_item_based = 20
- ClickHouse: Add indices manually if using ClickHouse as data storage.
ALTER TABLE feedback ADD INDEX user_index user_id TYPE bloom_filter(0.01) GRANULARITY 1;
ALTER TABLE feedback ADD INDEX item_index item_id TYPE bloom_filter(0.01) GRANULARITY 1;
- Redis: Remove incompatible stale cache.
redis-cli KEYS "popular_items*" | xargs redis-cli DEL
redis-cli KEYS "latest_items*" | xargs redis-cli DEL