Upgrade to Pro — share decks privately, control downloads, hide ads and more …

嗜好伝達コミュニケーションの効率化を目指した伝達方式の検討/wsa7_local_preference

Cd3d2cb2dadf5488935fe0ddaea7938a?s=47 monochromegane
November 13, 2020

 嗜好伝達コミュニケーションの効率化を目指した伝達方式の検討/wsa7_local_preference

2020.11.13 Web System Architecture 研究会 (WSA研) #7
https://wsa.connpass.com/event/187128/

Cd3d2cb2dadf5488935fe0ddaea7938a?s=128

monochromegane

November 13, 2020
Tweet

Transcript

  1. ࡾ୐༔հ / Pepabo R&D Institute, GMO Pepabo, Inc. 2020.11.13 Web

    System Architecture ݚڀձ (WSAݚ) #7 ᅂ޷఻ୡίϛϡχέʔγϣϯͷ ޮ཰ԽΛ໨ࢦͨ͠఻ୡํࣜͷݕ౼
  2. 1SJODJQBMFOHJOFFS :VTVLF.*:",&!NPOPDISPNFHBOF 1FQBCP3%*OTUJUVUF (.01FQBCP *OD IUUQTCMPHNPOPDISPNFHBOFDPN

  3. 1. ͸͡Ίʹ 2. ᅂ޷఻ୡίϛϡχέʔγϣϯͷ՝୊ͱޮ཰Խͷݕ౼ 1. ૉੑ৘ใͷ఻ୡํࣜ 2. ᅂ޷৘ใͷ఻ୡํࣜ 3. ධՁ

    4. ·ͱΊ 3 ໨࣍
  4. 1. ͸͡Ίʹ

  5. • దԠతͳγεςϜͷ࣮ݱʹ͸ɺγεςϜ͕ར༻ऀͷঢ়گΛΑ͘஌Δ͜ͱ͕ॏཁ • ECαΠτͷγεςϜͰ͋Ε͹ɺར༻ऀͷᅂ޷Λ೺Ѳ͢Δ͜ͱͰɺ࠷దͳ঎ ඼ΛఏҊͰ͖Δ • ಛʹॳظஈ֊ʹ͓͚Δར༻ऀͱͷҰఆྔͷίϛϡχέʔγϣϯ͕ඞཁ • ໌ࣔతͳίϛϡχέʔγϣϯʢϓϩϑΝΠϧͷొ࿥ͳͲʣ •

    ҉໧తͳίϛϡχέʔγϣϯʢߦಈཤྺͷ஝ੵͳͲʣ 5 దԠతͳγεςϜͱίϛϡχέʔγϣϯ
  6. • దԠతͳγεςϜ͸ར༻ऀͷ͜ͱΛ஌Γ͍ͨ • ҰํͰɺར༻ऀʹͱͬͯ͜ͷ఻ୡ͸ෛ୲ • ࿑ྗతʢొ࿥΍஝ੵ࡞ۀʣ • ਫ਼ਆతʢϓϥΠόγʔอޢʣ • Ճ͑ͯɺ͜ͷ΍ΓͱΓ͸γεςϜ͝ͱʹߦΘΕΔ

    6 దԠతͳγεςϜͱίϛϡχέʔγϣϯͷ՝୊
  7. • γεςϜ͝ͱʹൃੜ͢ΔίϛϡχέʔγϣϯΛޮ཰Խ͍ͨ͠ • ఻ୡ͢Δ৘ใྔ͸Ͱ͖Δ͚ͩଟ͘ • ར༻ऀͷෛ୲͸Ͱ͖Δ͚ͩখ͘͞ 7 దԠతͳγεςϜͱίϛϡχέʔγϣϯͷ࣮ݱʹ޲͚ͯ ར༻ऀͷᅂ޷఻ୡʹవΘΔίϛϡχέʔγϣϯͷෛ୲Λ௿ݮͭͭ͠ɺదԠతͳ γεςϜʹΑΔརศੑΛৗʹڗडͰ͖ΔΠϯλʔωοτੈք΁

  8. 2. ᅂ޷఻ୡίϛϡχέʔγϣϯͷ՝୊ͱ ޮ཰Խͷݕ౼

  9. • ᅂ޷(preference)ͱ͸ʮར༻ऀͷૉੑ(feature)ʯʹجͮ͘ʮର৅(content)΁ͷ ൓Ԡ(reaction)ʯͱ͢Δ 9 ఻ୡର৅Ͱ͋Δʮᅂ޷৘ใʯͷຊݚڀʹ͓͚Δఆٛ preference(feature,content) #=> reaction ᶃར༻ऀͷૉੑ৘ใΛ఻͑Δ ᶄར༻ऀͷᅂ޷৘ใΛ఻͑Δ

  10. ᶃ ར༻ऀͷૉੑ(feature)ͷ఻ୡͷ՝୊ͱ ޮ཰Խͷݕ౼

  11. 1. γεςϜ಺ʹݶఆ͞Εͨར༻ऀͷૉੑ ૉੑͱͳΔϓϩϑΝΠϧ΍ߦಈཤྺ͸γεςϜ͝ͱʹݶఆ͞ΕΔ → γεςϜΛԣஅͨ͠ߦಈཤྺ͔ΒͳΔૉੑ͕ར༻Ͱ͖Δͱͳ͓ྑ͍ 2. ద੾ͳσʔλߏ଄͕ෆ໌ γεςϜΛԣஅͨ͠ૉੑΛߏஙͰ͖Δͱͯ͠ɺແݶͷཁҼީิΛ࣋ͭڞ௨ͷ ಛ௃ྔΛશγεςϜͰ؅ཧ͢Δ͜ͱ͸೉͍͠ 3.

    ϓϥΠόγʔอޢ͕ඞཁ ར༻ऀଆ͸ߦಈཤྺͷ։ࣔʹ͋ͨͬͯ಺༰ͷ੍ݶΛٻΊΔͩΖ͏ 11 ར༻ऀͷૉੑ(feature)ͷ఻ୡͷ՝୊
  12. • γεςϜΛԣஅͨ͠ߦಈσʔλΛہॴ؅ཧ͢ΔΞϓϩʔν • Key-Valueܗࣜͷσʔλߏ଄ • γεςϜ΁ͷఏࣔ࣌ʹɺ͜ͷKey-ValueܗࣜͷσʔλΛBloomFilterʹม׵ • ِཅੑ: KeyΛஅఆ͢Δ͜ͱ͕Ͱ͖ͳ͍ಛੑ •

    ۭؒޮ཰: อଘ͢Δཁૉ਺ʹґଘ͠ͳ͍ಛੑ 12 ར༻ऀͷૉੑ(feature)ͷ఻ୡͷํࣜͷݕ౼
  13. ར༻ऀͷૉੑ(feature)ͷ఻ୡͷํࣜͷݕ౼ 13 4ZTUFN -PDBM IUUQFYBNQMFDPNQSPEVDUT  IUUQFYBNQMFDPNQSPEVDUT  EFNPHSBQIJD@ 

    EFNPHSBQIJD@  EFNPHSBQIJD@  ʜ ʜ 4ZTUFN 4ZTUFN ,FZ7BMVFEBUBTUPSF γεςϜΛԣஅͨ͠ ૉੑͷ஝ੵ ʢӾཡ΍ධՁཤྺͳͲʣ
  14. ར༻ऀͷૉੑ(feature)ͷ఻ୡͷํࣜͷݕ౼ 14 4ZTUFN -PDBM IUUQFYBNQMFDPNQSPEVDUT  IUUQFYBNQMFDPNQSPEVDUT  EFNPHSBQIJD@ 

    EFNPHSBQIJD@  EFNPHSBQIJD@  ʜ ʜ        4QBUJBM #MPPN'JMUFS 4ZTUFN 4ZTUFN ,FZ7BMVFEBUBTUPSF ِཅੑ ݻఆ࣍ݩ
  15. ᶄ ର৅(content)΁ͷ൓Ԡ(reaction)ͷ ఻ୡͷ՝୊ͱޮ཰Խͷݕ౼

  16. 1. γεςϜ಺ʹݶఆ͞Εͨར༻ऀͷૉੑ ର৅(content)͸γεςϜ಺ʹݶఆ͞ΕΔͨΊɺγεςϜ͝ͱʹͦͷ൓ԠΛఏ ࣔ͠ͳ͚Ε͹ͳΒͳ͍ɻ ͜ͷ࣌ɺར༻ऀͷᅂ޷ΛΑΓ஌ΔͨΊʹ͸ɺͰ͖Δ͚ͩଟ͘ͷର৅(content) ʹର͢Δ൓Ԡ(reaction)ΛࣔͤΔ͜ͱ͕๬·͍͕͠ɺ࿑ྗతͳෛ୲͸ൺྫͯ͠ ૿Ճ͢Δɻ 2. ϓϥΠόγʔอޢ͕ඞཁ ར༻ऀଆ͸ᅂ޷ͷ։ࣔʹ͋ͨͬͯ಺༰ͷ੍ݶΛٻΊΔͩΖ͏

    16 ର৅(content)΁ͷ൓Ԡ(reaction)ͷ఻ୡͷ՝୊
  17. • ᅂ޷ϞσϧΛہॴ؅ཧ͢ΔΞϓϩʔν • ᅂ޷Ϟσϧͷߏஙͱར༻͸ϩʔΧϧΤʔδΣϯτ͕ߦ͏ • ߏங͞ΕΔᅂ޷Ϟσϧ͸͜Ε·Ͱͷߦಈσʔλ͔Βɺະ஌ͷର৅(content) ΁ͷ൓Ԡ(reaction)Λਫ਼౓Α͘ਪଌ͢Δ • ϩʔΧϧΤʔδΣϯτ͸ɺ͜ͷϞσϧΛ࢖͍ɺγεςϜʹର͢Δର৅(content) ΁ͷ൓Ԡ(reaction)ͷ఻ୡΛ୅ཧ͢Δ

    17 ର৅(content)΁ͷ൓Ԡ(reaction)ͷ఻ୡͷํࣜͷݕ౼
  18. ར༻ऀͷૉੑ(feature)ͷ఻ୡͷํࣜͷݕ౼ 18 4ZTUFN -PDBM IUUQFYBNQMFDPNQSPEVDUT  IUUQFYBNQMFDPNQSPEVDUT  EFNPHSBQIJD@ 

    EFNPHSBQIJD@  EFNPHSBQIJD@  ʜ ʜ 4ZTUFN γεςϜΛԣஅͨ͠ ૉੑͷ஝ੵ ʢӾཡ΍ධՁཤྺͳͲʣ ᅂ޷༧ଌϞσϧΛߏங -PDBM"HFOU
  19. ར༻ऀͷૉੑ(feature)ͷ఻ୡͷํࣜͷݕ౼ 19 4ZTUFN -PDBM IUUQFYBNQMFDPNQSPEVDUT  IUUQFYBNQMFDPNQSPEVDUT  EFNPHSBQIJD@ 

    EFNPHSBQIJD@  EFNPHSBQIJD@  ʜ ʜ 4ZTUFN 4ZTUFN ᅂ޷༧ଌϞσϧ -PDBM"HFOU ᅂ޷܏޲ͷ୅ཧԠ౴ ʢఏࣔൣғͷ੍ݶʹΑΔ ϓϥΠόγʔอޢ΋ʁʣ
  20. ར༻ऀͷૉੑ(feature)ͷ఻ୡͷํࣜͷݕ౼ 20 4ZTUFN -PDBM IUUQFYBNQMFDPNQSPEVDUT  IUUQFYBNQMFDPNQSPEVDUT  EFNPHSBQIJD@ 

    EFNPHSBQIJD@  EFNPHSBQIJD@  ʜ ʜ 4ZTUFN 4ZTUFN ᅂ޷༧ଌϞσϧ -PDBM"HFOU దԠతͳৼΔ෣͍
  21. 3. ධՁ

  22. ᶃ ར༻ऀͷૉੑ(feature)ͷ ఻ୡͷํࣜͷධՁ

  23. ར༻ऀͷૉੑ(feature)ͷ఻ୡͷํࣜͷݕ౼ 23 4ZTUFN -PDBM IUUQFYBNQMFDPNQSPEVDUT  IUUQFYBNQMFDPNQSPEVDUT  EFNPHSBQIJD@ 

    EFNPHSBQIJD@  EFNPHSBQIJD@  ʜ ʜ        4QBUJBM #MPPN'JMUFS 4ZTUFN 4ZTUFN ,FZ7BMVFEBUBTUPSF ِཅੑ ݻఆ࣍ݩ
  24. • BloomFilter (Not spatial)ʹม׵ͨ͠ૉੑʹΑΔᅂ޷৘ใͷ఻ୡೳྗΛௐ΂Δ • ૉੑΛಛ௃ྔͱͯ͠༻͍ͨઢܗͳଟ࿹όϯσΟοτͷγϛϡϨʔγϣϯ • ֤ͨͩ͠࿹ͷઢܗύϥϝʔλ ͷਪఆ͸׬͍ྃͯ͠Δ΋ͷͱ͢Δ •

    ͷ֤࣍ݩͷਪఆ஋͸ॏෳ͢Δݩͷઢܗύϥϝʔλͷظ଴஋ͱͨ͠ • ݩͷૉੑͱൺֱͯ͠ఏҊख๏ͷૉੑͰɺͲͷఔ౓ਫ਼౓ʹมԽ͕͋Δ͔֬ೝ ̂ θa ̂ θa 24 ར༻ऀͷૉੑ(feature)ͷ఻ୡͷํࣜͷ༗ޮੑ arg max a xT a ✓a = arg max a ˆ xT a ˆ ✓a <latexit sha1_base64="C9U6jsIcKOV7vD9Wr6sjo2p5hj8=">AAADKnichZG7TtxAFIaPnQuwhLAkDRKNlRUo1WpMIoFAkVBoKLktIGGyGg+zuyM8tmXPLpCR8wB5AQqqRKJA0PMANKkjpVilpUGUIKVJwfElSgiEjGXPmf+cb/zPHDf0RKwI6Rrmg4ePHvf09pX6nww8HSwPPVuJg3bEeI0FXhCtuTTmnvB5TQnl8bUw4lS6Hl91t2bT/GqHR7EI/GW1G/INSZu+aAhGFUr18oHj820WSEn9Te3QqCnpTqIdSVUrCLUTSQu1D6noeEIKFSeloqquaWI5rtQ7SRq+y6G4oZeTJJUd1eKKZjnrjXUDalGlc/IO9FfyDz6plyukSrJh3Q7sIqhAMeaD8gk4sAkBMGiDBA4+KIw9oBDjsw42EAhR2wCNWoSRyPIcEigh28YqjhUU1S38NnG1Xqg+rtM944xm+BcP3whJC0bJN3JILskXckTOyc9/7qWzPVIvuzi7OcvD+uDH4aUf/6Ukzgpav6l7PStowGTmVaD3MFPSU7Cc77zfu1yaWhzVY+QzuUD/n0iXnOIJ/M4VO1jgi/v3+HHRC94YNsj+ux23g5Xxqv2qOr7wujLztmhVL4zAC3iJ/ZiAGZiDeagBM/oN25gyps1j86vZNb/npaZRMM/hxjDPrgHjidXg</latexit>
  25. ར༻ऀͷૉੑ(feature)ͷ఻ୡͷํࣜͷ༗ޮੑ 25 BDDVSBDZ      %JNFOTJPO 0SJHJOBM

                       EFOTJUZ EFOTJUZ EFOTJUZ EFOTJUZ EFOTJUZ 3BUFPG'1 %FOTJUZ  %FOTJUZ  %FOTJUZ  %FOTJUZ  %FOTJUZ  ີ౓͝ͱͷਫ਼౓ͷมԽ ࢀߟີ౓͝ͱͷِཅੑ཰ ࿹ɺύλʔϯͷઢܗύϥϝʔλʹର ͯ͋͠ΔίϯςΩετ͕ൃੜͨ͠৔߹ͷਫ਼౓ ͷมԽɻίϯςΩετ͸औΓ͏Δύλʔϯͷ ͏ͪ ύλʔϯΛαϯϓϦϯάͨ͠ ͳ͓ɺϋογϡؔ਺ͷ਺͸ৗʹk = 1
  26. ᶄ ର৅(content)΁ͷ൓Ԡ(reaction)ͷ ఻ୡͷํࣜͷධՁ

  27. ར༻ऀͷૉੑ(feature)ͷ఻ୡͷํࣜͷݕ౼ 27 4ZTUFN -PDBM IUUQFYBNQMFDPNQSPEVDUT  IUUQFYBNQMFDPNQSPEVDUT  EFNPHSBQIJD@ 

    EFNPHSBQIJD@  EFNPHSBQIJD@  ʜ ʜ 4ZTUFN 4ZTUFN ᅂ޷༧ଌϞσϧ -PDBM"HFOU ᅂ޷܏޲ͷ୅ཧԠ౴ ʢఏࣔൣғͷ੍ݶʹΑΔ ϓϥΠόγʔอޢ΋ʁʣ
  28. • WIP • Ͳ͏ධՁ͢Δʁ • ϩʔΧϧΤʔδΣϯτͱ༧ଌϞσϧ͸࡞ΕΔͱͯ͠ • ࣮αʔϏεʹ૊ΈࠐΉͱͨ͠Βίϛϡχέʔγϣϯ޻ఔΛͲ͏ઃܭ͢Δʁ • Ͳ͜ʹ৽نੑΛग़͢ʁΞʔΩςΫνϟʁᅂ޷Ϟσϧʁ

    • ྨࣅݚڀ͸ʁ 28 ର৅(content)΁ͷ൓Ԡ(reaction)ͷ఻ୡͷํࣜͷධՁ
  29. 4. ·ͱΊ

  30. • దԠతͳγεςϜͷ࣮ݱʹඞਢͷ఻ୡίϛϡχέʔγϣϯͷෛ୲ʹண໨ͨ͠ • ECαΠτΛྫʹᅂ޷৘ใΛޮ཰తʹ఻ୡ͢ΔํࣜΛݕ౼ͨ͠ • ૉੑΛہॴ؅ཧ͠BloomFilterΛ༻͍ͯϓϥΠόγʔΛߟྀ͠ͳ͕Βఏࣔ͢Δ ํࣜͰ͸ɺ఻ୡਫ਼౓ͷมԽʹ͍ͭͯ༧උධՁΛߦ͍ɺਫ਼౓௿Լʹ͍ͭͯ՝୊Λ ֬ೝͨ͠ • ผ్ɺᅂ޷ϞσϧΛہॴ؅ཧ͠ϩʔΧϧΤʔδΣϯτΛ༻͍ͯ୅ཧԠ౴͢Δํ

    ࣜΛݕ౼͠ɺ͜ͷ࣮ݱੑʹ͍ͭͯٞ࿦ͨ͠ʢ͢Δʣ 30 ·ͱΊ https://icons8.com https://icons8.com
  31. None
  32. ิ଍ࢿྉ

  33. BloomFilter

  34. • ͻͱͭͷϒϧʔϜϑΟϧλ͸ Ϗοτͷ഑ྻ͔Β੒Δ m 34 ϒϧʔϜϑΟϧλ 0, 0, 0, 0,

    0, 0, 0, 0, 0, 0, 0 Bloom filter(m = 10)
  35. • ͻͱͭͷϒϧʔϜϑΟϧλ͸ Ϗοτͷ഑ྻ͔Β੒Δ • ཁૉ͸ ݸͷϋογϡؔ਺͔ΒಘΒΕΔ഑ྻͷఴࣈҐஔͷू߹ʹม׵͞ΕΔ m k 35 ϒϧʔϜϑΟϧλʢཁૉͷ௥Ճʣ

    H1 (element1 ) = 0 H2 (element1 ) = 9 element1 Hash function(k = 2)
  36. • ͻͱͭͷϒϧʔϜϑΟϧλ͸ Ϗοτͷ഑ྻ͔Β੒Δ • ཁૉ͸ ݸͷϋογϡؔ਺͔ΒಘΒΕΔ഑ྻͷఴࣈҐஔͷू߹ʹม׵͞ΕΔ • ू߹͸શཁૉͷ഑ྻͷఴࣈͷ࿨ू߹Λ1ͱ͢Δ഑ྻͱͯ͠දݱ͞ΕΔ m k

    36 ϒϧʔϜϑΟϧλʢཁૉͷ௥Ճʣ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 H1 (element1 ) = 0 H2 (element1 ) = 9 element1 Bloom filter(m = 10) Hash function(k = 2)
  37. • ͻͱͭͷϒϧʔϜϑΟϧλ͸ Ϗοτͷ഑ྻ͔Β੒Δ • ཁૉ͸ ݸͷϋογϡؔ਺͔ΒಘΒΕΔ഑ྻͷఴࣈҐஔͷू߹ʹม׵͞ΕΔ • ू߹͸શཁૉͷ഑ྻͷఴࣈͷ࿨ू߹Λ1ͱ͢Δ഑ྻͱͯ͠දݱ͞ΕΔ m k

    37 ϒϧʔϜϑΟϧλʢཁૉͷ௥Ճʣ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1 H1 (element2 ) = 1 H2 (element2 ) = 9 element2 Bloom filter(m = 10) Hash function(k = 2)
  38. • ໰͍߹ΘͤΔཁૉʹରͯ͠kݸͷϋογϡؔ਺͔ΒಘΒΕͨఴࣈҐஔΛ࢖͏ • ҰͭͰ΋0͕͋Ε͹ʮઈରʹʯؚ·Εͳ͍ 38 ϒϧʔϜϑΟϧλʢཁૉͷ໰͍߹Θͤʣ 1, 1, 0, 0,

    0, 0, 0, 0, 0, 0, 1 H1 (element3 ) = 1 H2 (element3 ) = 8 element3 Bloom filter(m = 10) Hash function(k = 2) ❌
  39. • ໰͍߹ΘͤΔཁૉʹରͯ͠kݸͷϋογϡؔ਺͔ΒಘΒΕͨఴࣈҐஔΛ࢖͏ • ҰͭͰ΋0͕͋Ε͹ʮઈରʹʯؚ·Εͳ͍ • શͯ1ʹͳ͍ͬͯΕ͹ʮɹɹʯؚ·ΕΔ 39 ϒϧʔϜϑΟϧλʢཁૉͷ໰͍߹Θͤʣ 1, 1,

    0, 0, 0, 0, 0, 0, 0, 0, 1 H1 (element1 ) = 0 H2 (element1 ) = 9 element1 Bloom filter(m = 10) Hash function(k = 2) ⭕
  40. • ໰͍߹ΘͤΔཁૉʹରͯ͠kݸͷϋογϡؔ਺͔ΒಘΒΕͨఴࣈҐஔΛ࢖͏ • ҰͭͰ΋0͕͋Ε͹ʮઈରʹʯؚ·Εͳ͍ • શͯ1ʹͳ͍ͬͯΕ͹ʮଟ෼ʯؚ·ΕΔ 40 ϒϧʔϜϑΟϧλʢཁૉͷ໰͍߹Θͤʣ 1, 1,

    0, 0, 0, 0, 0, 0, 0, 0, 1 H1 (element4 ) = 0 H2 (element4 ) = 1 element4 Bloom filter(m = 10) Hash function(k = 2) ❓