商品搜索-特征处理(实例)

这是在排序时拿到的所有数据

{"sort_feature_u_":"{\"u_uid\":25872428,\"u_age\":0,\"vip_status\":1,\"u_r_gender\":2,\"u_f_ml_rt\":1.0,\"u_f_fm_rt\":0.0,\"cre_days\":326,\"lo_pro_id\":2,\"lo_ci_id\":2,\"yidi\":[[\"\\u5317\\u4eac\\u5e02\",\"\\u5317\\u4eac\\u5e02\",1,1,1],[\"\\u4e91\\u5357\\u7701\",\"\\u6606\\u660e\\u5e02\",25,415,3]],\"la_d_id\":168338592,\"la_sys\":\"ios\",\"la_ver\":\"7.38.0\",\"cn_na\":\"\\u4e3b\\u5305\\u81ea\\u7136\\u6d41\\u91cf\",\"xy_money\":67,\"focus_cnt\":82,\"fans_cnt\":19,\"sign_cnt\":0,\"task_cnt\":192,\"se_od_cnt\":0,\"la_p_od_dt\":\"1970-01-01\",\"v_u_p_od_cnt\":0,\"in_p_od_cnt\":0,\"cc_od_cnt\":0,\"cash_back_cnt\":0,\"pay_gmv\":0,\"pay_od_cnt\":0,\"is_pd_sdpay\":\"\\u5426\",\"is_item_sdpay\":\"\\u5426\",\"is_ht_sdpay\":\"\\u5426\",\"pct_sev_d\":15,\"avpv_sev_d\":13,\"pct_fteen_d\":15,\"avpv_fteen_d\":16,\"pct_o_m\":21,\"avpv_o_m\":85,\"pct_six_m\":21,\"avpv_six_m\":93,\"access_days\":6,\"sc_ct_s_d\":\"\\u9f3b\\u5b50,\\u7537\\u751f\\u9f3b\\u5b50\",\"avpst_s_days\":117,\"avpst_o_months\":401,\"pt_cnt\":4,\"sp_ct_items\":\"\\u773c\\u90e8\\u7efc\\u5408,\\u5207\\u5f00\\u53cc\\u773c\\u76ae,\\u9762\\u90e8\\u5438\\u8102,\\u6ce8\\u5c04\\u7626\\u8138\",\"sp_ct_i_m2s\":\"\\u53cc\\u773c\\u76ae,\\u773c\\u7efc\\u5408,\\u7626\\u8138,\\u9664\\u76b1\\u7626\\u8138\",\"sp_ct_i_m1s\":\"\\u9762\\u90e8\\u8f6e\\u5ed3,\\u773c\\u90e8\\u6574\\u5f62,\\u6ce8\\u5c04\\u7f8e\\u5bb9\",\"sp_ct_m2s\":\"\\u6ce8\\u5c04\\u5851\\u5f62,\\u53cc\\u773c\\u76ae,\\u773c\\u90e8\\u7efc\\u5408,\\u7626\\u8138\",\"sp_ct_m1s\":\"\\u9762\\u90e8\\u8f6e\\u5ed3,\\u773c\\u90e8\\u6574\\u5f62,\\u9664\\u76b1\\u7626\\u8138\",\"c_g_cnt\":0,\"post_cnt\":0,\"st_ct_cnt\":0,\"answer_cnt\":0,\"like_cnt\":4,\"belike_cnt\":0,\"ans_blike_cnt\":0,\"ques_cnt\":0,\"enab_push\":\"\\u5f00\\u542f\",\"mft\":\"Apple\",\"enab_noti\":\"\\u662f\",\"g_rec_cnt\":18,\"sg_rc_cnt\":3,\"gp_click_cnt\":0,\"sg_click_cnt\":0,\"cert_name\":\"\\u666e\\u901a\\u7528\\u6237\",\"fol_uids\":\"1679429,11204441,21753958,24550196,1758459,32588029,32327168,150406,2306020,25911037,35735177,21753957,14686077,32764931,32322662,18692271,21739698,21753956,17723483,27829588,13185502,1681046,2403945,22364021,19154418,21753858,12506143,2266469,8212123,26529551,22349344,21032429,16293653,165878,16807079,22349349,1789141,32257754,25818848,36267709,6743205,7170740,10217214,28454846,12258048,1581920,31272735,134927,7986248,35150254,24346925,31858637,19674398,32630662,1819003,7271593,32318555,654,23904062,4923686,23967672,100354\",\"fol_u_n\":\"\\u859b\\u5fd7\\u5f3a,\\u72d7\\u5341\\u516b,\\u64b8\\u94c1\\u4e00\\u59d0,B\\u59d0\\u53e8\\u53e8\\u53e8,\\u65b0\\u6c27\\u7f8e\\u6dd8,\\u666e\\u5916\\u79d1\\u66fe\\u533b\\u751f,\\u8eab\\u65c1\\u54df\\u4e00\\u4e2a\\u4ed6,\\u5317\\u4eac\\u7c73\\u626c\\u4e3d\\u683c\\u533b\\u7597\\u7f8e\\u5bb9\\u6574\\u5f62,\\u5927\\u8fde\\u6768\\u660e\\u6d01\\u533b\\u751f,\\u6876\\u88c5\\u9178\\u5976,\\u4e00\\u5377\\u7f8a\\u6bdb,\\u5927\\u4eba\\u8981\\u8138,\\u6cb3\\u4e1c\\u9550hdh,\\u5341\\u4e00\\u5c81\\u4e2d\\u5e74\\u5c11\\u5973,\\u5fd8\\u6389\\u75db\\u82e6,\\u5851\\u7f8e\\u5148\\u751f\\u97e9\\u80dc,\\u4e0d\\u77e5\\u9053\\u8c01\\u5728\\u8fd9,\\u7f8e\\u5c11\\u5973\\u6316\\u6398\\u673a,\\u6c27\\u6c14iZY930b,\\u611f\\u53d7\\u7f8e\\u5973\\u7684\\u70e6\\u607c,\\u5f20\\u5927\\u54c8\\u54c8,\\u5b89\\u9633\\u533b\\u751f,\\u516b\\u5927\\u5904\\u6574\\u5f62\\u533b\\u9662\\u738b\\u514b\\u660e,\\u6d82\\u6562\\u6562,\\u738b\\u7693\\u6c11,\\u4e1c\\u516b\\u533a\\u533a\\u82b1,\\u5218\\u5f66\\u519b\\u9686\\u9f3b\\u533b\\u751f,\\u963f\\u8499\\u7f8e\\u5b50,\\u6731\\u6653\\u6ce2,\\u5c3e\\u5df4hatata,\\u6c27\\u53d4,\\u516b\\u5927\\u5904\\u6574\\u5f62\\u6768\\u589e\\u6770,\\u6c27\\u6c14\\u838e\\u8389\\u5a03,\\u65b0\\u6c27\\u5b89\\u5fc3\\u8d2d,\\u6d2a\\u6653\\u5a05,\\u4e00\\u53ea\\u8ffd\\u661f\\u7f8a,\\u859b\\u7d2b\\u6db5,\\u5564\\u9152\\u9e2d,Tina\\u6c38\\u8fdc18\\u5c81,\\u5927\\u5927\\u8bd7\\u5c0f\\u5c0f\\u6b23,\\u65b0\\u6c27\\u8fbe\\u4eba\\u5802,\\u90a2\\u6587\\u660e\\u9662\\u957f,\\u8ff7\\u6b7b\\u6c27,\\u963f\\u53d1\\u53d1fafa,\\u4f55\\u52a0\\u709c,\\u6c27\\u6c14\\u798f\\u5229\\u793e,\\u4e00\\u679a\\u7a0b\\u5e8f\\u5458,\\u65b0\\u6c27\\u97e9\\u56fd\\u670d\\u52a1\\u7ad9,\\u9ad8\\u4fca\\u660e\\u9662\\u957f,\\u6c27\\u6c144kynl,\\u61f5\\u903c\\u9c7c\\u4e38,Pony_\\u6734\\u60e0\\u654f,\\u6c27\\u6c14uAHdd2c,cherry\\u8f66\\u5398\\u5b50,\\u59da\\u7136,\\u5929\\u6d25\\u7ef4\\u7f8e\\u6574\\u5f62,\\u6c27\\u6c143s9p7,\\u65b0\\u6c27,\\u6c27\\u6c14ysw1d,\\u8303\\u8303\\u8303\\u5c0f\\u96e8,Seramm,\\u65b0\\u6c27\\u76f4\\u64ad\\u541b\",\"tp_post_cnt\":0,\"ck_post_cnt\":0,\"last_pd_date\":\"1970-01-01\",\"last_post_date\":\"1970-01-01\",\"msg_cnt\":\"24\",\"flow_user_cnt\":62,\"device_brand\":\"iPhoneXSMax\",\"push_label\":\"\",\"order_consume\":0.0,\"sc_consume\":12000.0,\"sx_consume\":0.0,\"search_consume\":52800.0,\"click_consume\":55660.0,\"predict_consume\":20920.44776119403,\"l_age\":0,\"r_age\":0,\"coup_rec_cnt\":12,\"coup_nouse_cnt\":12,\"coup_use_cnt\":0,\"coup_use_rate\":\"0E-17\",\"coupon_info\":[[57741,4999,800,0.16,0,0,0,0,0.0,0,0,0,0,0.0],[57746,999,200,0.2,0,0,0,0,0.0,0,0,0,0,0.0],[68657,20000,0,0.0,21300,1000,1000,509,0.51,10009,0,0,0,0.0],[57752,50,16,0.32,0,0,0,0,0.0,0,0,0,0,0.0],[57749,199,30,0.15,0,0,0,0,0.0,0,0,0,0,0.0],[57744,1999,400,0.2,0,0,0,0,0.0,0,0,0,0,0.0],[57748,499,100,0.2,0,0,0,0,0.0,0,0,0,0,0.0],[57750,100,20,0.2,0,0,0,0,0.0,0,0,0,0,0.0],[57743,2999,600,0.2,0,0,0,0,0.0,0,0,0,0,0.0],[57739,6999,1100,0.16,0,0,0,0,0.0,0,0,0,0,0.0],[57737,8999,1600,0.18,0,0,0,0,0.0,0,0,0,0,0.0],[57736,9999,1800,0.18,0,0,0,0,0.0,0,0,0,0,0.0]],\"u_gender\":0,\"u_last_active\":1,\"u_interested\":[11484,11119,11690,11647,11202,11751,11149,11253,11495,11666,10585,11408,11820,11301,11659,11467,1176]}","p_position":3,"is_exp":0,"qpl":{"abTestNo":0,"antiSpy":0,"bidStatus":-1,"biz_district":0,"buscircle_id":0,"city_id":1,"debug":0,"device_id":168338592,"dist":0,"district_3":0,"district_id":0,"doctor_id":0,"doctor_id_list":[],"ext_trans":{"comprehensive_strategy_id":14},"from_position":0,"geo_dist_arr":{},"hospital_id":0,"hospital_id_list":[],"id":0,"idList":[],"is_rank_debug":0,"is_select_city":0,"item_id":0,"item_id_list":[],"keyword":"窝蚕","latitude":39.186407,"logid":"152719346979591396","longitude":117.028813,"lver":"7.38.0","menu1_id":0,"menu1_id_list":[],"menu2_id":0,"menu2_id_list":[],"message_card":0,"mode":-1,"or_item_id_list":[],"originPage":0,"originPageSize":10,"page":1,"page_size":3,"post_type":0,"post_video_yn":0,"province_id":1,"search_gray_level":0,"select_city_id":1,"select_province_id":1,"select_uid":-1,"sort":0,"sortPriority":{},"sortStrategy":{},"source":0,"split_wz":0,"strategy":0,"sys":1,"timeStamp":1576939800,"ui_style":0,"uid":25872428,"version":7380,"where":{},"whereNot":{},"yxs":-1},"p_user_product_distance":103.9638,"sortScore":0.025919904932379723,"sc_31":{"score":[1575097301,1575097310,1575098052,1575098076,1575098084,1575098256,1575099221,1575099286,1575099559,1576561541,1576561726,1576561754,1576840864],"item":["113870","48811","562985","466804","345203","429902","549971","53796","546891","224377","54791","590347","594048"]},"add_cart":["46930","586517"],"uc_31_25872428":"[\"46930\", \"586517\"]","rc_1":{"score":[1575097155,1575097328,1576563127,1576563130],"item":["9689055","8726665","8647004","9506642"]},"oqpl_keyword":"窝蚕","sc_1":{"score":[1576561572],"item":["7372126"]},"is_click":0,"pi":{"titleimport":"【自体脂肪面部填充】全脸填充 ,30余年双博士团队14项专利自体脂肪填充面部,自体脂肪全脸填充额头面颊苹果肌","product_weight":200.0,"pid":362579,"sold_cnt":157,"title":"****全脸填充 ,30余年双博士团队14项专利自体脂肪填充面部,自体脂肪全脸填充额头面颊苹果肌","explanation":{"description":"min of:","details":[{"description":"script score function, computed with script:\"Script{type=inline, lang='painless', idOrCode='double total=0;double score=0;double bid =doc['bid'].value;double arpu =doc['arpu'].value;if(arpu>100){arpu=100;}arpu=1+(arpu/100);if(doc['wight'].value==1){arpu=2;}double ctr=doc['product_statistics.ctr_all'].value;if(ctr>0.5){ctr=0.5+ctr*0.01;}double ctr_level=doc['product_statistics.ctr_all_level'].value;if(doc['product_statistics.order_all'].value>1){ctr_level = ctr_level+1;}int product_weight_level =1;if(doc['bid'].value>=5){product_weight_level =2;}if(doc['district_2'].value==params.district_2){total += 30000;}if(doc['district_1'].value==params.district_1){total += 30000;}total+=(product_weight_level-1)*10000;if(doc['hospital_weight'].value==0){total-=50000;}score+=bid*(_score/10+1)*(ctr_level+0.1)*arpu+ctr;return total + score;', options={}, params={bottom_pid_list=[], district_1=1, district_2=1, latitude=39.186407, longitude=117.028813}}\" and parameters: \n{bottom_pid_list=[], district_1=1, district_2=1, latitude=39.186407, longitude=117.028813}","details":[{"description":"_score: ","details":[{"description":"sum of:","details":[{"description":"max of:","details":[{"description":"sum of:","details":[{"description":"weight(all_string:窝 in 325) [PerFieldSimilarity], result of:","details":[{"description":"score(doc=325,freq=6.0 = termFreq=6.0\n), product of:","details":[{"description":"idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:","details":[{"description":"docFreq","details":[],"match":true,"value":642.0},{"description":"docCount","details":[],"match":true,"value":44506.0}],"match":true,"value":4.2380347},{"description":"tfNorm, computed as (freq * (k1 + 1)) / (freq + k1 * (1 - b + b * fieldLength / avgFieldLength)) from:","details":[{"description":"termFreq=6.0","details":[],"match":true,"value":6.0},{"description":"parameter k1","details":[],"match":true,"value":1.2},{"description":"parameter b","details":[],"match":true,"value":0.75},{"description":"avgFieldLength","details":[],"match":true,"value":182.7712},{"description":"fieldLength","details":[],"match":true,"value":1337.4694}],"match":true,"value":1.0243713}],"match":true,"value":4.341321}],"match":true,"value":4.341321},{"description":"weight(all_string:蚕 in 325) [PerFieldSimilarity], result of:","details":[{"description":"score(doc=325,freq=7.0 = termFreq=7.0\n), product of:","details":[{"description":"idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:","details":[{"description":"docFreq","details":[],"match":true,"value":907.0},{"description":"docCount","details":[],"match":true,"value":44506.0}],"match":true,"value":3.8927083},{"description":"tfNorm, computed as (freq * (k1 + 1)) / (freq + k1 * (1 - b + b * fieldLength / avgFieldLength)) from:","details":[{"description":"termFreq=7.0","details":[],"match":true,"value":7.0},{"description":"parameter k1","details":[],"match":true,"value":1.2},{"description":"parameter b","details":[],"match":true,"value":0.75},{"description":"avgFieldLength","details":[],"match":true,"value":182.7712},{"description":"fieldLength","details":[],"match":true,"value":1337.4694}],"match":true,"value":1.1090344}],"match":true,"value":4.3171473}],"match":true,"value":4.3171473}],"match":true,"value":8.658468},{"description":"sum of:","details":[{"description":"weight(item_all:窝 in 325) [PerFieldSimilarity], result of:","details":[{"description":"score(doc=325,freq=1.0 = termFreq=1.0\n), product of:","details":[{"description":"boost","details":[],"match":true,"value":2.0},{"description":"idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:","details":[{"description":"docFreq","details":[],"match":true,"value":494.0},{"description":"docCount","details":[],"match":true,"value":17698.0}],"match":true,"value":3.5777164},{"description":"tfNorm, computed as (freq * (k1 + 1)) / (freq + k1) from:","details":[{"description":"termFreq=1.0","details":[],"match":true,"value":1.0},{"description":"parameter k1","details":[],"match":true,"value":1.2},{"description":"parameter b (norms omitted for field)","details":[],"match":true,"value":0.0}],"match":true,"value":1.0}],"match":true,"value":7.1554327}],"match":true,"value":7.1554327},{"description":"weight(item_all:蚕 in 325) [PerFieldSimilarity], result of:","details":[{"description":"score(doc=325,freq=1.0 = termFreq=1.0\n), product of:","details":[{"description":"boost","details":[],"match":true,"value":2.0},{"description":"idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:","details":[{"description":"docFreq","details":[],"match":true,"value":682.0},{"description":"docCount","details":[],"match":true,"value":17698.0}],"match":true,"value":3.2555008},{"description":"tfNorm, computed as (freq * (k1 + 1)) / (freq + k1) from:","details":[{"description":"termFreq=1.0","details":[],"match":true,"value":1.0},{"description":"parameter k1","details":[],"match":true,"value":1.2},{"description":"parameter b (norms omitted for field)","details":[],"match":true,"value":0.0}],"match":true,"value":1.0}],"match":true,"value":6.5110016}],"match":true,"value":6.5110016}],"match":true,"value":13.666434}],"match":true,"value":13.666434},{"description":"match on required clause, product of:","details":[{"description":"# clause","details":[],"match":true,"value":0.0},{"description":"product_status:{1.0}, product of:","details":[{"description":"boost","details":[],"match":true,"value":1.0},{"description":"queryNorm","details":[],"match":true,"value":1.0}],"match":true,"value":1.0}],"match":true,"value":0.0},{"description":"match on required clause, product of:","details":[{"description":"# clause","details":[],"match":true,"value":0.0},{"description":"close_yn:{0.0}, product of:","details":[{"description":"boost","details":[],"match":true,"value":1.0},{"description":"queryNorm","details":[],"match":true,"value":1.0}],"match":true,"value":1.0}],"match":true,"value":0.0},{"description":"match on required clause, product of:","details":[{"description":"# clause","details":[],"match":true,"value":0.0},{"description":"display_yn:{1.0}, product of:","details":[{"description":"boost","details":[],"match":true,"value":1.0},{"description":"queryNorm","details":[],"match":true,"value":1.0}],"match":true,"value":1.0}],"match":true,"value":0.0}],"match":true,"value":13.666434}],"match":true,"value":13.666434}],"match":true,"value":70115.484},{"description":"maxBoost","details":[],"match":true,"value":3.4028235E38}],"match":true,"value":70115.484},"sortScore":0.025919904932379723,"recall_score":700.0114851096778,"score":"70115.484375","highlight":{},"click_money":23.887799680233,"arpu":0.119439,"doctor_name":"朱金成","product_statistics":{"cvr_all_min_est":0.01,"exposure_tab":5469,"ctr_all_min_est":0.022,"exposure_menu3":5745,"ctr_menu3_uv_min_est":0.038,"exposure_menu":15937,"ctr_menu3":0.02054,"ctr_all_level":1,"cvr_menu3_min_est":0.01,"order_tab":0,"ctr_all":0.023995,"hospital_ctr_min_est":0.07500000298023224,"cpc_cost":4651683.73,"ctr_menu3_min_est":0.956,"i_real_ctr":0.360618,"exposure_all":15044,"cvr_all":0.0,"hospital_ctr_min_est_new":0.0009694459747083188,"click_menu":232,"click_tab":129,"order_all":0},"price_online":9800,"hospital_name":"北京润美玉之光医疗美容","real_on_sale_yn":0,"ext":{"score":"70115.484375","bid_add":359.82248,"product_keyword":"窝蚕","ctr_level":1,"from_position":0,"source_id":5,"bid":44.3,"product_strategy_id":2,"comprehensive_strategy_id":14,"request_key":"31_362579_152719346979591396","product_rank_id":1,"product_api_id":2},"item":"自体脂肪丰鼻基底,自体脂肪丰耳垂,自体脂肪丰额头,自体脂肪丰苹果肌,自体脂肪隆鼻,自体脂肪全脸填充,自体脂肪丰卧蚕,自体脂肪丰眉弓,自体脂肪垫下巴,自体脂肪丰眼窝,自体脂肪丰唇,自体脂肪丰面颊,自体脂肪丰泪沟,自体脂肪丰太阳穴,自体脂肪去法令纹","item_id":[194,37,102,103,232,590,463,591,464,592,593,214,247,153,443],"menu2_name":"下巴,丰唇/唇珠,丰卧蚕,苹果肌,眉弓,额头,隆鼻,太阳穴,丰耳垂,丰眉弓,垫鼻基底,面颊,面部填充","hospital_id":117,"efficacy":"媚眼术,卧蚕眼,减龄,丰额头,面部饱满,额头平整,C额头,垫太阳穴,面部填充,脸型美化,花瓣唇,微笑唇,M唇,唇形美化,唇形精致,丰唇,嘴唇变厚,童颜术,面部年轻化,面中部凹陷矫正,网红脸,混血,抗衰,祛皱,去法令纹,翘下巴,下巴延长,改善下巴线条,垫下巴,鼻型美化,面部立体,隆鼻,提鼻梁,丰泪沟,丰苹果肌,丰眉弓,垫鼻基底,改善突嘴,丰眼窝,眼部美化,耳部美化,耳部塑形,丰耳垂","ppid":362579,"menu1_name":"面部轮廓,脂肪填充,耳部整形,鼻部整形,眼部整形,唇部整形","service_type":1,"rank_model_score_map":{"XGB_PRODUCT_CTR_GHJ1":0.025919904932379723},"district_1":1,"location":{"lon":116.421496,"lat":39.994609},"menu1_id":[10001,10017,10019,10003,10006,10007],"district_2":1,"rank_final_score":0.025919904932379723,"bid":44.3},"p_search_sort_item":"{\"p_id\": 362579, \"p_price_online\": 9800, \"p_price_origin\": 19800, \"p_create_time\": \"12:19:11\", \"create_date\": \"2018-08-21\", \"p_gong_yn\": 0, \"p_is_vip\": 1, \"p_is_top\": 0, \"p_on_sale_yn\": 0, \"p_special_yn\": 0, \"p_micro_yn\": 0, \"p_operation_yn\": 0, \"p_inject_yn\": 0, \"p_laser_yn\": 0, \"p_hospital_id\": 117, \"p_product_doctor\": [141575], \"p_discount_rate\": 0.494949494949495, \"p_order_count\": 2, \"p_gmv_count\": 19600, \"p_order_rate\": 0, \"p_collect_rate\": 0, \"p_click_rate\": 0, \"ctr_30\": 0.03853992959051325, \"ctr_7\": 0.03150242326332795, \"ctr_3\": 0.02650602409638554, \"items\": [40031, 20107, 20195, 20029, 117, 592, 102, 464, 20123, 590, 40006, 722, 40062, 10019, 736, 680, 735, 20110, 194, 153, 232, 20120, 652, 28717, 853, 37, 672, 40049, 70004, 463, 613, 40030, 20154, 141575, 661, 532], \"item_ctrs\": [0.019230769230769232, 0.047619047619047616, 0.017467248908296942, 0.03125, 0.0759493670886076, 0.10526315789473684, 0.08333333333333333, 0.21052631578947367, 0.04878048780487805, 0.25, 0.029574861367837338, 0.038461538461538464, 0.1111111111111111, 0.06925207756232687, 0.2, 0.043010752688172046, 0.032, 0.041666666666666664, 0.09290953545232274, 0.06666666666666667, 0.03125, 0.03571428571428571, 0.019230769230769232, 0.10810810810810811, 0.015873015873015872, 0.21428571428571427, 0.030303030303030304, 0.03409090909090909, 0.043478260869565216, 0.045454545454545456, 0.08333333333333333, 0.022727272727272728, 0.05084745762711865, 0.1111111111111111, 0.0392156862745098, 0.039285714285714285], \"menu2s\": [20025, 20123, 20110, 20107, 20195, 20154, 20029, 20014], \"menu2_ctrs\": [0.08333333333333333, 0.25, 0.21052631578947367, 0.25, 0.07142857142857142, 0.08082191780821918, 0.03125, 0.21428571428571427]}","rank_score_model_map":{"XGB_PRODUCT_CTR_GHJ1":0.025919904932379723},"key":"31_362579_152719346979591396"}

