보름달 🌝 #3.2 Development - NUGU PlayBuilder (ENG)

보름달·2020λ…„ 12μ›” 6일
4

개발 / Development

λͺ©λ‘ 보기
4/4
post-thumbnail

1. Role Distribution

NameRole
Kim JeonginApplication Backend, NUGU backend proxy
Kim JinaApplication Frontend, NUGU playbuilder
Jung SihyunApplication Backend, NUGU backend proxy
TheophileApplication Backend - Machine Learning

2. Structure

Β Β Β Β NUGU Play Builder is a development tool that can easily create AI services which can be used in SKT NUGU devices and applications with simple code definition and example sentence input.Β Β Β Β The picture above is NUGU play structure of 보름달.

3. Function

1) Emotional Converstaion


2) Health Tip


3) Analgesic Recommendation


4) Woman Health Self-check

# case 1

# case 2


5) Ask Mean Period


6) Ask Real Menstruation


7) Input Real Menstruation


8) Ask Predicted Menstruation


4. NUGU Playbuilder

1) Emotional Converstaion

  • Intent : ask.Mood

    μ£Όμ²΄λ°œν™” μ˜ˆμ‹œνž˜λ“€μ–΄
    μ‚¬μš©μžEntityMOOD
  • Action : ask.Mood

    μ£Όμ²΄λ°œν™” μ˜ˆμ‹œκ°€λ”μ€ ν„Έμ–΄λ†“λŠ” 게 도움이 될 μˆ˜λ„ μžˆμ–΄μš” ...
    NUGU--

2) Health Tip

  • Intet : ask.Tip

    μ£Όμ²΄λ°œν™” μ˜ˆμ‹œλ°°κ°€ μ•„νŒŒ
    μ‚¬μš©μžEntityTIP
  • Action : ask.Tip

    μ£Όμ²΄λ°œν™” μ˜ˆμ‹œμ €λ₯Ό 따라 μ‹¬ν˜Έν‘μ„ ν•΄λ³΄μ„Έμš” ...
    NUGU--

