Hotel Quote Search System Architecture and Workflow Overview
This article details the design and operation of a high‑concurrency hotel quote search platform, covering business background, core functionalities, system layers, data fetching, aggregation, scheduling, and price‑update mechanisms to ensure comprehensive, real‑time hotel pricing for users.
1. Background Introduction
The hotel market lacks a unified inventory system, with diverse suppliers and strong competition; Qunar aims to provide users with comprehensive, competitive, real‑time hotel quotes and a smooth booking experience.
2. Brief Introduction
The quote search business includes direct agency connections, competitor crawling, direct sales data landing, offline data capture, external display services, and management platforms for agencies and QSS.
Quote sources consist of QTA (self‑operated hotels), OTA (agency connections), web crawling, and app crawling.
3. Quote Search System Architecture
The architecture is divided into several layers:
1) Presentation layer – receives user requests, validates identity, and forwards to the quote layer.
2) Quote filtering layer – retrieves cached quotes, refreshes expired or changed prices, and manages display rules.
3) Quote calculation layer – aggregates and prices quotes from all agencies, triggering fresh fetches when caches expire.
4) Quote fetching layer – handles asynchronous fetch requests, filters invalid quotes.
5) Room type aggregation – maps product room types to physical room types for display.
6) Scheduling layer – builds mappings between agency IDs, hotel sequences, and third‑party IDs.
7) Supplier direct connection layer – integrates supplier data.
4. Quote Fetching Process
The process validates agency ID, hotel sequence, and dates, checks online status, routes requests through appropriate wrappers (e.g., PC, app, CPC), and uses components such as Breeze, Accessor, and SPA to retrieve and store quotes.
5. Basic Data Landing
Accessor lands all QTA quotes and OTA hotel/supplier basic info, synchronizing agency IDs and hotel sequences, building mapping relationships, and updating via scheduled tasks and QMQ messages.
6. Basic Data Scheduling
The scheduler generates treeMapping data linking agency IDs, hotel sequences, hotel IDs, and supplier IDs, enabling downstream retrieval of product, room type, promotion, and cashback information, ultimately storing data in a Redis cluster.
7. Hotel Aggregation
Hotel aggregation requires city mapping, list crawling (name, address, phone, coordinates), similarity‑based algorithmic matching combined with manual review, and generation of tree information linking agencies, hotel sequences, and third‑party IDs.
8. Room Type Aggregation
Product room types (e.g., "Standard Room with Breakfast") are mapped to physical room types (e.g., "Standard", "King") using algorithmic and manual methods, resulting in three possible aggregation states that influence display strategies.
9. Price Change Updates
To keep cached quotes consistent with agency prices, proactive update mechanisms include agency‑initiated notifications, booking failures, forced refreshes, and user‑triggered re‑crawls; updates flow through the price change system, are persisted in DB, notified, and finally reflected in Redis and local caches.
10. Summary
The article presents foundational knowledge of the hotel quote system, covering hotel and room aggregation processes, overall quote fetching workflow, design considerations, and mechanisms for quote caching and updates.
Qunar Tech Salon
Qunar Tech Salon is a learning and exchange platform for Qunar engineers and industry peers. We share cutting-edge technology trends and topics, providing a free platform for mid-to-senior technical professionals to exchange and learn.
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.