我们需要解析出所需特征,然后进行模型训练或评分。

一、Context特征

①timeStamp转成四个特征:

c_day_of_week_:5(周五)

c_hour_of_day_:13(13点)

c_fen10_of_hour_:2(13:24分得到值为2)当前小时过了多少个10分钟

c_fen10_of_day_:67(今天过了多少个10分钟)

②经纬度:经纬度都保留一位小数

c_latitude_:39.2

c_longitude_:117.1

③app版本、手机类型、来源页、

c_app_version_:7380

c_sys_:1

c_from_positon_:2

④搜索词:

oqpl_keyword_双眼皮:1.0

二、User特征

①性别:男(u_final_gender_1:1.0) 女(u_final_gender_0:1.0)未知(u_final_gender_-1:1.0)

说明:推测用户性别有多用途径。例如:保险性别 > 魔镜识别性别 > 注册性别。性别特征值都是1,只不过key不同。

②年龄、订单数、退款数、近30天访问天数、上次活跃天数、日记数、点赞数、发帖数、停留时长、支付金额

处理:如果是0就直接寸0,如果非0就+1取log,然后保留一位或两位小数。

u_log_total_order_cnt_:2.9

u_log_active_day:1.3

u_log_post_cnt:4.3

注意:连续值特征的key都是相同的,只不过value不同。