3) Woman Health Self-check

  • Intent : ask.selfTest

    μ£Όμ²΄λ°œν™” μ˜ˆμ‹œμžκ°€μ§„λ‹¨ν• λž˜
    μ‚¬μš©μž--
  • Action : answer.selfTest

    μ£Όμ²΄λ°œν™” μ˜ˆμ‹œμ–΄λ–€ μžκ°€μ§„λ‹¨μ„ μ›ν•˜μ„Έμš”? μƒλ¦¬ν˜ˆ μƒνƒœ μžκ°€μ§„λ‹¨μ€ 1번, μƒλ¦¬ν˜ˆ 색깔 μžκ°€μ§„λ‹¨μ€ 2번이라고 λ§μ”€ν•΄μ£Όμ„Έμš”.
    NUGU--

    μ£Όμ²΄λ°œν™” μ˜ˆμ‹œ1번
    μ‚¬μš©μžEntityNUMBER
    • check.bleedState : NUMBER === 1번

      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œμƒλ¦¬ν˜ˆ μƒνƒœ μžκ°€μ§„λ‹¨μ„ μ‹œμž‘ν• κ²Œμš”. μƒλ¦¬λŒ€ μ–‘μœΌλ‘œ 따져보면, ν•˜λ£¨μ— μƒλ¦¬λŒ€ 5개 정도λ₯Ό μ‚¬μš©ν•˜λŠ” 것이 정상적인 μƒλ¦¬μ˜ 양이라고 λ³Ό 수 μžˆμŠ΅λ‹ˆλ‹€. μƒλ¦¬λŸ‰μ΄ κ°‘μžκΈ° λ§Žμ•„μ‘ŒμœΌλ©΄ 1번, μƒλ¦¬λŸ‰μ΄ λ„ˆλ¬΄ 적으면 2번, 생리할 λ•Œ 핏덩어리가 λ‚˜μ˜€λ©΄ 3번이라고 λ§μ”€ν•΄μ£Όμ„Έμš”.
      NUGU--

      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œ1번
      μ‚¬μš©μžEntityNUMBER
      • check.bleedState_large : NUMBER === 1번

        μ£Όμ²΄λ°œν™” μ˜ˆμ‹œμƒλ¦¬λŸ‰μ΄ κ°‘μžκΈ° λŠ˜μ—ˆμ„ 경우, "μŠ€νŠΈλ ˆμŠ€κ°€ ν‰μ†Œλ³΄λ‹€ κ³Όν–ˆκ΅°." ν•˜κ³  λ„˜μ–΄κ°€μ„œλŠ” μ•ˆλ©λ‹ˆλ‹€! μƒλ¦¬λŸ‰μ΄ κΈ‰κ²©ν•˜κ²Œ 많이 λŠ˜μ—ˆλ‹€λ©΄, μžκΆκ·Όμ’…μ„ μ˜μ‹¬ν•΄λ³Ό 수 μžˆμŠ΅λ‹ˆλ‹€. κ·Έλƒ₯ λ„˜κ²Όλ‹€κ°€ 병을 ν‚€μšΈ μˆ˜λ„ μžˆμœΌλ‹ˆ, κΌ­ 산뢀인과에 λ°©λ¬Έν•˜μ—¬ 검사λ₯Ό λ°›μ•„λ³΄μ‹œλŠ” 것이 μ’‹μŠ΅λ‹ˆλ‹€!
        NUGU--
      • check.bleedState_small : NUMBER === 2번

        μ£Όμ²΄λ°œν™” μ˜ˆμ‹œλ°°λž€κΈ°κ°€ μ§€λ‚˜λ©΄ μžκΆλ‚΄λ§‰μ˜ λ‘κ»˜λŠ” 8mm μ΄μƒμœΌλ‘œ λ‘κΊΌμ›Œμ Έμ•Ό ν•˜λŠ”λ° 그렇지 μ•Šμ€ κ²½μš°μ—λŠ” μƒλ¦¬λŸ‰μ΄ μ μ–΄μ§€κ²Œ λ©λ‹ˆλ‹€. μžκΆλ‚΄λ§‰μ΄ 8mm μ΄μƒμœΌλ‘œ μ„±μž₯ν•˜μ§€ μ•ŠμœΌλ©΄ μˆ˜μ • ν›„ 착상에 지μž₯을 쀄 수 있기 λ•Œλ¬Έμ— μž„μ‹ μ— μ•ˆ 쒋은 영ν–₯을 끼칠 수 μžˆμœΌλ‹ˆ κΌ­ κΈ°μ–΅ν•΄ μ£Όμ„Έμš”!
        NUGU--
      • check.bleedState_mass : NUMBER === 3번

        μ£Όμ²΄λ°œν™” μ˜ˆμ‹œμƒλ¦¬ν•  λ•Œ λ‚˜μ˜€λŠ” ν”Όμ˜ 덩어리λ₯Ό ν•œλ°©μ—μ„œλŠ” μ–΄ν˜ˆμ΄λΌκ³  λΆˆλŸ¬μš”. μ‹¬ν•œ 슀트레슀 λ“±μœΌλ‘œ, ν˜ˆμ•‘κ³Ό κΈ° μˆœν™˜μ΄ 잘 λ˜μ§€ μ•Šμ•„μ„œμƒκΈ°λŠ” κ²ƒμœΌλ‘œ 핏덩이가 많이 λ‚˜μ˜€λŠ” 뢄듀은 ν•˜λ³΅λƒ‰μ¦μ΄λ‚˜ 생리톡이 심할 κ°€λŠ₯성이 μ»€μš”. λͺΈμ„ λ”°λœ»ν•˜κ²Œ ν•΄μ£Όκ³  ν˜ˆμ•‘μˆœν™˜μ΄ 잘 λ˜λ„λ‘ μŠ€νŠΈλ ˆμΉ­μ΄λ‚˜ κ°€λ²Όμš΄ μ‚°μ±… λ“± κ·œμΉ™μ μœΌλ‘œ μš΄λ™ν•˜λŠ” 것이 μžκΆκ±΄κ°•κ³Ό λ‚΄ λͺΈ 건강에 μ’‹μ•„μš”!
        NUGU--
    • check.bleedColor : NUMBER === 2번

      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œμƒλ¦¬ν˜ˆ 색깔 μžκ°€μ§„λ‹¨μ„ μ‹œμž‘ν• κ²Œμš”. μƒλ¦¬ν˜ˆ 색깔이 μ„ λͺ…ν•œ 뢄홍색이면 1번, 밝은 빨간색이면 2번, μ–΄λ‘μš΄ μžμ£Όμƒ‰μ΄λ©΄ 3번, 주황빛이면 4번, μ§„ν•œ κ°ˆμƒ‰μ΄λ©΄ 5번, 검은색이면 6번이라고 λ§μ”€ν•΄μ£Όμ„Έμš”.
      NUGU--

      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œ1번
      μ‚¬μš©μžEntityNUMBER
      • check.bleedColor_PINK

        μ£Όμ²΄λ°œν™” μ˜ˆμ‹œμƒλ¦¬ μ΄ˆκΈ°μ—λŠ” μƒλ¦¬ν˜ˆμ΄ 선뢄홍색을 띌 수 μžˆμ§€λ§Œ, 생리 κΈ°κ°„ 쀑 핑크빛을 보인닀면 내뢀손상, 성병 λ˜λŠ” 호λ₯΄λͺ¬ λ³€ν™” λ“± 건강 μƒμ˜ λ¬Έμ œκ°€ μžˆμ„ 수 μžˆμœΌλ―€λ‘œ 산뢀인과 진단이 ν•„μš”ν•΄μš”. λ˜ν•œ, 생리 κΈ°κ°„ 외에 μ΄λŸ¬ν•œ 좜혈이 μžˆλ‹€λ©΄ μžκΆμ—Όμ¦ ν˜Ήμ€ μž„μ‹  κ°€λŠ₯성이 μžˆμœΌλ―€λ‘œ μ •ν™•ν•œ 검사λ₯Ό μœ„ν•΄ 병원을 κΌ­ λ°©λ¬Έν•΄μ£Όμ„Έμš”!
        NUGU--
      • check.bleedColor_RED

        μ£Όμ²΄λ°œν™” μ˜ˆμ‹œν”ν•œ μƒλ¦¬ν˜ˆ μƒ‰κΉ”λ‘œ, 호λ₯΄λͺ¬ μˆ˜μΉ˜κ°€ μ λ‹Ήν•˜λ©° ν˜ˆμ•‘μˆœν™˜μ΄ μ›ν™œν•  경우 밝은 λΉ¨κ°„μƒ‰μ˜ μƒλ¦¬ν˜ˆμ΄ λ‚˜νƒ€λ‚˜μš”. κ·ΈλŸ¬λ‚˜ μ§€λ‚˜μΉ˜κ²Œ 밝은 뢄홍빛을 λˆλ‹€λ©΄ μ—μŠ€νŠΈλ‘œκ² 수치의 λ¬Έμ œμΌμˆ˜λ„ μžˆμ–΄μš”. λ‹€μ΄μ–΄νŠΈ, λ˜ν•œ κ³Όλ„ν•œ μ•Œμ½”μ˜¬ μ„­μ·¨λ‘œλ„ λ‚˜νƒ€λ‚  수 μžˆμ–΄μš”.
        NUGU--
      • check.bleedColor_PURPLE

        μ£Όμ²΄λ°œν™” μ˜ˆμ‹œμƒλ¦¬λŸ‰μ΄ λ§Žμ„ 경우 μ–΄λ‘μš΄ μžμ£Όμƒ‰μ˜ 덩어리 혈이 보일 수 μžˆμ–΄μš”. κ·ΈλŸ¬λ‚˜, 타인과 λΉ„κ΅ν–ˆμ„ λ•Œ, 자주 μƒλ¦¬λŒ€λ₯Ό ꡐ체해야 ν•  μ •λ„λ‘œ μƒλ¦¬ν˜ˆμ΄ λ°°μΆœλœλ‹€λ©΄ μžκΆκ·Όμ’…, μžκΆμ„ κ·Όμ¦ λ“± μ—¬μ„± μ§ˆν™˜μ˜ μ‹ ν˜ΈμΌ 수 μžˆμœΌλ―€λ‘œ μ£Όμ˜ν•΄μ£Όμ„Έμš”!
        NUGU--
      • check.bleedColor_ORANGE

        μ£Όμ²΄λ°œν™” μ˜ˆμ‹œμ§ˆμ—Όμ— κ°μ—Όλ˜μ—ˆμ„ κ°€λŠ₯성이 λ†’λ‹€κ³  λ³Ό 수 μžˆμ–΄μš”. μ§ˆμ—Όμ€ ν”ν•œ μ§ˆλ³‘μ΄μ§€λ§Œ, λ°©μΉ˜ν•˜κ²Œ 되면 더 큰 μ§ˆλ³‘ λ˜λŠ” λ‹€λ₯Έ μ§ˆλ³‘μ„ μ•ΌκΈ°ν•˜κ³  ν™•λŒ€μ‹œν‚¬ 수 μžˆλ‹΅λ‹ˆλ‹€! μ§ˆμ—Όμ΄ μ‹¬κ°ν•˜μ§€ μ•Šλ‹€κ³  κ°€λ³κ²Œ μƒκ°ν•˜μ§€ 말고 μ΄ˆκΈ°μ— 병원을 μ°ΎλŠ” 것이 μ’‹μ•„μš”.
        NUGU--
      • check.bleedColor_BROWN

        μ£Όμ²΄λ°œν™” μ˜ˆμ‹œμ˜€λž˜λœ μƒλ¦¬ν˜ˆμ΄ λ‚˜μ˜€λŠ” 것일 수 μžˆμœΌλ―€λ‘œ 생리 첫날 λ˜λŠ” 끝자락 즈음이라면, κ±±μ •ν•˜μ§€ μ•Šμ•„λ„ λΌμš”! κ·ΈλŸ¬λ‚˜ 생리 κΈ°κ°„ 쀑 μ§„ν•œ κ°ˆμƒ‰μ˜ μƒλ¦¬ν˜ˆμ΄ λ‚˜μ˜¨λ‹€λ©΄, μ΄λŠ” λΆ€μ • 좜혈둜 μžκΆκ·Όμ’… λ˜λŠ” μžκΆλ‚΄λ§‰μ¦ 일 수 μžˆμ–΄μš”!
        NUGU--
      • check.bleedColor_BLACK

        μ£Όμ²΄λ°œν™” μ˜ˆμ‹œμƒλ¦¬ 끝 무렡, λ˜λŠ” 생리양이 λ§Žμ€ μ‚ΌμΌμ—μ„œ 사일 경에, 검은색을 λ„λŠ” μƒλ¦¬ν˜ˆμ΄ λ‚˜μ˜¬ 수 μžˆμ–΄μš”. κ·ΈλŸ¬λ‚˜ 이 μƒνƒœκ°€ 였래 μ§€μ†λœλ‹€λ©΄ μžκΆκ·Όμ’…μ„ μ˜μ‹¬ν•΄ λ³Ό 수 μžˆμ–΄μš”.
        NUGU--

4) Analgesic Recommendation

  • Intent : ask.pill

    μ£Όμ²΄λ°œν™” μ˜ˆμ‹œμ•½μΆ”μ²œν•΄μ€˜
    μ‚¬μš©μžEntityPILL-
  • Action : check.userID2

    μ£Όμ²΄λ°œν™” μ˜ˆμ‹œλ³΄λ¦„λ‹¬ μ–΄ν”Œμ˜ 메인 νŽ˜μ΄μ§€μ—μžˆλŠ” λˆ„κ΅¬ μŠ€ν”Όμ»€μ•„μ΄λ””λ₯Ό λ§μ”€ν•΄μ£Όμ„Έμš”.
    NUGU--

    μ£Όμ²΄λ°œν™” μ˜ˆμ‹œ1
    μ‚¬μš©μžEntityuser_ID
    • answer.pill

      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œ1λ‹˜μ˜ 정보λ₯Ό μ•Œλ €λ“œλ¦΄κ²Œμš”.
      NUGUEntityuser_ID-

      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œκ·Έλž˜
      μ‚¬μš©μžEntityYON

      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œμ•½μ„ μΆ”μ²œν•΄λ“œλ¦΄κ²Œμš”. 게보린과 펜잘큐λ₯Ό λ³΅μš©ν•˜μ„Έμš”.
      NUGUBackend ParameterpillPredict
      * answer.noPill : No symptoms exist in the database
      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œμž…λ ₯된 증상이 μ—†μ–΄μ„œ μΆ”μ²œν•΄λ“œλ¦΄ 수 μ—†μ–΄μš”. 보름달 μ–΄ν”Œμ—μ„œ 증상을 μž…λ ₯ν•΄μ£Όμ„Έμš”.
      NUGU--
      * answer.wrongID3 : No id exists in the database
      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œμ‘΄μž¬ν•˜λŠ” 아이디가 μ—†μ–΄μš”. 보름달 μ–΄ν”Œ 메인 νŽ˜μ΄μ§€μ—μ„œ λˆ„κ΅¬ μŠ€ν”Όμ»€ 아이디λ₯Ό ν™•μΈν•΄μ£Όμ„Έμš”.
      NUGU--
      * answer.WRONG3 : YON is not '예'
      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œλ³΄λ¦„λ‹¬μ„ μ’…λ£Œν• κ²Œμš”.
      NUGU--

5) Ask Mean Period

  • Intent : ask.meanCycle

    μ£Όμ²΄λ°œν™” μ˜ˆμ‹œμ£ΌκΈ°μ•Œλ €μ€˜
    μ‚¬μš©μžEntityMEANCYCLE-
  • Action : check.userID1

    μ£Όμ²΄λ°œν™” μ˜ˆμ‹œλ³΄λ¦„λ‹¬ μ–΄ν”Œμ˜ 메인 νŽ˜μ΄μ§€μ—μžˆλŠ” λˆ„κ΅¬ μŠ€ν”Όμ»€μ•„μ΄λ””λ₯Ό λ§μ”€ν•΄μ£Όμ„Έμš”.
    NUGU--

    μ£Όμ²΄λ°œν™” μ˜ˆμ‹œ1
    μ‚¬μš©μžEntityuser_ID

    • answer.meanCycle

      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œ1λ‹˜μ˜ 정보λ₯Ό μ•Œλ €λ“œλ¦΄κ²Œμš”.
      NUGUEntityuser_ID-

      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œκ·Έλž˜
      μ‚¬μš©μžEntityYON

      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œνšŒμ›λ‹˜μ˜ μ£ΌκΈ°λŠ”30일 μž…λ‹ˆλ‹€.
      NUGUBackend Parameter-meanCycle-

      *  answer.noMeanCycle : No meanPeriod exists in the database, not enough data to calculate meanPeriod 
      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œμž…λ ₯된 μΆ©λΆ„ν•œ μ£ΌκΈ°κ°€ μ—†λ„€μš”. μ–΄ν”Œμ—μ„œ μ£ΌκΈ°λ₯Ό μž…λ ₯ν•΄μ£Όμ„Έμš”.
      NUGU--

      * answer.wrongID3 : No id exists in the database.
      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œμ‘΄μž¬ν•˜λŠ” 아이디가 μ—†μ–΄μš”. 보름달 μ–΄ν”Œ 메인 νŽ˜μ΄μ§€μ—μ„œ λˆ„κ΅¬ μŠ€ν”Όμ»€ 아이디λ₯Ό ν™•μΈν•΄μ£Όμ„Έμš”.
      NUGU--
      * answer.WRONG3 : YON is not '예'
      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œλ³΄λ¦„λ‹¬μ„ μ’…λ£Œν• κ²Œμš”.
      NUGU--

6) μ‹€μ œ 생리 μ£ΌκΈ° 쑰회

  • Intent : ask.cycle

    μ£Όμ²΄λ°œν™” μ˜ˆμ‹œμ΄λ²ˆ μƒλ¦¬μ–Έμ œ λλ‚˜?
    μ‚¬μš©μžEntityCYCLE_STATE-
  • Action : check.userID3

    μ£Όμ²΄λ°œν™” μ˜ˆμ‹œλ³΄λ¦„λ‹¬ μ–΄ν”Œμ˜ 메인 νŽ˜μ΄μ§€μ—μžˆλŠ” λˆ„κ΅¬ μŠ€ν”Όμ»€μ•„μ΄λ””λ₯Ό λ§μ”€ν•΄μ£Όμ„Έμš”.
    NUGU--

    μ£Όμ²΄λ°œν™” μ˜ˆμ‹œ1
    μ‚¬μš©μžEntityuser_ID
    • answer.cycle

      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œ1λ‹˜μ˜ 정보λ₯Ό μ•Œλ €λ“œλ¦΄κ²Œμš”.
      NUGUEntityuser_ID-

      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œκ·Έλž˜
      μ‚¬μš©μžEntityYON

      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œνšŒμ›λ‹˜μ˜ 이번 생리 μ‹œμž‘μΌμ€2020-12-3이고, μ’…λ£ŒμΌμ€2020-12-9μž…λ‹ˆλ‹€.
      NUGUBackend Parameter-cycleStart-cycleEnd-
      * answer.noCycle : No real cycle exists in the database
      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œμž…λ ₯된 μ£ΌκΈ°κ°€ μ—†λ„€μš”. μ–΄ν”Œμ—μ„œ μ£ΌκΈ°λ₯Ό μž…λ ₯ν•΄μ£Όμ„Έμš”.
      NUGU--
      * answer.wrongID1 : NO id exists in the database
      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œμ‘΄μž¬ν•˜λŠ” 아이디가 μ—†μ–΄μš”. 보름달 μ–΄ν”Œ 메인 νŽ˜μ΄μ§€μ—μ„œ λˆ„κ΅¬ μŠ€ν”Όμ»€ 아이디λ₯Ό ν™•μΈν•΄μ£Όμ„Έμš”.
      NUGU--
      * answer.WRONG1 : YON is no '예'
      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œλ³΄λ¦„λ‹¬μ„ μ’…λ£Œν• κ²Œμš”.
      NUGU--

