saori1214 / 2kennme

0 stars 0 forks source link

ユーザーがデートの一軒目を検索時、二軒目の店舗情報をサジェストする #1

Open saori1214 opened 8 years ago

saori1214 commented 8 years ago

目的

・ UU数増加 ・コンテンツの評価向上 ・関連リンク先の順位向上 ・「二軒目」検索時のrettyページ順位向上   (現在→「新宿_ 二軒目」「渋谷 二軒目」ともに20位以降)


背景

・ユーザーが二軒目を検索から探すのが困難  →1軒目検討段階から2軒目をサジェストし、解決


概要

①デートで盛り上がったあと、いざ二軒目に行く時に使う店→以下「二軒目」 (デートと判定されなかった場合には表示しない)

②軽く飲んだ後に次で絶対帰りたい。  お腹を満たしたい。締めにいける店 →以下「シメ」 (どの店でも関係なく全て表示)

二軒目、シメそれぞれにロジックを作成


<強調して表示するポイント>

「二軒目」→営業時間、エリア、目的、個室有無、カウンター席有無 「シメ」→営業時間、エリア、駅から徒歩何分か、さっぱり系orこってり系


二軒目のロジック(優先順位順)

①営業時間が長い→その日の閉店時間が23:00以上

②エリア→起点となる一軒目の住所から半径1キロ以内(徒歩13分以内)

③デート判定 目的:デートが含まれる 口コミキーワード:雰囲気(五反田43件)

*閉店の店は除外

↓ この17件を以下の3分類にして表示 3分類の2つ以上に該当する場合、category_typeが多く該当する方で判断


<3タイプ別> 1.①バー系「がっつり雰囲気重視」 ジャンル:バー、ダイニングバー、ワインバー、ラウンジなど category_type: 102 410 415 525 530 535 540 545

2.②バル、イタリアン、カフェ系「カジュアルな雰囲気」 ジャンル:スペインンバル、イタリアン、カフェ、ビストロ、ワインバー、バル      ケーキ、チョコレート、パフェ、コーヒーなど category_type: 47 101 105 106 107 131 132 146 147 148 149 157 160 161 162 163 164 165 166 167 168 180 190 200 201 220 370 371 390 400 520 560 565 570 575 580 585 590 595 600 605 610 615

3.③居酒屋、和食系「雰囲気よりも飲み」 ジャンル:居酒屋、串、もつ、鍋、魚介、焼き鳥、和食など category_type:15 19 20 21 22 23 24 25 26 27 28 34 35 40 44 45 46 62 71 72 73 74 75 76 77 78 80 81 82 93 100 110 120 140 150 330 340 350 470 475 480 485 490 495 500 505 901


<sql>(例:目的→デート      キーワード→落ち着いた, 雰囲気, ) select * from ( select restaurant_id from ( select restaurant_id from ( select restaurant_id from restaurant join restaurant_purpose as rp using (restaurant_id) join restaurant_station as rst using (restaurant_id) join restaurant_seats as rse using (restaurant_id) join user_restaurant_report as urr using (restaurant_id) join restaurant_opening_hour using (restaurant_id) where rst.station_id = 1370 -- 1370は五反田 and rst.distance <= 1000 and rp.purpose_id = 3 -- 3はデート and (rse.counter_type = 10 or rse.private_room_type = 10) and not (type_first_5 != 0 and start_hour_first_5 = '00:00:00' and end_hour_first_5 = '00:00:00') and (((end_hour_first_5 > '23:00:00' and type_first_5 != 0) or (end_hour_second_5 > '23:00:00' and type_second_5 != 0) or (end_hour_third_5 > '23:00:00' and type_third_5 != 0))) group by restaurant_id) as inner1 join user_restaurant_report as urr using (restaurant_id) group by restaurant_id) as inner2 join user_restaurant_report as urr using (restaurant_id) where urr.report_comment like '%雰囲気%' group by restaurant_id) as inner3 join user_restaurant_report as urr using (restaurant_id) group by restaurant_id


シメのロジック(優先順位順)

①営業時間が長い→その日の閉店時間が23:00以上

