商品搜索-特徵處理(實例)

這是在排序時拿到的所有數據

{"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萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章