7) Input Real Menstruation

1 - relative date
  • Intent : input.cycle

    μ£Όμ²΄λ°œν™” μ˜ˆμ‹œλ‚˜μ˜€λŠ˜μƒλ¦¬μ‹œμž‘ν–ˆμ–΄
    μ‚¬μš©μžEntity-DATE-CYCLE-
  • Action : check.userID5

    μ£Όμ²΄λ°œν™” μ˜ˆμ‹œλ³΄λ¦„λ‹¬ μ–΄ν”Œμ˜ 메인 νŽ˜μ΄μ§€μ—μžˆλŠ” λˆ„κ΅¬ μŠ€ν”Όμ»€μ•„μ΄λ””λ₯Ό λ§μ”€ν•΄μ£Όμ„Έμš”.
    NUGU--

    μ£Όμ²΄λ°œν™” μ˜ˆμ‹œ1
    μ‚¬μš©μžEntityuser_ID
    • output.cycleStart

      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œ1λ‹˜μ˜ 정보에 μž…λ ₯ν•©λ‹ˆλ‹€.
      NUGUEntityuser_ID-

      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œκ·Έλž˜
      μ‚¬μš©μžEntityYON

      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œμƒλ¦¬ μ‹œμž‘μΌμ„ μž…λ ₯ν–ˆμŠ΅λ‹ˆλ‹€.
      NUGU--
      * answer.wrongID5_1 : No id exists in the database
      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œμ‘΄μž¬ν•˜λŠ” 아이디가 μ—†μ–΄μš”. 보름달 μ–΄ν”Œ 메인 νŽ˜μ΄μ§€μ—μ„œ λˆ„κ΅¬ μŠ€ν”Όμ»€ 아이디λ₯Ό ν™•μΈν•΄μ£Όμ„Έμš”.
      NUGU--
      * answer.WRONG5_1 : YON is not 예'
      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œλ³΄λ¦„λ‹¬μ„ μ’…λ£Œν• κ²Œμš”.
      NUGU--
    • output.cycleEnd

      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œ1λ‹˜μ˜ 정보에 μž…λ ₯ν•©λ‹ˆλ‹€.
      NUGUEntityuser_ID-

      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œκ·Έλž˜
      μ‚¬μš©μžEntityYON

      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œμƒλ¦¬ μ’…λ£ŒμΌμ„ μž…λ ₯ν–ˆμŠ΅λ‹ˆλ‹€.
      NUGU--
      - answer.wrongID5_2 : No id eixstis in the database
      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œμ‘΄μž¬ν•˜λŠ” 아이디가 μ—†μ–΄μš”. 보름달 μ–΄ν”Œ 메인 νŽ˜μ΄μ§€μ—μ„œ λˆ„κ΅¬ μŠ€ν”Όμ»€ 아이디λ₯Ό ν™•μΈν•΄μ£Όμ„Έμš”.
      NUGU--
      - answer.WRONG5_2 : YON is not '예'
      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œλ³΄λ¦„λ‹¬μ„ μ’…λ£Œν• κ²Œμš”.
      NUGU--
