Designing a Recommendation Architecture for Mixed Long and Short Video Feeds
This article breaks down the architecture behind a home-feed recommendation system that blends long-form videos, short clips, animation series, and livestreams into a single stream. It explains why a mixed feed cannot be ranked by click-through rate alone, then walks through the full pipeline: multimodal content understanding and tagging, multi-channel recall, multi-stage ranking with multi-objective value modeling, context-aware re-ranking, real-time features, and the engineering safeguards—latency budgets, degradation, and observability—that keep it running. It also covers offline and online evaluation, ecosystem and compliance considerations, and a phased rollout path with common pitfalls to avoid. Recommendation engineers, ML practitioners, and platform architects will find concrete models, formulas, and code snippets for handling heterogeneous content types, differing content lifecycles, and the tension between short-term engagement and long-term ecosystem health.
1. Background: Why the Home Feed Needs “Mixed” Recommendation
Open a mature video platform and the home page is rarely a single, uniform content list. Instead, it interleaves several content types:
- Mid- and long-form video: explainers, in-depth film analysis, gadget reviews—anywhere from a few minutes to nearly an hour.
- Original animation and animated series: low release frequency, high per-episode production cost, and audiences eager to follow updates.
- Short-form content: clips and casual captures, usually a few tens of seconds, with high instantaneous click-through.
- Livestreams: live or just ended, with value that shifts quickly as online viewership rises and falls.
A typical home feed reflects exactly this: a nearly 50-minute explainer, a 40-second short clip, a freshly updated animation episode, and a room flagged as Live all appear on the same page. This kind of mixed feed is the canonical form of a home recommendation system. It must serve users with very different preferences on one page, distributing content whose format, duration, and mode of consumption differ sharply. This article uses that setting as its backdrop to unpack the architecture and engineering practices behind such systems.
1.1 The core challenge: format differences
| Content type | Typical duration | Consumption pattern | Ranking emphasis |
|---|---|---|---|
| In-depth explainer / film analysis (long video) | 10–50 min | Long viewing sessions; fast drop-off in the first few minutes | Watch time, completion rate, positive engagement |
| Original animation / animated series | A few min to ~20+ min | Update-driven; stable back catalog | Follow/update status, release schedule, viewing continuity |
| Short video / clips | A few tens of seconds to a few min | Fast click, then a quick decision to stay or swipe away | Effective plays, engagement rate, author and topic diversity |
| Livestream | Long, real-time | Heavily influenced by whether the host is live and by online popularity | Real-time hotness, preference match, timeliness |
From this we can distill four core challenges:
- Inconsistent value definitions. Click-through rate only measures “will the user tap in?” A long video’s value comes mainly from watch time, a short clip’s from completion and engagement, and a livestream’s from real-time hotness and match. Rank by a single metric and the system systematically favors short content with clickbait titles but poor retention.
- Very different lifecycles. A running animation series can be consumed steadily by “follow-the-episode” viewers for a long time; a film-commentary video concentrates its heat in the first few days after release; a livestream’s value can complete an entire rise-to-decline cycle within an hour.
- Dual supply-and-demand constraints. There are only so many head items, so popular creators and topics get over-exposed and create filter bubbles. New creators and new content lack behavioral data and fall into a “no exposure → no data → even less exposure” trap.
- Format fairness and ecosystem health. In-depth explainers and original animation cost far more to produce than short content. If distribution efficiency is reduced to click-through rate alone, top long-form creators lose motivation, and the long-term health of the content ecosystem is hard to guarantee.
1.2 Goals and metrics
A recommendation system’s objective should be derived from business goals, not fixed on click-through rate. For a content platform centered on user watch time and consumption, I recommend a three-tier metric system:
- North-star metrics: average daily watch time per user; day-1/day-7 retention. These directly reflect user value.
- Process metrics: plays per user, average completion rate, engagement rates (like/comment/save/share), follow-conversion rate, and negative-feedback rate (“not interested,” reports, quick-swipe-away ratio).
- Ecosystem metrics: the share of a new creator’s first-week content that earns effective exposure; the watch-time split between long-form and short content; the distribution structure across content types; and duplicate-content exposure rate.
The distribution structure deserves particular attention. For example, if overall watch time per user rises but the long-video share and creator-side publishing keep falling, the system is “borrowing against” the content ecosystem, and that kind of growth is usually unsustainable.
2. Overall Architecture: Four Layers Working Together
Home-feed recommendation typically uses a three-stage “offline + near-line + online” architecture, divided into four layers:
- Data layer (offline): Collect user-behavior logs—exposure, clicks, plays, engagement, follows, negative feedback; handle content ingestion, parsing, and understanding; build user profiles and model samples; train recall and ranking models. The core outputs are features, samples, and models.
- Near-line layer (real-time): Consume the behavior-log stream to update a user’s short-term interests, real-time content hotness, and live start/stop status in near real time; a stream-processing engine produces real-time features and writes them to online feature storage.
- Online serving layer: Each request flows through recall, pre-ranking, ranking, and re-ranking/mixing, finally producing the home feed.
- Platform support layer: Content moderation and safety, the feature platform, the experimentation platform (A/B testing), and monitoring/alerting and logging services—spanning all of the above.
From a data-flow perspective, the full loop looks like this:
- Forward path: content ingested → content understanding and tagging → index built → user request triggers multi-channel recall → multi-stage ranking and re-ranking → feed returned → exposure and behavior logs flow back.
- Feedback path: behavior logs land in the offline data warehouse to generate samples, train models, and ship them to production; the same logs are also consumed by the real-time pipeline to update real-time features and hotness.
On the engineering side, files and log data can be archived in cloud object storage; the real-time path can rely on a message queue and a stream-processing engine; online services can run on a container platform; and observability is provided by a unified logging and monitoring/alerting system. The rest of this article follows the order content → recall → ranking → re-ranking → safeguards.
3. Content Understanding and the Tag System: The Foundation of Recommendation
3.1 Why we first need to “read” content
Real feeds are full of titles like these:
- A question-style title such as “What are the signs that a person has finally woken up to life?”—carrying opinion and emotional resonance rather than concrete keywords.
- A title such as “After I started doing CG, I realized what a monster the Type 055 really is”—packed with niche jargon and an insider abbreviation (“055”) that keyword matching won’t connect to modeling or CG content.
- A lifestyle vlog title such as “Funeral vlog / my coffin couldn’t possibly be this cute~”—mixing everyday recording with exaggerated rhetoric, plus kaomoji and tildes.
These titles are colloquial and abstract, and their keywords often don’t map directly to the underlying topic. With only tokenization and keyword matching, the system can’t tell that a phrase corresponds to a knowledge-category topic, or connect a bare code like “055” to modeling content. That is why the foundation of recommendation is multimodal content understanding.
3.2 Multimodal content understanding
- Text understanding:
- Title tokenization, entity recognition, and keyword extraction;
- Pretrained language models that generate sentence embeddings for semantic similarity and vector recall;
- Detection of exaggerated or clickbait titles, used as a quality signal.
- Speech understanding:
- Audio from long videos and animated series is transcribed into subtitle text;
- Transcripts feed topic classification, knowledge-point extraction, and search.
- Visual understanding:
- Keyframe extraction, subject detection, and quality assessment from cover images;
- Long videos are split at shot changes, then image recognition and OCR of on-screen text generate clip-level tags.
- Multimodal fusion:
- Title, cover, speech text, and keyframes are fed into a multimodal model to produce a unified content vector;
- That vector is used for both semantic recall and near-duplicate removal.
3.3 Tag system and item attributes
I recommend a three-tier tag design:
- Tier-1 categories: aligned with the channel structure, such as animation, film & TV, knowledge, gaming, lifestyle, and so on.
- Tier-2 categories and tags: within a tier-1 category, subdivide by subject, format (explainer, remix, Vlog, original animation), emotional tone (relaxing, tense, moving), and so on.
- Object-level tags: the series a piece belongs to, creator tags, and serialized-content markers (used to aggregate and spread out content from the same series or creator).
Each item should also carry a set of structured attributes:
content_type: long video / short video / original animation / animated series / livestream;duration: length, which directly affects watch-time modeling and quota allocation;publish_time: publication time, used for timeliness weighting;author_id/series_id: creator and series identifiers;quality_score: a quality score;audit_status: moderation status.
This attribute set is the shared vocabulary across recall, ranking, and re-ranking.
3.4 Quality score and content safety
Content safety is a precondition for recommendation. The basic principle is that everything in the recommendation pool must have already passed moderation.
- UGC content: typically “review before publish,” combining machine moderation with human review.
- Livestreams: “publish first, then patrol”—using keyframe sampling, speech recognition, and danmaku (bullet-comment) text detection to catch violations and quickly cut the stream or ban the room.
- Result management: when content is taken down, it must be removed from both the online index and caches, so “already-removed” content isn’t still recommended.
- Quality score: computed from completion rate, engagement rate, negative-feedback rate, report rate, and copyright status, then used to filter in recall and down-rank in ranking to suppress low-quality content.
4. Recall: Multiple Complementary Channels
Recall sits at the top of the funnel. Its goal is to “quickly pull candidates the user might be interested in from a massive library”—usually selecting a few thousand from tens of millions or more. No single recall channel can cover personalization, timeliness, ecosystem health, and exploration at once, so multi-channel recall is standard practice.
4.1 Recall channel design
- Hotness / recency recall:
- A near-line hotness board supplies high-heat content;
- Filtered by publish time and the categories the user prefers, so hot items are neither stale nor absent.
- Personalized recall:
- Behavioral collaborative filtering (i2i): content similarity from “co-watch / co-engage” relationships, e.g., “people who watched this long video also watched…”;
- Vector recall (u2i): a two-tower model encodes users and items separately, and nearest-neighbor vector search finds matches;
- Tag recall: content recalled from the category and tag preferences in the user profile.
- Follow / update recall: recall the latest episodes for creators the user follows and series they track.
- New-content / cold-start recall:
- Find similar-interest users via content vectors;
- Exploration traffic packages;
- Editorially assigned resource slots.
- Real-time livestream recall: pick live rooms with high real-time hotness that match the user’s preferences.
- Negative-feedback filtering and dedup: filter out blocked creators and categories the user is explicitly uninterested in, plus content recently shown that drew no positive response.
4.2 Content hotness modeling
Hotness must reflect both engagement intensity and timeliness. A simple, interpretable form is:
hot(i, t) = Σ_k w_k · a_k(i) · exp(-λ_k · (t - t_k(i)))
a_k(i): the k-th engagement count for item i (plays, likes, comments, saves, shares, and so on);w_k: the weight of that engagement signal, capturing how differently behaviors contribute to value;λ_k: the decay coefficient for the k-th signal—the more instantaneous the behavior, the faster it decays.
Real-time hotness can be computed on a rolling fixed window (say, 5–15 minutes) and written to an in-memory cache for online lookup. Livestream hotness should additionally combine concurrent viewers, time on air, and the recent growth rate of engagement; rooms whose hotness keeps declining gradually drop out of recall.
4.3 Merging multiple recall channels (example code)
# Every recall channel outputs (item_id, source, base_score, reason)def multi_recall(user, ctx, quota):results = {}for source, recaller in [("hot", hot_recaller), # hotness / recency("u2i", vector_recaller), # user-to-item vectors("i2i", collaborative_recaller), # behavioral collaborative filtering("follow", follow_recaller), # followed creators / tracked series("explore", coldstart_recaller), # new-content exploration("live", live_recaller), # livestreams]:for item in recaller(user, ctx, quota[source]):# drop anything blocked by audit status, blacklists, or explicit negative feedbackif not is_eligible(item, user):continue# an item may be hit by several channels; keep the highest-scoring source as the reasonprev = results.get(item.id)if prev is None or item.base_score > prev.base_score:results[item.id] = itemreturn list(results.values())
4.4 New-content cold start
Freshly published content has no behavioral data, so relying on collaborative signals alone leaves it almost impossible to recall. An “exploration traffic + fast feedback” mechanism works well:
- Assign an initial exposure package based on the content’s category and the creator’s historical performance;
- The first wave of feedback after publishing decides whether the item enters an “acceleration pool” or the “regular pool”;
- Items in the acceleration pool get more exposure to similar users in the short term, gradually accumulating samples.
When evaluating new-content effectiveness, look at “the number of users who got an effective play within N hours of publishing” and “the share that graduated into the regular traffic pool”—not just the few breakout hits at the top.
5. Ranking: A Multi-Stage Funnel with Multi-Objective Fusion
5.1 Why multiple stages
A precision ranking model typically has millions or more feature dimensions. Running complex inference item by item over a few thousand candidates can’t meet the sub-second response requirement of a home feed. So the industry uses a funnel:
- Recall: multiple channels in parallel, outputting a few thousand candidates;
- Pre-ranking: a lightweight model compresses the candidates to a few hundred, reducing the load on ranking;
- Ranking: a multi-objective model scores finely;
- Re-ranking: context-aware diversity control and business intervention.
The objective functions across stages should stay as consistent as possible, avoiding goal drift where “pre-ranking picks A, ranking puts B on top, and re-ranking shuffles in C.”
5.2 Ranking: multi-objective modeling
Ranking can be split into several sub-tasks:
- Click-through rate (pCTR);
- Effective-play rate: the share that starts playing and passes an effective-duration threshold (for long video, commonly “play ≥ N seconds after start”; for short video, “completion or watched-percentage above a threshold”);
- Expected watch time;
- Completion / watched-percentage;
- Engagement rate (a blend of like, comment, save, share);
- Follow-conversion rate.
There are two common engineering approaches:
- Shared base + multi-task heads: share the lower-level features and network, model each objective on top, and ease the data imbalance between long video (many samples) and livestreams (few samples);
- Per-type sub-models + unified scoring: model each content type separately, then calibrate their scores onto a single value scale for comparison.
5.3 From “predicted probability” to “content value”
The ranking goal isn’t to maximize any single probability, but to maximize the expected value per exposure. A general value function is:
Value(i | u) = w1 · pCTR+ w2 · E[WatchTime]+ w3 · pEngage+ w4 · pFollow- w5 · pNegative
Here pNegative is the probability of user negative feedback, and w1..w5 are set through online experiments or constrained optimization. The function can be configured per content type:
- Long video emphasizes
E[WatchTime]and completion; - Short video emphasizes effective-play rate, engagement, and diversity;
- Livestream centers on real-time hotness and how well it matches the user’s historical watch time.
For a 37-second clip, even a high click-through rate caps how much watch time it can generate; a nearly 50-minute long video, even with an ordinary click-through rate, can still deliver more total value if the user stays long enough. This is precisely why mixing must be ranked by a value function rather than by click-through rate.
5.4 Expected watch-time modeling (example code)
import mathdef expected_watch_seconds(p_enter, p_stay, stay_sec, duration):"""p_enter: probability the item actually starts playing after a clickp_stay: probability of staying past the short-duration threshold after startstay_sec: expected stay time in seconds once the threshold is metduration: item duration in seconds"""e_sec = p_enter * (p_stay * stay_sec + (1 - p_stay) * SHORT_STAY_SEC)# completed items have no extra long-tail dwell, so cap the stay timereturn min(e_sec, duration)def value_score(pred, weights, content_type):cfg = weights[content_type] # different content types use different weight configse_watch = expected_watch_seconds(pred["p_enter"], pred["p_stay"], pred["stay_sec"], pred["duration"])score = (cfg["w_click"] * pred["p_click"]+ cfg["w_watch"] * (e_watch / cfg["norm_sec"]) # normalize so magnitude doesn't swamp the click term+ cfg["w_engage"]* pred["p_engage"]+ cfg["w_follow"]* pred["p_follow"]- cfg["w_neg"] * pred["p_negative"])return score, e_watch
In practice, the watch-time objective is often handled with a log transform to tame its long-tailed distribution, or modeled under a survival-analysis framework that treats “not-yet-completed / right-censored” samples properly. A full implementation needs to line up sample handling, feature engineering, and calibration; the snippet only shows the core idea.
6. Re-Ranking: Where Mixing Actually Happens
Ranking outputs a scored sequence of individual items, but what users actually experience is the combination of items on a whole screen. Re-ranking answers the question: how should these items be combined in one list to be best?
6.1 Context-aware re-ranking
Use a list-wise model that takes ranking’s top-N items and their features as a whole, and predicts “the value of a user interacting with this list in this context”—for example, overall click probability or expected total watch time for the list. A list-wise model captures effects a pointwise model can’t see, such as “several similar items in a row cannibalizing each other’s clicks.”
6.2 Diversity and spacing
Apply quota constraints on author, series, category, and content type to prevent one creator or one series from occupying several consecutive slots:
def rerank_with_constraints(items, top_n, author_cap=1, series_cap=2,type_caps=None, live_positions=None):result, stat = [], {}type_caps = type_caps or {}live_idx = 0for pos in range(top_n):for it in items:if it in result:continues = stat.setdefault(it.author_id, {"author": 0, "series": {}, "type": {}})if s["author"] >= author_cap:continueif s["series"].get(it.series_id, 0) >= series_cap:continuecap = type_caps.get(it.content_type)if cap is not None and s["type"].get(it.content_type, 0) >= cap:continue# livestreams are only inserted at preset positions so they don't hurt the first-screen experienceif it.content_type == "live" and (live_positions is None or live_idx >= len(live_positions)or pos != live_positions[live_idx]):continueresult.append(it)s["author"] += 1s["series"][it.series_id] = s["series"].get(it.series_id, 0) + 1s["type"][it.content_type] = s["type"].get(it.content_type, 0) + 1if it.content_type == "live":live_idx += 1breakreturn result
6.3 Handling already-watched content
Already-watched content doesn’t always have to be filtered out:
- In-depth explainers and film analysis (knowledge-type): re-watchable, so good for long-tail supplementation;
- Short videos and entertainment content: repeated exposure has low marginal return, so down-rank or filter;
- Animated series: already-watched items can improve the follow-the-episode experience via a “jump to watch progress” feature, but shouldn’t be pushed repeatedly to users who aren’t following the series yet.
6.4 Livestream insertion strategy
Livestreams in a mixed feed follow a “predictable, identifiable” principle:
- Predictable position: fixed or rule-based insertion, e.g., at most one per screen and never in the first few positions;
- Identifiable style: clearly distinguished from recorded content with elements like real-time hotness and live status;
- Frequency capping: cap daily exposures per user to avoid over-interruption.
7. The Real-Time Path: Letting Recommendation “Sense the Present”
7.1 Real-time features
Offline profiles describe a user’s long-term preferences; real-time features capture the “right now” state, which mixed feeds rely on especially heavily:
- User side: the content types and categories from the last N plays, recently engaged creators, recently negatively-reviewed categories, and the current request context (time, network environment, entry source);
- Content side: minute-level / hour-level play growth and real-time engagement;
- Livestream side: time on air, changes in concurrent viewers, and the recent engagement growth rate.
7.2 The data pipeline
Client/server-side instrumentation→ Log collection (message queue)→ Stream-processing engine (windowed aggregation, behavior-sequence assembly)→ Online feature store (KV / columnar storage)→ Online service reads features and feeds them into the ranking model
7.3 Feature consistency
The most common engineering problem with real-time features is a mismatch between training and serving—training/serving skew. Common causes include:
- Different window definitions (offline by day, online by minute);
- Different default values for missing features;
- Inconsistent timestamp time zones or units.
In practice, manage the offline and real-time computation logic with a single, unified feature definition, and take feature snapshots on live requests. When a problem appears, the snapshot lets you reconstruct the ranking process at that moment.
7.4 Real-time user behavior sequence (example)
{"user_id": "u_10086","request_time": "2026-03-01T20:15:00+08:00","recent_events": [{"item_id": "v_20001", "type": "long_video", "category": "movies", "watch_ratio": 0.62, "action": "play", "ts": "20:06"},{"item_id": "v_30007", "type": "short_video", "category": "lifestyle", "watch_ratio": 0.08, "action": "quick_quit", "ts": "20:09"},{"item_id": "v_40012", "type": "animation", "category": "animation", "watch_ratio": 1.00, "action": "like", "ts": "20:13"}],"realtime_prefs": {"category_1h": {"movies": 0.45, "animation": 0.35, "lifestyle": 0.05},"content_type_1h": {"long_video": 0.6, "animation": 0.4}}}
8. Engineering Safeguards: Performance, Degradation, and Observability
8.1 Performance budget
A home-feed request usually has a hundred-millisecond-scale overall timeout, so each stage needs a budget, for example:
- Recall: 20–40 ms, running channels in parallel;
- Pre-ranking: 15–25 ms;
- Ranking: 30–50 ms;
- Re-ranking and assembly: 10–20 ms.
Adjust each stage’s budget based on actual load testing. Also keep in mind:
- Multi-level caching: store user profiles, item attributes, and hotness boards across local and distributed caches;
- Async parallelism: run recall channels in parallel when they don’t depend on each other;
- Timeout circuit-breaking: automatically skip a channel that times out, without affecting the whole request.
8.2 Degradation strategies
- Dependency failure: when the recall service is unavailable, fall back to the hotness board;
- Model timeout: degrade the ranking service to the last stable model or a rule-based policy;
- Cold-start fallback: with no personalized data, use category hotness plus editorial picks;
- Index failure: switch to a backup index or a read-only snapshot.
Degradation plans should be drilled regularly, with cloud monitoring continuously tracking error rates and latency percentiles.
8.3 Observability
I recommend emitting a full decision log for every request, containing at least: the request ID, candidate sources and per-channel recall counts, per-stage scores, final exposure positions, model version, and experiment bucket. Decision logs help answer “why did the user see this item,” and they are the basis for offline training and effect attribution—usable together with a logging service for search and alerting.
9. Experimentation and Evaluation: Driving Iteration with a Data Loop
9.1 Offline evaluation
- Recall: hit rate, coverage, diversity;
- Ranking: AUC, grouped AUC (GAUC—weighted after grouping by user, closer to real personalization), and duration-regression error;
- Re-ranking: offline replay combined with simulation.
Offline gains don’t equal online gains, so offline evaluation is mainly for quickly screening candidate approaches.
9.2 Online A/B experiments
- Traffic splitting: bucket at the user level so each user’s experience stays consistent; use layered experiments to keep traffic from interfering with each other;
- Metrics: watch core metrics (watch time per user, day-1 retention) alongside guardrail metrics (negative-feedback rate, creator-side exposure distribution, latency, error rate);
- Duration: short content can be observed in a few days, while long video and animated series have long consumption cycles and need longer observation windows.
9.3 Ecosystem evaluation
Analyzing watch-time contribution and creator-side impact separately by content type avoids the top-line metric hiding structural problems.
10. The Safety and Compliance Baseline
In a content platform, the recommendation system directly decides “what gets seen,” so compliance is a non-negotiable baseline:
- Content safety: everything in the candidate pool must have passed moderation; livestreams and interactive text need real-time patrol capability.
- Minor protection: a robust teen mode, isolated separately in the content pool and recommendation policy, so unsuitable content never reaches them.
- Privacy compliance: desensitize user identifiers, encrypt sensitive data at rest, and follow the minimum-necessary principle when collecting and using personal information.
- Copyright governance: build copyright recognition and license-verification mechanisms for film commentary, animation derivative works, and similar content, and take infringing content down promptly.
11. Rollout Roadmap and Common Pitfalls
11.1 Phased rollout
- Starter phase: category hotness board + follow/update recall + rule-based spreading, with basic instrumentation and moderation integration.
- Growth phase: introduce multi-channel recall and pre-ranking/ranking, ship the first ranking model, and stand up an A/B experimentation system.
- Mature phase: multi-objective value function + context-aware re-ranking + real-time features, with ecosystem metrics and cold-start mechanisms in place.
- Intelligent phase: introduce generative content understanding and finer-grained exploration strategies, pushing for jointly optimized distribution fairness and content quality.
11.2 Common pitfalls
- Click-through-rate absolutism: leads to a flood of clickbait and squeezes out long content.
- Ignoring training/serving consistency: great offline metrics, poor online results.
- Optimizing only user metrics: neglecting the creator ecosystem and shrinking content supply.
- Copying a single-format platform’s playbook: real-time content like livestreams needs its own timeliness pipeline and can’t share the same hotness system as recorded content.
Conclusion
A home feed that mixes long and short video, animated series, and livestreams is, at its core, a complex system that is multi-objective, multi-format, and strongly real-time. The difficulty isn’t in how complex any single model is, but in whether a unified framework can honor each content type’s value definition, lifecycle, and ecosystem health at once. From content understanding to multi-channel recall, from multi-objective ranking to context-aware re-ranking, and on to real-time features and solid engineering safeguards, every layer is an inseparable part of the whole. Only by iterating continuously with a data loop and calibrating direction with ecosystem metrics can a recommendation system improve the user experience while giving high-quality content the room it deserves to grow.