②駅から近い→起点となる一軒目の住所から半径1キロ以内にある駅(複数駅該当する場合は全て表示)        そこからそれぞれ徒歩何分か表示       →駅から距離が近い順で表示

*閉店の店は除外

③タイプ別  ・さっぱり→そば、うどん等               or →ランダムで一つずつ表示 ・こってり→ラーメン、丼もの、カレーなど     

・ユニーク性を上げるために、ランダムで各店二つに絞って固定 (上記のどれかに該当しなかったら、優先順位が低いものから除外し、ランダム表示する)


<2タイプ別> ①さっぱり系:目的→美味しい店, 安い店、お一人様OK       ジャンル→うどん, そば ,など        category_type: 41, 42, 50, 60, 113

②こってり系:目的→美味しい店, 安い店、お一人様OK       ジャンル→ラーメン, 丼もの、カレー など       category_type: 10,11,12,13, 14, 16, 19, 33, 90, 91, 111, 112, 114, 115, 116, 117, 118, 121, 122, 123, 124, 125, 126, 128, 141, 142, 150, 250, 260, 290, 295, 300


` select from (select from ( select restaurant_id from restaurant join restaurant_category as ctp using (restaurant_id) join restaurant_purpose as rp using (restaurant_id) join restaurant_station as rst using (restaurant_id) join restaurant_opening_hour using (restaurant_id) where rst.station_id = 1370 -- 1370は五反田 and (ctp.category_type in (10,11,12,13, 14, 16, 19, 33, 90, 91, 111, 112, 114, 115, 116, 117, 118, 121, 122, 123, 124, 125, 126, 128, 141, 142, 150, 250, 260, 290, 295, 300) -- 「こってり」タイプ

or ctp.category_type in (41, 42, 50, 60, 113)) -- 「さっぱり」タイプ

and rst.distance <= 1000 and rp.purpose_id in (12, 46) -- お一人様おけ -- おいしい、やすい

and not (type_first_5 != 0 and start_hour_first_5 = '00:00:00' and end_hour_first_5 = '00:00:00') and (((end_hour_first_5 > '23:00:00' and type_first_5 != 0) or (end_hour_second_5 > '23:00:00' and type_second_5 != 0) or (end_hour_third_5 > '23:00:00' and type_third_5 != 0)))) as inner1 join restaurant as r using (restaurant_id)

group by restaurant_id) as a left outer join (select distinct restaurant_id from restaurant join restaurant_category using (restaurant_id) where category_type in (105, 106, 107, 108, 131, 201, 220, 350, 410, 545)) as b using (restaurant_id) where b.restaurant_id is null;`


 <具体例>

2016-09-09 16 51 25

<表示する項目>   ①タイトル:「二軒目にオススメな近くのお店」    サブタイトル:「バー系でオススメ」「カジュアル系でオススメ」「居酒屋系でオススメ」   ②写真:なるべく内装の写真(雰囲気を伝えやすくするため)   ③店名   ④基本情報:○駅から徒歩何分、営業時間(閉店時間太字)   ⑤その他:予算、ジャンル、目的、個室有無、カウンター有無   ⑥口コミ一件分

デートに該当しなかった場合は、シメのみの表示にする。

・厳格にデートだと断定できなくても、条件が近いものはデート以外の目的(女子会、飲み会、合コンなど)でも似たような雰囲気を求めている可能性が高い。→表示 ・サジェストが刺さらなくても、関連で他の店を探すことができる→ユーザーが回遊する

<表示しない例> ・目的にデートが該当しない店


<シメのサジェスト例>

2016-09-09 16 52 14

<表示する項目> ①タイトル:「シメでオススメな駅チカのお店」   サブタイトル:「さっぱり系」「こってり系」 ②写真:なるべく料理のアップ写真(料理を分かりやすく伝えるため) ③店名 ④基本情報:住所、地図、電話番号、営業時間、駅から徒歩〇分 ⑤その他:予算、ジャンル、目的 ⑥口コミ一件分

mizutamazukki commented 6 years ago

これめっちゃ面白い!!!!