Abstract
In China's rapidly digitizing healthcare landscape, scalpers (known as Huang Niu) use automated bots to hoard limited hospital appointments, reselling them at a premium and disenfranchising elderly patients with limited digital literacy. This paper proposes a multi-stage hierarchical clustering framework to detect these predatory actors by analyzing mobile app event logs. By modeling user behavior as sequences of "EventCases" and applying a hybrid similarity metric, the system builds distinct behavioral personas. Real-world deployment on the Qu Yi Yuan platform demonstrates a detection accuracy exceeding 90%.
Introduction
As healthcare services migrate to mobile platforms, booking a doctor often requires navigating complex apps. While efficient for many, this shift has created a secondary market where scalpers use scripts and high-speed "quick clicks" to snatch appointments the moment they become available. This leaves elderly patients—who often suffer from chronic conditions—unable to access care through legitimate channels.
Detecting these actors is a significant challenge. Healthcare apps generate millions of events weekly, and scalpers increasingly mimic human behavior to bypass traditional rule-based systems. This research seeks to automate the identification of these "unrighteous" users by profiling their unique behavioral signatures rather than relying on simple frequency thresholds.
Proposed Framework
The authors introduce a novel pipeline that transforms raw event logs into human-readable user profiles through a four-step process.
1. Data Modeling (EventCases)
Instead of analyzing isolated clicks, the system groups events into "EventCases." These are sequences of actions representing a completed task, such as searching for a physician or finalizing an appointment. This captures the workflow intent rather than just raw activity.
2. Hybrid Similarity Calculation
To compare EventCases, the framework utilizes a Sequence Matcher that combines three metrics:
- Activity Matcher: Uses WordNet for semantic similarity between action names.
- Location Matcher: Analyzes GPS coordinates to verify if actions occur in expected geographic areas.
- Timestamp Matcher: Measures intervals between clicks to distinguish human reaction times from bot speeds.
These metrics are processed using an extended Needleman-Wunsch algorithm to align and score behavioral sequences.
3. Two-Tier Clustering
The system employs a dual clustering approach. First, Agglomerative Hierarchical Clustering (AHC) groups similar behaviors (EventCases). Second, Divisive Hierarchical Clustering (DHC) groups users based on the frequency and distribution of those behavioral clusters.
4. User Profiling and Detection
By identifying the "center user" of each cluster, administrators can manually label group intents. For example, a cluster characterized by high-frequency booking without ever viewing doctor details is a strong indicator of scalper activity.
Experimental Results
The study utilized real-world data from Qu Yi Yuan, a major mobile healthcare platform in China. The primary dataset included nearly 400,000 events from 5,906 users at a hospital in Wuhan.
On a manually labeled "gold standard" test set, the model achieved an F1-measure of 0.77. By refining detection to focus on high-confidence profiles (e.g., users who skip "low-value" steps like reading doctor bios), the system reached a precision of 0.88. In a full-scale deployment, the system flagged 413 suspected scalpers; a manual audit confirmed an accuracy rate exceeding 90%.
Discussion and Conclusion
A key insight of this work is that scalpers are focused on the "transaction" rather than the "consultation." Their logs reveal an efficiency that bypasses the typical exploratory behavior of real patients. By focusing on personas and intent rather than hard-coded rules, the model is more resilient to evasion tactics like slowing down scripts.
Future work aims to reduce the need for manual labeling by using Linked Open Data to automatically discover and name profiles. Currently, the system provides a robust defense for healthcare platforms, ensuring that limited medical resources remain accessible to the patients who need them most.
Summary updated