2 - absolute date
  • Intent : input.pastCycleStart

    μ£Όμ²΄λ°œν™” μ˜ˆμ‹œ2020λ…„12μ›”9일에생리 μ‹œμž‘ν–ˆμ–΄
    μ‚¬μš©μžEntitySTART_YEARSTART_MONTHSTART_DATE-PAST_CYCLE_START-
  • Action : add.pastPeriod

    μ£Όμ²΄λ°œν™” μ˜ˆμ‹œμƒλ¦¬ μ‹œμž‘μ„ μž…λ ₯ν•˜μ…¨μŠ΅λ‹ˆλ‹€. 생리λ₯Ό λ©°μΉ  λ™μ•ˆ ν•˜μ…¨λŠ”μ§€ μ•Œλ €μ£Όμ„Έμš”. 이틀 λ™μ•ˆ ν•˜μ…¨λ‹€λ©΄, 2일이라고 λ§μ”€ν•΄μ£Όμ„Έμš”.
    NUGU--

    μ£Όμ²΄λ°œν™” μ˜ˆμ‹œ2일
    μ‚¬μš©μžEntityPAST_PERIOD-
    • check.userID6

      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œλ³΄λ¦„λ‹¬ μ–΄ν”Œμ˜ 메인 νŽ˜μ΄μ§€μ—μžˆλŠ” λˆ„κ΅¬ μŠ€ν”Όμ»€μ•„μ΄λ””λ₯Ό λ§μ”€ν•΄μ£Όμ„Έμš”.
      NUGU--

      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œ1
      μ‚¬μš©μžEntityuser_ID
      • output.pastCycle

        μ£Όμ²΄λ°œν™” μ˜ˆμ‹œ1λ‹˜μ˜ 정보에 μž…λ ₯ν•©λ‹ˆλ‹€.
        NUGUEntityuser_ID-

        μ£Όμ²΄λ°œν™” μ˜ˆμ‹œκ·Έλž˜
        μ‚¬μš©μžEntityYON

        μ£Όμ²΄λ°œν™” μ˜ˆμ‹œμƒλ¦¬ μ’…λ£ŒμΌμ„ μž…λ ₯ν–ˆμŠ΅λ‹ˆλ‹€.
        NUGU--

        - answer.wrongID6 : No id exists in the database
        - answer.WRONG6 : YON is not '예'


