mirror of
https://github.com/hwanny1128/HGZero.git
synced 2026-06-13 16:29:11 +00:00
내부 시퀀스 실시간 추천 기능 DB조회 제거
This commit is contained in:
@@ -6,21 +6,16 @@ title AI Service 내부 시퀀스 - 논의사항제안
|
||||
participant "SuggestionController" as Controller
|
||||
participant "DiscussionSuggestionService" as Service
|
||||
participant "LLMClient" as LLM
|
||||
participant "SuggestionRepository" as Repo
|
||||
participant "TranscriptRepository" as TranscriptRepo
|
||||
database "Azure OpenAI<<E>>" as OpenAI
|
||||
database "Redis Cache<<E>>" as Cache
|
||||
database "PostgreSQL<<E>>" as DB
|
||||
|
||||
== 실시간 논의사항 제안 요청 ==
|
||||
|
||||
note over Controller
|
||||
TranscriptService로부터 호출
|
||||
또는 API 직접 호출:
|
||||
POST /api/ai/suggestions/discussion
|
||||
Body: {
|
||||
"meetingId": "{meetingId}",
|
||||
"transcriptText": "최근 대화 내용"
|
||||
}
|
||||
(회의록 자동작성 프로세스 내부)
|
||||
end note
|
||||
|
||||
Controller -> Service: suggestDiscussionTopics(meetingId, transcriptText)
|
||||
@@ -139,42 +134,30 @@ loop 각 제안마다
|
||||
- 생성 시각
|
||||
- 제안 신뢰도 점수
|
||||
- 회의 진행 시점 (분)
|
||||
- 상태: PENDING
|
||||
- 고유 ID (UUID)
|
||||
end note
|
||||
|
||||
end
|
||||
|
||||
== 제안 저장 ==
|
||||
== 임시 캐시 저장 (선택적) ==
|
||||
|
||||
loop 각 검증된 제안마다
|
||||
Service -> Cache: SET suggestions:discussion:{meetingId}
|
||||
activate Cache
|
||||
note right
|
||||
Redis에 임시 저장:
|
||||
- Key: suggestions:discussion:{meetingId}
|
||||
- Value: JSON array (제안 목록)
|
||||
- TTL: 2시간 (회의 시간)
|
||||
|
||||
Service -> Repo: saveSuggestion(meetingId, suggestion)
|
||||
activate Repo
|
||||
목적:
|
||||
- 재접속 시 복원용
|
||||
- WebSocket 재연결 대응
|
||||
end note
|
||||
|
||||
Repo -> DB: INSERT INTO ai_suggestions
|
||||
activate DB
|
||||
note right
|
||||
저장 데이터:
|
||||
- meeting_id
|
||||
- suggestion_type: 'DISCUSSION'
|
||||
- content: {topic, reason}
|
||||
- priority: HIGH/MEDIUM/LOW
|
||||
- related_agenda: "안건 항목"
|
||||
- estimated_time: 예상 시간
|
||||
- confidence_score: 0.0-1.0
|
||||
- status: PENDING
|
||||
- created_at
|
||||
end note
|
||||
Cache --> Service: 저장 완료
|
||||
deactivate Cache
|
||||
|
||||
DB --> Repo: suggestionId
|
||||
deactivate DB
|
||||
|
||||
Repo --> Service: suggestionId
|
||||
deactivate Repo
|
||||
|
||||
end
|
||||
|
||||
== 응답 구성 ==
|
||||
== 응답 반환 ==
|
||||
|
||||
Service -> Service: 응답 데이터 구성
|
||||
note right
|
||||
@@ -187,20 +170,22 @@ note right
|
||||
"reason": "제안 이유",
|
||||
"priority": "HIGH",
|
||||
"relatedAgenda": "관련 안건",
|
||||
"estimatedTime": 10,
|
||||
"canApply": true
|
||||
"estimatedTime": 10
|
||||
}
|
||||
],
|
||||
"totalCount": 제안 개수,
|
||||
"displayHint": "오른쪽 탭에 표시"
|
||||
"timestamp": "생성 시각"
|
||||
}
|
||||
end note
|
||||
|
||||
Service --> Controller: 논의사항 제안 생성 완료
|
||||
Service --> Controller: 논의사항 제안 목록
|
||||
deactivate Service
|
||||
|
||||
Controller --> Controller: 200 OK 응답 반환
|
||||
Controller --> Controller: 이벤트 데이터에 포함하여 반환
|
||||
note right
|
||||
TranscriptSummaryCreated 이벤트에
|
||||
discussionSuggestions 필드로 포함
|
||||
|
||||
프론트엔드 처리:
|
||||
- 오른쪽 "추천" 탭에 표시
|
||||
- "적용" 버튼 활성화
|
||||
@@ -214,48 +199,33 @@ end note
|
||||
|
||||
note over Controller
|
||||
사용자가 "적용" 버튼 클릭 시:
|
||||
PUT /api/ai/suggestions/{suggestionId}/apply
|
||||
end note
|
||||
프론트엔드에서 직접 Meeting Service 호출
|
||||
|
||||
Controller -> Service: applySuggestion(suggestionId, meetingId)
|
||||
activate Service
|
||||
PUT /api/meetings/{meetingId}/transcript
|
||||
Body: {
|
||||
"addDiscussionSection": {
|
||||
"topic": "논의 주제",
|
||||
"content": ""
|
||||
}
|
||||
}
|
||||
|
||||
Service -> Repo: updateSuggestionStatus(suggestionId, "APPLIED")
|
||||
activate Repo
|
||||
|
||||
Repo -> DB: UPDATE ai_suggestions\nSET status = 'APPLIED',\napplied_at = NOW()
|
||||
activate DB
|
||||
|
||||
DB --> Repo: 업데이트 완료
|
||||
deactivate DB
|
||||
|
||||
Repo --> Service: 완료
|
||||
deactivate Repo
|
||||
|
||||
Service -> Service: 논의사항을 회의록에 추가하는 로직 실행
|
||||
note right
|
||||
Meeting Service에 API 호출하여
|
||||
Meeting Service에서 회의록에
|
||||
새로운 논의 섹션 추가
|
||||
end note
|
||||
|
||||
Service --> Controller: 적용 완료
|
||||
deactivate Service
|
||||
|
||||
Controller --> Controller: 200 OK
|
||||
|
||||
note over Controller, DB
|
||||
처리 시간:
|
||||
- 맥락 정보 조회: 100-200ms
|
||||
- LLM 제안 생성: 2-3초
|
||||
- 검증 및 필터링: 100-200ms
|
||||
- 저장 처리: 200-300ms
|
||||
총 처리 시간: 약 3-4초
|
||||
- 캐시 저장: 50-100ms
|
||||
총 처리 시간: 약 2.5-3.5초
|
||||
|
||||
제안 정책:
|
||||
- 최대 5개까지만 제안
|
||||
- 우선순위 HIGH가 1개 이상
|
||||
- 이미 논의한 주제는 제외
|
||||
- 제안은 회의 중 언제든 생성 가능
|
||||
특징:
|
||||
- DB 영구 저장 없음 (임시 데이터)
|
||||
- Redis 캐시만 활용 (재접속 복원용)
|
||||
- 프론트엔드 메모리에서 관리
|
||||
- "적용" 시에만 회의록에 반영
|
||||
end note
|
||||
|
||||
@enduml
|
||||
|
||||
Reference in New Issue
Block a user