Commit 2c0620c3 authored by 高雅喆's avatar 高雅喆

修改冷启动的轻医美词,去掉明星八卦

parent 6514a1e5
......@@ -61,19 +61,6 @@ def get_user_history_order_service_tag(user_id):
redis_client = redis.StrictRedis.from_url('redis://:ReDis!GmTx*0aN9@172.16.40.173:6379')
redis_client.set(user_history_order_tags_key, tags_list_json)
redis_client.expire(user_history_order_tags_key, time=30 * 24 * 60 * 60)
# # 写tidb
# sql_cl_id = "select device_id from statistic_device where id = (select max(device_id) from statistic_device_user where user_id = %d) " % (int(user_id))
# cur_zhengxing.execute(sql_cl_id)
# cl_id = cur_zhengxing.fetchall()[0]["device_id"]
#
# db_jerry_test = pymysql.connect(host='172.16.40.158', port=4000, user='root', passwd='3SYz54LS9#^9sBvC',
# db='jerry_test', charset='utf8')
# cur_jerry_test = db_jerry_test.cursor()
# replace_sql = """replace into user_history_order_tags (stat_date, cl_id, user_id, tag_list) values("{stat_date}","{cl_id}",{user_id},"{tag_list}")"""\
# .format(stat_date=stat_date, cl_id=cl_id, user_id=user_id, tag_list=tags_list)
# cur_jerry_test.execute(replace_sql)
# db_jerry_test.commit()
# db_jerry_test.close()
return user_id
......@@ -110,7 +97,7 @@ if __name__ == '__main__':
hot_search_words_portrait_dict = {i["keywords"]: 0.2 for i in hot_search_words}
redis_client.hmset(hot_search_words_portrait_portrait_key2, hot_search_words_portrait_dict)
hot_search_words = ["小气泡", "双眼皮", "水光针", "玻尿酸", "隆鼻", "牙齿矫正", "明星整形", "明星抗衰", "明星颜值", "明星婚恋", "网红整形", "网红抗衰", "网红颜值", "网红婚恋", "审美"]
hot_search_words = ["瘦脸针", "双眼皮", "线雕", "水光针", "吸脂", "热玛吉", "鼻综合", "玻尿酸", "光子嫩肤"]
hot_search_words_portrait_portrait_key3 = "user:service_coldstart_tags3"
hot_search_words_portrait3_dict = {i: 0.2 for i in hot_search_words}
redis_client.hmset(hot_search_words_portrait_portrait_key3, hot_search_words_portrait3_dict)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment