Files
roadwave/docs/domains/recommendation/entities/modele-recommandation.md

2.1 KiB

Modèle de données - Recommandation

📖 Voir Règles métier - Section 03 : Centres d'intérêt | Section 04 : Algorithme | Entités globales

Diagramme

erDiagram
    USER_INTERESTS }o--|| USERS : "préférences"
    USER_INTERESTS }o--|| INTEREST_CATEGORIES : "catégorie"

    LISTENING_HISTORY }o--|| USERS : "historique"
    LISTENING_HISTORY }o--|| CONTENTS : "écoute"
    LISTENING_HISTORY }o--|| USERS : "créateur"

    INTEREST_CATEGORIES {
        uuid id PK
        string name UK
        string slug UK
        string icon
        int sort_order
        boolean is_active
    }

    USER_INTERESTS {
        uuid id PK
        uuid user_id FK
        uuid category_id FK
        decimal gauge_value
        timestamp last_updated
        int update_count
    }

    LISTENING_HISTORY {
        uuid id PK
        uuid user_id FK
        uuid content_id FK
        uuid creator_id FK
        boolean is_subscribed
        decimal completion_rate
        int last_position_seconds
        string source
        boolean auto_like
        timestamp listened_at
    }

Légende

Entités recommandation :

  • INTEREST_CATEGORIES : Catégories centres d'intérêt - Liste : Automobile, Voyage, Famille, Amour, Musique, Économie, Cryptomonnaie, Politique, Culture, Sport, Technologie, Santé - Extensible dynamiquement
  • USER_INTERESTS : Jauges utilisateur par catégorie - Valeur 0-100% (init 50% à l'inscription) - Évolution : Like auto renforcé (+2%), Like auto standard (+1%), Like manuel (+2%), Abonnement créateur (+5% sur tous ses tags), Skip rapide non-abonné (-0.5%) - Calcul temps réel à chaque action - Pas de dégradation temporelle automatique
  • LISTENING_HISTORY : Historique écoutes - Source : recommendation, search, direct_link, profile, history, live_notification, audio_guide - Completion_rate : 0.0-1.0 (≥0.8 = écoute complète) - Auto_like : true si like automatique déclenché (≥30% écoute) - Is_subscribed : snapshot au moment de l'écoute (pour calcul engagement)