How Meituan’s “Flow Compass” Turns Massive User Data into Actionable Insights
This article details the design, challenges, and implementation of Meituan’s Flow Compass—a data‑driven product that combines user, scene, and traffic source dimensions using a Kylin‑based warehouse to enable rapid, flexible traffic‑source analysis for hotel‑travel growth.
After the internet entered its "second half," Meituan‑Dianping, the world’s largest lifestyle service platform, possesses a massive pool of active users. To unlock the value of this traffic for hotel‑travel business growth, the team built a tool called “Flow Compass” that aggregates and analyzes traffic sources, user scenes, and product categories.
Background
The goal is to provide a fast, comparative analysis of traffic value, covering flexible segmentation and combination methods to identify growth opportunities for the hotel‑travel line.
Key Questions
Which entry points generate traffic?
How do local vs. non‑local scenarios differ?
Which traffic scenarios suit different product categories?
How can diverse user groups be guided effectively?
Challenges
Numerous dimensions and rich elements lead to exponential data growth; daily UV traffic reaches tens of millions, and query latency must stay ≤3 s (daily) and ≤5 s (monthly).
Scalable dimensions: starting from 12 base dimensions, new normal dimensions, derived dimensions (e.g., city tier), and overlapping elements must be added without altering existing data models.
Flexible entry‑source handling: new entry points in any version must be instantly analyzable.
Time‑dimension aggregation inconsistencies: weekly/monthly queries currently apply daily deduplication logic, causing mismatched metrics.
Solution Approach
To address these issues, the team adopted a layered architecture built on Kylin, emphasizing dimension pruning, modular data pipelines, and unified entry‑source rules.
Prune dimensions before ingestion, keeping only the lowest‑granularity level and reconstructing richer scenes via backend relationship rules.
Layer the data chain to avoid tight coupling and improve extensibility.
Standardize instrumentation rules, abstract them into entry dimensions, and combine with metric calculations.
System Architecture
A layer (ODS) : raw logs from Meituan App (search, page, module events) and descriptive logs.
Public dimensions : unified entry and page dimensions derived from standardized instrumentation logs.
B3 layer (Hotel‑Travel base detail) : extracts only the logs needed for the hotel‑travel business.
B2 layer (Multi‑dimensional model) : lightweight enrichment of base data with common dimensions such as page type, store, product, city, platform.
B1 layer (Wide‑table) : aggregates the multi‑dimensional model, performs deep processing of a few dimensions, and adds entry sources.
App layer : tailored aggregation models for the Flow Compass product.
View layer : buffers between the App layer and Kylin cubes, handling top‑level extensions, query latency, and resource allocation.
Cube layer : each Kylin cube combines a view with snowflake‑shaped dimensions to output data for the backend service.
Backend service layer : query engine and configuration module that handle frontend requests.
Permission layer : controls access per business line, platform, and terminal.
Frontend layer : user interface for query submission and result display.
Key Components
Public Dimensions
Public dimensions span from the B3 layer to the view layer, forming the top‑level cube. They modularize instrumentation and business rules, ensuring consistency across layers.
Page‑type dimension: abstracted from business definitions of pages and DAU/intention metrics.
Page‑detail and entry dimensions: derived from standardized instrumentation documentation.
Wide‑Table Layer
The wide‑table layer delivers rich dimensions, standard business metrics, and extensible data models while meeting latency requirements. For overlapping categories, a JSON string stores dimension content, and a dedicated processing module ensures global reuse and uniqueness.
Data Flow Example (Traffic Product Theme)
Log‑to‑fact stage retains raw traffic info and extracts main pages with A/B testing dimensions.
User dimension enriches records with tags (new/old, resident, etc.).
Standard metric module unifies metric definitions and outputs dimension tags.
From fact to product‑traffic theme, additional derived dimensions are added.
Attribution module tags traffic by tag, page, and module event sources.
Entry‑source processing creates an analysis‑ready entry theme.
Application Layer
The application layer uses Kylin cubes to serve user queries directly via the Kylin API.
Backend query logic remains simple.
Business logic is abstracted away.
Extensions can be added without changing query logic.
Backend Service Layer
Provides a query engine and configuration module. Because different business lines have varying entry‑source dimensions and metrics, the configuration module allows per‑line and per‑platform entry settings, governed by permission controls.
Query Engine & Performance
Weekly/monthly queries require daily‑average calculations, which conflict with existing deduplication logic. To resolve accuracy and latency issues, a Master‑Worker multithreaded pattern splits metric calculations by time dimension.
User selects dimensions and submits a total metric task.
Master splits the task into weekly/monthly sub‑tasks (daily averages) and queues them.
Workers pull tasks, execute, and return results to Master.
Master aggregates sub‑task results and returns the final metrics.
Evaluation Metrics
Two groups of indicators assess the system:
Business depth & breadth (model demand volume) and response speed (time from request to delivery).
Data‑model health: production/query latency, data quality (missing, unreasonable, inconsistent data), and resource consumption (storage and compute).
Conclusion
Flow Compass has been fully deployed across Meituan‑Dianping’s hotel‑travel lines for two quarters, receiving positive feedback and continuous improvement suggestions. The architecture remains extensible, with future integration of the "Magic Cube" (Meituan’s BI platform) and the "JinDouYun" query engine.
Future Outlook
Upcoming plans include migrating the query engine to the Magic Cube, adopting a unified modeling tool for metric definitions, and further enhancing the product’s modularity.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Meituan Technology Team
Over 10,000 engineers powering China’s leading lifestyle services e‑commerce platform. Supporting hundreds of millions of consumers, millions of merchants across 2,000+ industries. This is the public channel for the tech teams behind Meituan, Dianping, Meituan Waimai, Meituan Select, and related services.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
