Business Systems Engineering

A Complete Method Chain for Outdoor-Ad Spot Selection: Anti-Existence Scheduling Predicates, Grouped Quotas, and Two-Phase Greedy Selection

1528 words · ~8 min read
0 views

This is a retrieval-method note, scoped to selecting outdoor-advertising spots against a delivery date range. Method names and step numbers correspond to a working implementation; organization, customer, and deployment details are omitted. The subject is query semantics and execution strategy, not pricing, contracts, or scheduling rules.

The conclusion first: generic paginated queries cannot express the semantics of spot selection; what is needed is a method chain of predicates, grouping, and packet-level strategy. Three judgments up front: 1) availability is an anti-existence judgment over intervals, not a status-field filter, and it can be done entirely in database predicates without precomputing occupancy tables; 2) a group quota of 1 and a quota of N are two different execution paths, switched because window functions are incompatible with ORM tenant filters; 3) excluding spot packets must propagate at group granularity, since per-spot exclusion leaves the business gap of selling twice in the same elevator or unit.

Differential Sync and State Convergence for Fieldwork Tasks: Set Difference, Data-Fact Ground Truth, and Three-Way Fallbacks

1426 words · ~7 min read
0 views

This is a task-consistency note, scoped to spot tasks and real-scene tasks in media-delivery fieldwork. Method names and step numbers correspond to a working implementation; organization, customer, and deployment details are omitted. The subject is maintaining the task set and deciding task state, not crew scheduling or performance evaluation.

The conclusion first: task state should be decided by data facts, not event order; the task set should be reconciled by set difference, not rebuilt wholesale on range changes. Three judgments up front: 1) the cost of delete-and-rebuild is not performance but losing photo associations, completion progress, and assignees attached to existing tasks — no rework for field crews is a hard constraint; 2) upload success, photo deletion, and manual marking inevitably arrive out of order, duplicated, or missing in a distributed setting, and an event-driven state machine freezes those disturbances into state; 3) once successful image count versus photo requirement is the ground truth, convergence needs no event history, and three complementary scheduled fallbacks cover every direction of deviation.