pre.config 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. {
  2. "RunMode": "product",
  3. "ListenConf": {
  4. "HttpAddr": "",
  5. "HttpPort": 8000
  6. },
  7. "ABTestConf": {
  8. "Host": "http://1894469520484605.vpc.cn-hangzhou.pai-eas.aliyuncs.com/api/predict/tzld_pairec_experiment",
  9. "Token": "MDc2MDc0N2E5YTVjMDc0MGE0YjNkZmRiOGQwMzBjYjYxY2U0MDNlNQ=="
  10. },
  11. "FilterConfs": [
  12. {
  13. "Name": "UserExposureFilter",
  14. "FilterType": "User2ItemExposureFilter",
  15. "MaxItems": 100,
  16. "TimeInterval": 172800,
  17. "WriteLog": true,
  18. "DaoConf":{
  19. "AdapterType": "hologres",
  20. "HologresName": "wx-holo",
  21. "HologresTableName": "rec_exposure_history"
  22. }
  23. },
  24. {
  25. "Name": "ItemStateFilter",
  26. "FilterType": "ItemStateFilter",
  27. "ItemStateDaoConf":{
  28. "AdapterType": "hologres",
  29. "HologresName": "wx-holo",
  30. "HologresTableName": "public.rec_item_status",
  31. "ItemFieldName" : "\"video_id\"",
  32. "SelectFields" :"app_recommend_status, audit_status,video_status, pwd_status,charge"
  33. },
  34. "FilterParams" :[
  35. {
  36. "Name" : "app_recommend_status",
  37. "Type" : "int",
  38. "Operator" : "in",
  39. "Value" : [-6, 1, 10]
  40. },
  41. {
  42. "Name" : "audit_status",
  43. "Type" : "int",
  44. "Operator" : "equal",
  45. "Value" : 5
  46. },
  47. {
  48. "Name" : "video_status",
  49. "Type" : "int",
  50. "Operator" : "equal",
  51. "Value" : 1
  52. },
  53. {
  54. "Name" : "pwd_status",
  55. "Type" : "int",
  56. "Operator" : "equal",
  57. "Value" : 0
  58. },
  59. {
  60. "Name" : "charge",
  61. "Type" : "int",
  62. "Operator" : "equal",
  63. "Value" : 0
  64. }
  65. ]
  66. },
  67. {
  68. "Name": "ItemDurationFilter",
  69. "FilterType": "ItemStateFilter",
  70. "ItemStateDaoConf":{
  71. "AdapterType": "hologres",
  72. "HologresName": "wx-holo",
  73. "HologresTableName": "longvideo.wx_video",
  74. "ItemFieldName" : "\"id\"",
  75. "SelectFields" :"total_time"
  76. },
  77. "FilterParams" :[
  78. {
  79. "Name" : "total_time",
  80. "Type" : "int",
  81. "Operator" : "greaterThan",
  82. "Value" : 120
  83. }
  84. ]
  85. },
  86. {
  87. "Name": "PriorityAdjustCountFilter",
  88. "FilterType": "PriorityAdjustCountFilter",
  89. "AdjustCountConfs" :[
  90. {
  91. "RecallName" :"U2IRecall",
  92. "Count" :200,
  93. "Type" : "accumulator"
  94. },
  95. {
  96. "RecallName" :"SwingU2IRecall",
  97. "Count" :400,
  98. "Type" : "accumulator"
  99. },
  100. {
  101. "RecallName" :"UserGroupHotRecall",
  102. "Count" :450,
  103. "Type" : "accumulator"
  104. },
  105. {
  106. "RecallName" :"UserGlobalHotRecall",
  107. "Count" :500,
  108. "Type" : "accumulator"
  109. },
  110. {
  111. "RecallName" :"ColdStartRecall",
  112. "Count" :600,
  113. "Type" : "accumulator"
  114. }
  115. ]
  116. }
  117. ],
  118. "RecallConfs": [
  119. {
  120. "Name":"U2IRecall",
  121. "RecallType": "UserCustomRecall",
  122. "RecallCount" :1000,
  123. "DaoConf":{
  124. "AdapterType": "hologres",
  125. "HologresName": "wx-holo",
  126. "HologresTableName": "rec_etrec_u2i2i_score"
  127. }
  128. },
  129. {
  130. "Name":"SwingU2IRecall",
  131. "RecallType": "UserCustomRecall",
  132. "RecallCount" :1000,
  133. "DaoConf":{
  134. "AdapterType": "hologres",
  135. "HologresName": "wx-holo",
  136. "HologresTableName": "rec_swing_u2i2i_score"
  137. }
  138. },
  139. {
  140. "Name":"UserGroupHotRecall",
  141. "RecallType": "UserGroupHotRecall",
  142. "RecallCount" :500,
  143. "Triggers": [
  144. {
  145. "TriggerKey": "machineinfo_platform"
  146. },
  147. {
  148. "TriggerKey": "province"
  149. },
  150. {
  151. "TriggerKey": "gender"
  152. }
  153. ],
  154. "DaoConf":{
  155. "AdapterType": "hologres",
  156. "HologresName": "wx-holo",
  157. "HologresTableName": "rec_group_hotness_score"
  158. }
  159. },
  160. {
  161. "Name":"UserGlobalHotRecall",
  162. "RecallType": "UserGlobalHotRecall",
  163. "RecallCount" :500,
  164. "CacheAdapter": "localCache",
  165. "CacheTime": 600,
  166. "CacheConfig": "{\"defaultExpiration\":600, \"cleanupInterval\":600}",
  167. "DaoConf":{
  168. "AdapterType": "hologres",
  169. "HologresName": "wx-holo",
  170. "HologresTableName": "rec_global_hotness_score"
  171. }
  172. },
  173. {
  174. "Name":"ColdStartRecall",
  175. "RecallType": "ColdStartRecall",
  176. "RecallCount" :500,
  177. "CacheAdapter": "localCache",
  178. "CacheTime": 120,
  179. "CacheConfig": "{\"defaultExpiration\":600, \"cleanupInterval\":300}",
  180. "ColdStartDaoConf":{
  181. "AdapterType": "hologres",
  182. "HologresName": "wx-holo",
  183. "HologresTableName": "longvideo.wx_video",
  184. "WhereClause" : "gmt_create >= ${time}",
  185. "PrimaryKey" : "id",
  186. "TimeInterval" : 86400
  187. }
  188. }
  189. ],
  190. "SortNames": {
  191. "default": [
  192. "ItemRankScore",
  193. "VideoMixSort"
  194. ]
  195. },
  196. "FilterNames": {
  197. "default": [
  198. "UniqueFilter",
  199. "UserExposureFilter",
  200. "ItemStateFilter",
  201. "ItemDurationFilter",
  202. "PriorityAdjustCountFilter"
  203. ]
  204. },
  205. "AlgoConfs": [
  206. {
  207. "Name": "sv_dbmtl",
  208. "Type": "EAS",
  209. "EasConf": {
  210. "Processor": "EasyRec",
  211. "Timeout": 500,
  212. "ResponseFuncName": "easyrecMutValResponseFunc",
  213. "Url": "http://1894469520484605.vpc.cn-hangzhou.pai-eas.aliyuncs.com/api/predict/sv_dbmtl",
  214. "Auth": "MmE2NWFkYTAwM2RmM2I3ODc1MTBjZjk0MjViNThkNjA0ODFhMjNjNA=="
  215. }
  216. }
  217. ],
  218. "HologresConfs": {
  219. "wx-holo" :{
  220. "DSN": "postgres://LTAI5t6Wu7AEgtmpY7ksBT6C:xZT7RCgaAT2u1xMdHtrdXre1NMP44W@hgprecn-cn-7pp28y18c00c-cn-hangzhou-vpc.hologres.aliyuncs.com:80/dssm?sslmode=disable&connect_timeout=1"
  221. }
  222. },
  223. "KafkaConfs": {
  224. },
  225. "RedisConfs": {
  226. "redis-cache" :{
  227. "Host": "r-bp1lwv3bjpv6zee8zw.redis.rds.aliyuncs.com",
  228. "Port": 6379,
  229. "Password": "alirecommend@2021",
  230. "ConnectTimeout": 1000,
  231. "ReadTimeout": 100
  232. }
  233. },
  234. "SceneConfs": {
  235. "video_feed":{
  236. "default":{
  237. "RecallNames":["UserGroupHotRecall", "U2IRecall", "UserGlobalHotRecall", "SwingU2IRecall", "ColdStartRecall"]
  238. }
  239. }
  240. },
  241. "LogConf": {
  242. "RetensionDays": 3,
  243. "DiskSize": 20,
  244. "LogLevel": "INFO"
  245. },
  246. "RankConf": {
  247. "video_feed": {
  248. "RankAlgoList": [
  249. "sv_dbmtl"
  250. ],
  251. "RankScore": "${sv_dbmtl_probs_is_videoRealPlay} + ${sv_dbmtl_y_playduration} + ${sv_dbmtl_y_play_rate} + 0.5 * ${sv_dbmtl_probs_is_videoShareFriend_videoShareH5_videoFavorite}",
  252. "BatchCount" : 100,
  253. "Processor": "EasyRec"
  254. }
  255. },
  256. "FeatureConfs": {
  257. "video_feed":{
  258. "AsynLoadFeature": true,
  259. "FeatureLoadConfs" :[
  260. {
  261. "FeatureDaoConf": {
  262. "AdapterType": "hologres",
  263. "HologresName": "wx-holo",
  264. "FeatureKey": "user:uid",
  265. "UserFeatureKeyName": "mid",
  266. "HologresTableName": "mid_all_feature",
  267. "UserSelectFields": "*",
  268. "FeatureStore": "user"
  269. },
  270. "Features": [
  271. {
  272. "FeatureType":"new_feature",
  273. "FeatureName":"day_h",
  274. "Normalizer" : "hour_in_day",
  275. "FeatureStore":"user"
  276. },
  277. {
  278. "FeatureType":"new_feature",
  279. "FeatureName":"week_day",
  280. "Normalizer" : "weekday",
  281. "FeatureStore":"user"
  282. }
  283. ]
  284. }
  285. ]
  286. }
  287. },
  288. "ColdStartRankConfs" :{
  289. "video_feed": {
  290. "RecallName": "ColdStartRecall"
  291. }
  292. }
  293. }