8) Input Predicted Menstruation

  • Intent : ask.predictCycle

    μ£Όμ²΄λ°œν™” μ˜ˆμ‹œμƒλ¦¬ μ˜ˆμ •μΌμ•Œλ €μ€˜
    μ‚¬μš©μžEntityCYCLE_STATE-
  • Action : check.userID4

    μ£Όμ²΄λ°œν™” μ˜ˆμ‹œλ³΄λ¦„λ‹¬ μ–΄ν”Œμ˜ 메인 νŽ˜μ΄μ§€μ—μžˆλŠ” λˆ„κ΅¬ μŠ€ν”Όμ»€μ•„μ΄λ””λ₯Ό λ§μ”€ν•΄μ£Όμ„Έμš”.
    NUGU--

    μ£Όμ²΄λ°œν™” μ˜ˆμ‹œ1
    μ‚¬μš©μžEntityuser_ID
    • answer.predictBleed

      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œ1λ‹˜μ˜ 정보λ₯Ό μ•Œλ €λ“œλ¦΄κ²Œμš”.
      NUGUEntityuser_ID-

      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œκ·Έλž˜
      μ‚¬μš©μžEntityYON

      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œνšŒμ›λ‹˜μ˜ λ‹€μŒ μƒλ¦¬λŠ”2020-1-3에 μ‹œμž‘ν•΄μ„œ2020-1-9에 끝날 μ˜ˆμ •μž…λ‹ˆλ‹€.
      NUGUBackend Parameter-predictStart-predictEnd-
      * answer.NoPredictBleed : No previous cycle data exists, canno predict future cycle
      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œμž…λ ₯된 μ£ΌκΈ°κ°€ μ—†λ„€μš”. μ–΄ν”Œμ—μ„œ μ£ΌκΈ°λ₯Ό μž…λ ₯ν•΄μ£Όμ„Έμš”.
      NUGU--
      * answer.wrongID4 : No id exists in the database
      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œμ‘΄μž¬ν•˜λŠ” 아이디가 μ—†μ–΄μš”. 보름달 μ–΄ν”Œ 메인 νŽ˜μ΄μ§€μ—μ„œ λˆ„κ΅¬ μŠ€ν”Όμ»€ 아이디λ₯Ό ν™•μΈν•΄μ£Όμ„Έμš”.
      NUGU--
      * answer.WRONG4 : YON is not '예'
      μ£Όμ²΄λ°œν™” μ˜ˆμ‹œλ³΄λ¦„λ‹¬μ„ μ’…λ£Œν• κ²Œμš”.
      NUGU--]

5. Backend Proxy

Β Β Β Β Backend proxy is server used when NUGU playbuilder external data to answer a question.
Β Β Β  Accorind to the NUGU developers guide, version, resultCode, output are mandatory. We made responseController moudle in accordance with sample format.

const resSample = function () {
  let resSample = {
    version: "2.0",
    resultCode: "OK",
    output: {},
  };
  return resSample;
};

module.exports = { resSample };

Β Β Β Β To differentiate application backend and backend proxy, we did routing at teh proxyIndex file, and made functions at teh proxyControllers directory.
Β Β Β Each contoller makes function and returns in accordance with responseController format.

profile
λ‹Ήμ‹ μ˜ μ—¬μ„± 건강 지킴이

2개의 λŒ“κΈ€

comment-user-thumbnail
2020λ…„ 12μ›” 15일

Thanks a lot for sharing!JOKER123

λ‹΅κΈ€ 달기