Mobile Development 11 min read

How Xiaoju Prism Transforms Mobile App Behavior Tracking, Replay, and Detection

This article introduces Xiaoju Prism, a mobile‑focused tool that offers zero‑intrusion instrumentation, comprehensive data visualization, command‑driven operation replay, and real‑time behavior detection, detailing its three‑part architecture, implementation strategies, platform support, and open‑source repository.

Didi Tech
Didi Tech
Didi Tech
How Xiaoju Prism Transforms Mobile App Behavior Tracking, Replay, and Detection

Xiaoju Prism is a mobile‑oriented solution that provides end‑to‑end operation behavior capabilities, including replay, detection, and data visualization.

Why build Prism

Mobile apps are the primary carrier for most business scenarios, making the capture and analysis of user actions critical for efficiency, user value, and commercial impact.

Key Highlights

Zero intrusion : No code adaptation is required for business logic.

High availability : All capabilities have run stably in production for over a year.

Custom behavior command language : A self‑developed instruction set drives advanced features.

Flexible DSL for behavior policies : Enables rich, configurable detection rules.

Comprehensive functionality : Covers the full mobile behavior lifecycle.

Core Capabilities

Prism consists of three major parts:

Part 1: End‑to‑end instrumentation

Provides a complete mobile data collection pipeline with visualization features such as multi‑dimensional PV/UV, heatmaps, conversion funnels, and page dwell time, plus auxiliary tools like quick registration and testing. This empowers both data‑savvy and non‑technical users to explore metrics easily.

Part 2: Operation replay

Utilizes the self‑developed behavior command to record user actions and replay them as video or textual sequences, offering a "god view" of user interactions. An early "puzzle" approach (mapping screenshots to actions) was replaced by a more robust command‑driven method.

Part 3: Real‑time behavior detection

Leverages the same command language and a semantic DSL to define detection strategies that can be updated dynamically and applied across all app screens. This supports scenarios such as reducing CPO in shared‑car services and providing contextual guidance in marketing flows.

Implementation details include:

Generation strategy for unique mobile element identifiers.

Design of the command generation module.

Parsing/translation logic for commands.

Scheduling mechanisms for command execution.

Techniques for accurate behavior restoration.

Platform Support and Integration

Prism currently supports iOS, Android, and certain H5 platforms. It has been integrated into DiDi passenger, driver, Xiaoju Car, and Xiaoju Service apps, with additional business lines (freight, on‑demand driving, Orange Heart selection) in the rollout phase.

All source code, detailed documentation, and examples are available at https://github.com/didi/DiDiPrism.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

DSLopen sourcemobile analyticsbehavior detectionDiDiPrismoperation replay
Didi Tech
Written by

Didi Tech

Official Didi technology account

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.