深擎推荐流程代码逻辑
2021-08-29 09:34:57 0 举报
申请推荐代码逻辑
作者其他创作
大纲/内容
LocalCacheService
ApplicationProperties(配置文件类)
userHistoryMode:String(hazelcast) 配置用户历史的实现方式 hazelcast / redisuserHistoryTopic:String(OUT_HISTORY) 发送历史的topicuserSessionExpireTime:Integer (6) 用户session的过期时间,单位小时userHistoryMaxLimit:Long(1000)每个用户保存的最大的历史数量userInfoQueryMode:String (hazelcast)hazelcast / redisuserHistoryApiCacheExpireTime:Integer (6) 单位小时userStockLimit:Integer(2) 用户关注个股的最大召回量rankModel:RankModeltopN:Integer = 0 (10)自选、持仓、最近交易,主题兴趣等个股数量限制randomM:Integer = 0 (5)topN筛选完后,要在剩余里面随机,保持丰富度recallScoreRadio:Integer (10) 推荐理由得分系数qualityScoreRadio:Integer (50) 质量得分系数
AlikeEngine
obj1:RecConfigHelperobj2:OpServiceobj3:RecommendService
OpService(运营功能Service)
UserHistory
RecommendService
obj:LocalCacheService
RankEngine
obj1:RecConfigHelperobj2:RecommendServiceobj3:HistoryServiceobj4:LocalCacheService
重排
HistoryEngine
obj1:RecConfigHelperobj3:RecommendServiceobj4:HistoryService
推荐引擎
XgbModelHandler
initPosition() 1、记录用户侧整型特征处理 feature list:[\"user_whcd_xl\
FeatureMapsInfo
RankApi(榜单推荐Api)
POST /rank/{laneId}
RerankConfig(重排规则设定)
scatterByItemType:Int 品类打散scatterByContent: lnt 内容打散scatterByReason:Int 推荐理由打散scatterByRatio:Int 比例混合打散scatterByBizPriority:Int 业务优先融合
RecConfigHelper
obj1:RecLanStoreobj2:RecStrategyStoreobj3:RecOpConfigStoreobj4:LocalCacheServiceobj5:RecallProperties
测试(xgb)
POST /api/testing
StrategyItem(推荐策略组合)
strategyId:LongrecalModels:List<ItemModel> 品类策略组合rankModel:Long 唯一排序模型rerankConfig:RerankConfig 重排设定supplment:Supplment 物料补足recallNum:int 召回数量
FeedEngine
obj1:RecConfigHelperobj2:OpServiceobj3:RecommendServiceobj4:HistoryServiceobj5:LocalCacheService
HIstoryApi(用户历史Api)
POST /history/{laneId}
AlikeApi(相关推荐Api)
POST /alike/{laneId}
XgboostRank
featureMapsInfo:FeatureMapsInforecUserInfoStore:RecModelStorerecModelStore:RecModelStoreCATEGORY_RANK:String = \"RANK\"XGB_MODEL_CODE:String = \"XgboostRank\
ScatterUtill
recallItemTypeScatter(List<RecallItem> items):List<RecallItem>:根据品类打散 逐个加入打散结果列表,每次加入时不和上一个品类相同 如果打散后数量不满足,则补齐recallReasonScatter(List<RecallItrem> items):List<RecallItem>根据推荐理由打散 逐个加入打散结果列表,每次加入时不和上一个推荐理由相同 如果打散后数量不满足,则补齐recallItemTypeSequenceScatter(List<RecallItrem> items,List<String> types):List<RecallItem>强制类型轮询 按照指定的品类顺序,依次打散出品
ReRankItem(重排优先级)
itemType:String 品类reasonCode:String 推荐理由percentage:int 占比pripority:int 优先级
StrategyGroup
planId:计划ID\tstrategyId:策略ID\ttrafficId:流量组ID\tactiveTraffic:是否活跃组\tstrategies:List<StrategyItem>子策略组合\treturnNum:返回数量\treRankSetting:重排设定
TopicApi(主题推荐)
POST /topic/{laneId}
RecEngineApp
TopEngine
obj1:RecConfigHelperobj2:OpServiceobj3:RecommendServiceobj4:LocalCacheService
feedApi(信息流Api)
POST /feed/{laneId}
TopicEngine
obj1:RecConfigHelperobj2:OpServiceobj3:RecommendServiceobj4:HistoryService
HistoryService
ALL_INACTIVE_USER:String = \"ALL_INACTIVE_USER\"userHistory:UserHistory
TopApi(置顶推荐)
POST /top/{laneId}
0 条评论
下一页