③是否是常住地

三、Item特征

①离散数值型和各种率

i_is_vip:1.0

i_click_rate:0.4

直接保留一位小数。

②连续数值型特征

i_price_online_ :9.2

i_gmv_cnt:19.9

加1取log,保留一位小数

③近3,7,30天ctr

i_ctr_3_:0.026506023

i_ctr_7_:0.031502422

④click_money、arpu

p_log_arpu_:23.92

p_log_arpu_:3.2

这些既存原始值,也保存log后的值。

⑤机构id:

p_hospital_id_117:1

独热处理:例如这个商品关联了hospital_id是117,那就p_hospital_id_117:1

①竞价金额:

i_bid_:44.3

②粗排召回分

i_pre_socre:70023.2

③文本相关性

i_es_title_score:223.3

i_es_user_name_score:42.3

④商品类型

i_product_weight:2.0(之前product_weight分成三段(1,2~100,101~10000),现在转换成1,2,3三种类型)

⑤商品类目:

例如这个商品的一级类目是[1003,1007],二级类目是[2013]那就需要增加三个特征:

i_product_menu1_1003:1.0

i_product_menu1_1007:1.0

i_product_menu2_2013:1.0

⑥商品城市:

同时增加是否同城、是否同省

i_city_9:1.0

i_province_id_9:1.0

i_same_city:0.0

i_same_province:0.0

⑦商品到用户距离:取log

⑧历史点击:

对应三个特征:

命中:his_click:1、his_click_weight:0.5、his_click_weight_1:1

没命中:his_click:1、his_click_weight:0.5、his_click_weight_1:1

搜索点击列表、安心购列表、加车列表。因为这类都是商品类点击,所以我们可以把它们给合并成一个列表,我们需要给他们赋予不同的权重。例如我们比较看重用户的加车列表,我们可以给赋予1,其他赋值0.5。然后合并列表。如果没有点击列表就没有这三个特征。

 

说明:

①特征分为三类:context特征,item特征、user特征。为了方便区分:每一类都会分别加上c、i、u的前缀

②开始的字符串,一部分数据是由uid从redis中取user特征、由pid取出商品相关的item特征,拼接而成的。

③经纬度的特征处理方式:也可以使用GEOHash,把经纬度转换成地球上的区域。

发布了18 篇原创文章 · 获赞 7 · 访问量 4万+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章