From 4e56f0f097b5c157ffe5420976cc99a9e3bc4613 Mon Sep 17 00:00:00 2001 From: t0xa Date: Tue, 10 Feb 2026 09:44:09 +0300 Subject: [PATCH] Add some work schemes --- ivideon/2026_sprints.puml | 25 ----- ivideon/Gantt/2026_sprints.puml | 46 +++++++++ .../sprint_2.puml} | 60 +++++++++--- ivideon/Gantt/sprint_3.puml | 30 ++++++ ivideon/faq_с_Лешей.puml | 0 .../puml/analytics/camera_worker_stream.puml | 70 +++++++++++++ ivideon/puml/arch/AN_user_registration.puml | 97 +++++++++++++++++++ 7 files changed, 292 insertions(+), 36 deletions(-) delete mode 100644 ivideon/2026_sprints.puml create mode 100644 ivideon/Gantt/2026_sprints.puml rename ivideon/{puml/faces/report_creation.puml => Gantt/sprint_2.puml} (50%) create mode 100644 ivideon/Gantt/sprint_3.puml delete mode 100644 ivideon/faq_с_Лешей.puml create mode 100644 ivideon/puml/analytics/camera_worker_stream.puml create mode 100644 ivideon/puml/arch/AN_user_registration.puml diff --git a/ivideon/2026_sprints.puml b/ivideon/2026_sprints.puml deleted file mode 100644 index db5ee27..0000000 --- a/ivideon/2026_sprints.puml +++ /dev/null @@ -1,25 +0,0 @@ -@startgantt -printscale weekly zoom 2 -Project starts the 1st of january 2026 -[Канинкулы] starts 2026-01-01 -[Канинкулы] requires 11 days - -[Sprint-1] starts 2026-01-12 -[Sprint-1] requires 14 days -[Support-1] starts 2026-01-12 -[Support-1] requires 14 days -[Support-1] is colored in LightGreen - -[Sprint-2] starts 2026-01-26 -[Sprint-2] requires 14 days -[API-9487] starts 2026-01-26 -[API-9487] requires 14 days -[API-9487] is colored in LightGreen -[API-9488] starts 2026-01-26 -[API-9488] requires 14 days -[API-9488] is colored in Cyan -[API-9489] starts 2026-01-26 -[API-9489] requires 14 days -[API-9489] is colored in LightGray - -@endgantt \ No newline at end of file diff --git a/ivideon/Gantt/2026_sprints.puml b/ivideon/Gantt/2026_sprints.puml new file mode 100644 index 0000000..16f9c3e --- /dev/null +++ b/ivideon/Gantt/2026_sprints.puml @@ -0,0 +1,46 @@ +@startgantt +printscale weekly zoom 2 +Project starts the 1st of january 2026 +[Каникулы] starts 2026-01-01 +[Каникулы] requires 11 days + +[Sprint-1] displays on same row as [Каникулы] +[Sprint-1] starts 2026-01-12 +[Sprint-1] requires 14 days +[Sprint-2] displays on same row as [Sprint-1] +[Sprint-2] starts 2026-01-26 +[Sprint-2] requires 14 days +[Sprint-3] displays on same row as [Sprint-2] +[Sprint-3] starts 2026-02-09 +[Sprint-3] requires 14 days + +[Support-1] starts 2026-01-12 +[Support-1] requires 14 days +[Support-1] is colored in LightGreen + +[API-9487] starts 2026-01-26 +[API-9487] requires 14 days +[API-9487] is colored in LightGreen + +[API-9488] starts 2026-01-26 +[API-9488] requires 14 days +[API-9488] is colored in LightGreen + +[API-9489] starts 2026-01-26 +[API-9489] requires 14 days +[API-9489] is colored in LightGray +[API-9489 II] starts 2026-02-09 +[API-9489 II] displays on same row as [API-9489] +[API-9489 II] requires 14 days +[API-9489 II] is colored in LightGray + + +legend +Legend: +|= Color |= Task status | +|<#lightgray> | Not started | +|<#cyan> | In progress | +|<#lightgreen>| Completed | +|<#red> | Declined | +end legend +@endgantt \ No newline at end of file diff --git a/ivideon/puml/faces/report_creation.puml b/ivideon/Gantt/sprint_2.puml similarity index 50% rename from ivideon/puml/faces/report_creation.puml rename to ivideon/Gantt/sprint_2.puml index fabe858..83bc4b0 100644 --- a/ivideon/puml/faces/report_creation.puml +++ b/ivideon/Gantt/sprint_2.puml @@ -1,15 +1,20 @@ @startgantt printscale daily zoom 4 + +!define LIGHTRED #fd26008f + [Sprint 2026-2] requires 14 days Project starts 2026-01-26 --- API-9487 -- +-- ✓ API-9487 -- [Sprint 2026-2] starts 2026-01-26 +[Sprint 2026-3] displays on same row as [Sprint 2026-2] +[Sprint 2026-3] starts 2026-02-09 [Разбор 9487] starts 2026-01-26 [Разбор 9487] is colored in lightgreen [Установка PersonSDK на ноду] requires 1 days -[Установка PersonSDK на ноду] is colored in red +[Установка PersonSDK на ноду] is colored in LIGHTRED [Установка PersonSDK на ноду] starts 2026-01-27 note bottom Из-за несовместимости средств @@ -31,7 +36,10 @@ end note [Докеризация TevianSDK] is colored in lightgreen [Докеризация TevianSDK] requires 1 days --- API-9488 -- +-- ✓ API-9488 -- +[Наргрузочное тестирование ML] starts 2026-02-03 +[Наргрузочное тестирование ML] requires 4 days +[Наргрузочное тестирование ML] is colored in lightgreen [Разбор 9488] starts 2026-02-03 [Разбор 9488] is colored in lightgreen @@ -41,22 +49,52 @@ end note [Докеризация решения ML] is colored in lightgreen [Докеризация решения ML] requires 2 days -[Наргрузочное тестирование ML] starts 2026-02-03 -[Наргрузочное тестирование ML] requires 2 days -[Наргрузочное тестирование ML] is colored in cyan +[Отключение downscale] starts 2026-02-04 +[Отключение downscale] is colored in LIGHTRED +[Отключение downscale] requires 1 days --- API-9489 -- +note bottom +Модель натренирована на изображениях 512х512 +поэтому отключить даунскейл не представляется возможным. +Было принято решение протестировать решения на 512х512 +end note + + +[Сравнительный тест 512х512] starts at [Отключение downscale]'s end +[Сравнительный тест 512х512] starts 2026-02-05 +[Сравнительный тест 512х512] is colored in lightgreen +[Сравнительный тест 512х512] requires 1 days + +[Пареллельный тест Tevian] starts 2026-02-05 +[Пареллельный тест Tevian] is colored in lightgreen +[Пареллельный тест Tevian] requires 2 days + + +[Тест на картинках высокого разрешения] starts 2026-02-06 +[Тест на картинках высокого разрешения] is colored in lightgreen +[Тест на картинках высокого разрешения] requires 1 days + +[Формирование отчета в Confluence] starts 2026-02-09 +[Формирование отчета в Confluence] is colored in lightgreen +[Формирование отчета в Confluence] requires 1 days + +-- ■ API-9489 -- 2026-01-31 to 2026-02-01 are colored LightBlue 2026-02-07 to 2026-02-08 are colored LightBlue -legend +legend left Legend: -|= Color |= Task status | -|<#gray> | Not started | +|= Icon |= Task progress | +| ✓| Completed | +| ⋯| In Progress | +| ■| Not started | + +|= Color |= Subtask status | +|<#lightgrey> | Not started | |<#cyan> | In progress | |<#lightgreen>| Completed | -|<#red> | Declined | +| | Declined | end legend @endgantt diff --git a/ivideon/Gantt/sprint_3.puml b/ivideon/Gantt/sprint_3.puml new file mode 100644 index 0000000..702bec0 --- /dev/null +++ b/ivideon/Gantt/sprint_3.puml @@ -0,0 +1,30 @@ +@startgantt +printscale daily zoom 4 + +!define LIGHTRED #fd26008f + +[Sprint 2026-3] requires 14 days +Project starts 2026-02-09 +-- ▶ API-9489 -- +[Sprint 2026-3] starts 2026-02-09 +[Формирование драфта спеки] starts 2026-02-09 +[Формирование драфта спеки] is colored in cyan +[Формирование драфта спеки] requires 2 days + +' Подсветка выходных +2026-02-14 to 2026-02-15 are colored LightBlue +2026-02-21 to 2026-02-22 are colored LightBlue + +legend left +Legend: +|= Icon |= Task progress | +| ✓| Completed | +| ▶| In Progress | +| ■| Not started | + +|= Color |= Subtask status | +|<#lightgrey> | Not started | +|<#cyan> | In progress | +|<#lightgreen>| Completed | +| | Declined | +end legend \ No newline at end of file diff --git a/ivideon/faq_с_Лешей.puml b/ivideon/faq_с_Лешей.puml deleted file mode 100644 index e69de29..0000000 diff --git a/ivideon/puml/analytics/camera_worker_stream.puml b/ivideon/puml/analytics/camera_worker_stream.puml new file mode 100644 index 0000000..8e63922 --- /dev/null +++ b/ivideon/puml/analytics/camera_worker_stream.puml @@ -0,0 +1,70 @@ +@startuml +title Взаимосвязь Camera -> Stream -> Worker -> VAP + +actor "Система управления\nаналитикой" as System +participant "Camera #42\n(у входа)" as Camera42 +participant "Camera #77\n(у кассы)" as Camera77 +queue "Video Proxy" as Proxy +participant "Worker_1\n(process)" as Worker1 +participant "Worker_2\n(process)" as Worker2 +participant "VAP Instance\n(в Worker_1)" as VAP1 +participant "VAP Instance\n(в Worker_2)" as VAP2 +database "Configs" as Configs + +== Инициализация потоков == + +System -> Worker1: Запустить обработку\nstream_id=42 +activate Worker1 +Worker1 -> VAP1: vap.init_stream(\n stream_id=42,\n lines=[{"y": 100}]\n) +activate VAP1 +VAP1 -> Configs: Сохранить config_42.yaml\n(линия подсчёта y=100) +note right: Конфигурация привязана\nк камере #42, не к Worker_1! + +System -> Worker2: Запустить обработку\nstream_id=77 +activate Worker2 +Worker2 -> VAP2: vap.init_stream(\n stream_id=77,\n zones=[{"x": 50, "y": 200}]\n) +activate VAP2 +VAP2 -> Configs: Сохранить config_77.yaml\n(зона у кассы) + +== Обработка видеопотоков == + +Camera42 -> Proxy: Видеопоток (stream_id=42) +Camera77 -> Proxy: Видеопоток (stream_id=77) + +loop Каждый кадр + Proxy -> Worker1: frame + stream_id=42 + Worker1 -> VAP1: vap.process_frame(frame) + VAP1 -> VAP1: Task(stream_id=42, frame_id=N, ...) + VAP1 --> Worker1: events + Worker1 --> System: События от камеры #42 +end + +loop Каждый кадр + Proxy -> Worker2: frame + stream_id=77 + Worker2 -> VAP2: vap.process_frame(frame) + VAP2 -> VAP2: Task(stream_id=77, frame_id=M, ...) + VAP2 --> Worker2: events + Worker2 --> System: События от камеры #77 +end + +== Worker_1 упал! == + +Worker1 -> Worker1: ❌ CRASH +deactivate VAP1 +deactivate Worker1 + +System -> Worker2: Перенести обработку\nstream_id=42 на Worker_2 +Worker2 -> VAP2: vap2 = new VAP() +activate VAP2 +Worker2 -> VAP2: vap2.init_stream(\n stream_id=42,\n lines=[{"y": 100}]\n) +VAP2 -> Configs: Загрузить config_42.yaml +note right: ТА ЖЕ конфигурация!\nstream_id=42 не изменился,\nизменился только Worker + +loop Обработка продолжается + Proxy -> Worker2: frame + stream_id=42 + Worker2 -> VAP2: vap2.process_frame(frame) + VAP2 --> Worker2: events + Worker2 --> System: События от камеры #42 +end + +@enduml diff --git a/ivideon/puml/arch/AN_user_registration.puml b/ivideon/puml/arch/AN_user_registration.puml new file mode 100644 index 0000000..d427f86 --- /dev/null +++ b/ivideon/puml/arch/AN_user_registration.puml @@ -0,0 +1,97 @@ +@startuml User Registration Flow +skinparam sequenceMessageAlign center +skinparam BoxPadding 10 + +title Процесс регистрации пользователя в Ivideon Cloud + +actor "Клиент\n(Web/Mobile)" as Client +box "API Service (api4)" #LightBlue + participant "OpenUserRegistration\nHandler" as Handler + participant "User.open_registration()" as OpenReg + participant "register_user()" as RegisterUser +end box + +database "MongoDB\n(main)" as MongoDB +database "MongoDB\n(user_registry)" as UserRegistryDB + +box "User Registry Service" #LightGreen + participant "UserRegistry\nService" as URService +end box + +== Регистрация пользователя == + +Client -> Handler: POST /public/registration\n{login, password, partnerId, ...} +activate Handler + +Handler -> OpenReg: open_registration(login, password, ip, ...) +activate OpenReg + +OpenReg -> OpenReg: Определение partner_id,\ngroup_id, currency +OpenReg -> OpenReg: Применение реферальных кодов\nи промо-акций + +OpenReg -> RegisterUser: register_user(login, password, ...) +activate RegisterUser + +== Проверки перед регистрацией == + +RegisterUser -> RegisterUser: Валидация логина (email) +RegisterUser -> MongoDB: Проверка существующего пользователя\nfind_one({'login': login}) +MongoDB --> RegisterUser: existing_user = None + +RegisterUser -> UserRegistryDB: Проверка профиля в UserRegistry\nget_profile_by_login(login) +note right + Проверяется, не зарегистрирован ли + пользователь в другом шарде +end note +UserRegistryDB --> RegisterUser: profile = None + +== Создание пользователя == + +RegisterUser -> RegisterUser: Формирование объекта new_user:\n- login, password (hash)\n- partner_id, group_id\n- currency, country\n- balance = 0\n- registration info (ip, time)\n- account_type +RegisterUser -> RegisterUser: Генерация user_id +RegisterUser -> RegisterUser: Создание root_folder + +RegisterUser -> MongoDB: users.insert_one(new_user) +activate MongoDB +MongoDB --> RegisterUser: OK +deactivate MongoDB + +RegisterUser -> MongoDB: folders.insert_one(root_folder) +activate MongoDB +MongoDB --> RegisterUser: OK +deactivate MongoDB + +note over RegisterUser, MongoDB + В MongoDB (main) записываются: + 1. Запись пользователя в коллекцию "users" + 2. Корневая папка в коллекцию "folders" +end note + +RegisterUser -> RegisterUser: Применение дефолтных сервисов\n(для биллинга v4) +RegisterUser -> RegisterUser: Применение промо-акций\n(если валюта подтверждена) + +RegisterUser --> OpenReg: {user: , report: {...}} +deactivate RegisterUser + +OpenReg -> OpenReg: Обновление статистики реферальных кодов +OpenReg -> OpenReg: Отправка уведомления о регистрации\n(если настроено) + +OpenReg --> Handler: {user, report} +deactivate OpenReg + +Handler --> Client: HTTP 200\n{id, login, registrator_id, ...} +deactivate Handler + +== Опциональная запись в UserRegistry == + +note over URService + UserRegistry НЕ обновляется автоматически + при регистрации. Запись создается через + отдельный внутренний API endpoint: + POST /inner/user_registry/users + + Это может делать другой сервис + для управления шардированием +end note + +@enduml