Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
ffm-baseline
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ML
ffm-baseline
Commits
c7437c80
Commit
c7437c80
authored
Nov 11, 2019
by
高雅喆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
d415c567
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
gm_feed_cold_start.py
eda/smart_rank/gm_feed_cold_start.py
+6
-0
No files found.
eda/smart_rank/gm_feed_cold_start.py
View file @
c7437c80
...
...
@@ -164,15 +164,18 @@ if __name__ == "__main__":
hot_search_word_topic_queue
=
search_topic_by_match_phrase
(
hot_search_word
)
redis_client
.
rpush
(
hot_search_word_topic_queue_key
,
*
hot_search_word_topic_queue
)
# redis_client.lrange(hot_search_word_topic_queue_key, 0, 3)
print
(
"热搜词更新的帖子队列长度:
%
s"
%
str
(
len
(
hot_search_word_topic_queue
)))
hot_search_word_qa_queue
=
search_qa_by_match_phrase
(
hot_search_word
)
redis_client
.
rpush
(
hot_search_word_qa_queue_key
,
*
hot_search_word_qa_queue
)
print
(
"热搜词更新的问答队列长度:
%
s"
%
str
(
len
(
hot_search_word_qa_queue
)))
# redis_client.lrange(hot_search_word_qa_queue_key, 0, 3)
for
city_tag_id
in
all_city_tag_id
:
diary_queue
=
search_diary_by_match_phrase
(
hot_search_word
,
city_tag_id
)
hot_search_word_diary_queue
.
update
({
city_tag_id
:
diary_queue
})
redis_client
.
hmset
(
hot_search_word_diary_queue_key
,
hot_search_word_diary_queue
)
print
(
"热搜词更新的日记队列长度:
%
s"
%
str
(
len
(
diary_queue
)))
# 轻医美的候选队列
light_clinic_beauty_key
=
"user:service_coldstart_tags3"
...
...
@@ -183,11 +186,14 @@ if __name__ == "__main__":
# 队列存储
light_clinic_beauty_topic_queue
=
search_topic_by_match_phrase
(
light_clinic_beauty
)
redis_client
.
rpush
(
light_clinic_beauty_topic_queue_key
,
*
light_clinic_beauty_topic_queue
)
print
(
"轻医美词更新的帖子队列长度:
%
s"
%
str
(
len
(
light_clinic_beauty_topic_queue
)))
light_clinic_beauty_qa_queue
=
search_qa_by_match_phrase
(
light_clinic_beauty
)
redis_client
.
rpush
(
light_clinic_beauty_qa_queue_key
,
*
light_clinic_beauty_qa_queue
)
print
(
"轻医美词更新的问答队列长度:
%
s"
%
str
(
len
(
light_clinic_beauty_qa_queue
)))
for
city_tag_id
in
all_city_tag_id
:
diary_queue
=
search_diary_by_match_phrase
(
light_clinic_beauty
,
city_tag_id
)
light_clinic_beauty_diary_queue
.
update
({
city_tag_id
:
diary_queue
})
redis_client
.
hmset
(
light_clinic_beauty_diary_queue_key
,
light_clinic_beauty_diary_queue
)
print
(
"轻医美词更新的日记队列长度:
%
s"
%
str
(
len
(
diary_queue
)))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment