Operations 7 min read

Design and Implementation of a Fine-Grained C2B Operation Platform

This article describes the background, objectives, module division, system design, technical challenges, and solutions of a fine‑grained C2B operation platform that uses user profiling, precise targeting, and Redis sharding to improve conversion rates and ROI.

Zhuanzhuan Tech
Zhuanzhuan Tech
Zhuanzhuan Tech
Design and Implementation of a Fine-Grained C2B Operation Platform

Background : Fine‑grained operation focuses on detailed user profiling, precise ad placement, and maximizing data value by analyzing user behavior, devices, and channels to build a complete user picture.

Why it matters : Traditional coarse campaigns yielded low conversion and limited differentiation; a data‑driven platform is needed to continuously adjust strategies and maximize ROI.

C2B perspective : Leveraging existing detailed data to support business growth, linking various metrics to decision‑making, and using examples such as post‑order cancellation reasons to trigger targeted actions (price coupons, tutorial videos, 1‑to‑1 calls).

Module division : User segmentation : channel‑based tagging, explicit data (surveys, order ratings) and implicit data (customer service feedback, IM, NPS). Conversion methods : price‑up coupons, red packets, 1v1客服, data‑clearance tutorials, etc. Delivery channels : push, SMS, in‑app positions, outbound calls, private domain.

System design : Task : basic element representing a delivery method (e.g., pop‑up, push, outbound). Plan : drives task execution, configuring time window, audience (all or targeted users), A/B testing, and linking specific tasks.

Tasks are created in the backend with associated assets (links, images). Plans and tasks are visualized through several diagrams (omitted here).

Challenges : Storing large user sets in a Redis ZSET caused big‑key performance issues during push operations.

Solution : Shard user data across multiple Redis keys using a token/UID‑based hash.

// Get shard index
    private String getClusterKey(String key, String member) {
        int hash = Hashing.murmur3_32().hashString(member, Charsets.UTF_8).asInt();
        hash = Math.abs(hash);
        final int clusterIndex = (hash & (CommonConstant.CLUSTER_COUNT - 1)) + 1;
        return getClusterKey(key, clusterIndex);
    }
// Iterate shards for push
    private void runSingleJob(JobInfoDto jobInfoDto, PlanInfoDto planInfoDto) {
        try {
            PlanUserDataCondition condition = new PlanUserDataCondition();
            condition.setPageCount(100);
            condition.setPlanId(planInfoDto.getPlanId());
            for (int i = IntelligentOperateDataCacheService.MIN_CLUSTER_INDEX; i <= IntelligentOperateDataCacheService.MAX_CLUSTER_INDEX; i++) {
                condition.setClusterIndex(i);
                int pageNum = 1;
                while (true) {
                    condition.setPageNum(pageNum);
                    List
uidList = intelligentOperateDataCacheService.listPlanUidByCondition(condition, "IntelligentOperatePushTask");
                    if (CollectionUtils.isEmpty(uidList)) {
                        log.info("BeginSendMessageUserProfilePrivateHandler current shard has no data planId={} index={}", planInfoDto.getPlanId(), i);
                        break;
                    }
                    if (apolloConfigService.getJobProcessSwitch()) {
                        log.info("Switch closed, terminating... {}", planInfoDto.getPlanId());
                        break;
                    }
                    CountDownLatch countDownLatch = new CountDownLatch(uidList.size());
                    for (Long uid : uidList) {
                        ThreadUtil.execute(() -> send(uid, planInfoDto, jobInfoDto, countDownLatch));
                    }
                    countDownLatch.await();
                    log.info("BeginSendMessageUserProfilePrivateHandler page end planId={} jobId={} num={}", planInfoDto.getPlanId(), jobInfoDto.getJobId(), pageNum);
                    pageNum++;
                }
            }
        } catch (Exception e) {
            log.info("runSingleJob error, e=", e);
        }
    }

Conclusion : The platform built on the Aladdin C2B marketing system has achieved measurable improvements in user recall and conversion; future work will add more delivery methods, conversion tactics, and open the system for broader business integration.

user segmentationTask Schedulingmarketing automationC2BFine-grained OperationsRedis Sharding
Zhuanzhuan Tech
Written by

Zhuanzhuan Tech

A platform for Zhuanzhuan R&D and industry peers to learn and exchange technology, regularly sharing frontline experience and cutting‑edge topics. We welcome practical discussions and sharing; contact waterystone with any questions.

0 followers
Reader feedback

How this landed with the community

login 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.