5D Library › Books › 5DL-B-075

零人工多站点容错架构、支付防欺诈状态机与被动现金流排队论

回单哈希去重、自购返佣阻断、域名热路由与可用性边界

Zero-Touch Multi-Site Fault Tolerance, Payment Anti-Fraud State Machines and Passive Cashflow Queuing: Receipt-Hash Deduplication, Self-Referral Blocking, Host-Header Routing and Availability Bounds

  • 范雅福 Fan Yafu
  • Version 1.0.0 · 2026-11-08
  • CC-BY-NC-ND-4.0
  • 5DL-B-075
DOI10.5281/zenodo.24090201

摘要

一个由几十个站点组成、共用一套程序内核、尽量不需要人工操作的数字服务网络,要回答四个问题:人工转账回单如何防止重复与伪造,自购返佣与「邀请好友解锁」如何被套利,订单状态机与消息重试如何保持正确,共享内核与现金流在突发冲击下需要多少余量。本书把这些问题写成可运行的程序。书中的流量、价格、欺诈率与故障参数都是模型参数,不是任何企业的数据;本书不提供任何攻击方法,也不主张、不检验任何占断是否应验。

第一章证明只核对 4 位尾号在 119 单时就有一半的碰撞机会,累计 5,000 单后会误拒 0.3935 的诚实回单;感知哈希能认出重新保存的副本,却会把同一 App 的诚实回单误配;「先放行、后抽查」只有在被抓者失去抵押时才有威慑力,抵押为 200 时抽查 0.485 的订单即可。第二章的关联图显示,设备与支付账户能识别多数作弊团伙,加入 IP 子网则把 4692 个账户连成一片、误拦 0.817 的陌生人推荐;「邀请 3 人解锁」让自购者以 67.50 拿到标价 299 的二级。第三章的穷举模型检验显示,不看状态的处理函数两个事件就能造成重复放行,幂等键必须比 511 分钟的重试计划活得更久且原子写入。

第四章用排队论与模拟显示,突发到达把单个工作进程的 T99 推到数十秒;平均负载 0.80 时,突发需要 4 个工作进程,或 3 个加限流(拒绝 0.0005 的请求)。第五章显示主备节点与金丝雀发布把 30 个站点一起停机的时间降到每年 6.53 分钟,蓝绿切换的排空时间由最长的流式请求决定。第六章用汤普森抽样分配流量(与理想只差 470.0 次转化),给出升级独立域名的后验停止规则,并显示订单减半三个月的冲击需要 90,000 的现金储备。第七章与唐代飞钱合券、宋代交子多重印押与发行上限、刘晏疏浚汴河并读。第八章给出九项自动审计与一项预注册实验。书中以标注框区分证据、16 段可运行的 Python 程序、史料与假说。

关键词:零人工运维;多站点架构;共享内核;生日问题;回单去重;密码学哈希;感知哈希;先放行后抽查;犯罪经济学;级联撤销;女巫攻击;并查集;运营商级NAT;自购返佣;邀请解锁;状态机;模型检验;幂等;至少一次投递;PK公式;尾延迟;处理器共享;限流;可用性;金丝雀发布;蓝绿部署;汤普森抽样;最优停止;复合泊松过程;飞钱;交子

Abstract

A digital service network of dozens of sites that share one program kernel and try to run without human work has to answer four questions: how to stop manual transfer receipts from being reused or forged, how self-referral commissions and "invite friends to unlock" offers are arbitraged, how the order state machine and message retries stay correct, and how much headroom the shared kernel and the cash flow need under bursts and shocks. This book writes these questions as runnable programs. Its traffic, price, fraud and failure parameters are model parameters, not data from any business; it gives no method of attack, and it neither claims nor tests that any reading comes true.

Chapter 1 shows that checking only 4 trailing digits gives an even chance of a collision by 119 orders and, after 5,000 orders, wrongly refuses 0.3935 of honest receipts; a perceptual hash recognises re-saved copies but matches honest receipts from the same app; release-then-audit deters only when the person caught loses a stake, and with a stake of 200 auditing 0.485 of orders suffices. Chapter 2's association graph shows that devices and payment accounts identify most cheating rings, while IP subnets join 4692 accounts into one component and wrongly block 0.817 of referrals between strangers; "invite 3 to unlock" lets a self-referrer get a level listed at 299 for 67.50. Chapter 3's exhaustive model check shows that handlers blind to state double-release with two events, and that idempotency keys must outlive the 511-minute retry schedule and be written atomically.

Chapter 4 shows by queueing theory and simulation that bursty arrivals push a single worker's T99 to tens of seconds; at a mean load of 0.80, bursts need 4 workers, or 3 with load shedding (refusing 0.0005 of requests). Chapter 5 shows that a standby node and canary releases cut the time all 30 sites are down together to 6.53 minutes a year, and that the drain time of a blue-green switch is set by the longest streamed requests. Chapter 6 allocates traffic by Thompson sampling (470.0 conversions short of the ideal), gives a posterior stopping rule for promoting a site to its own domain, and shows that a three-month halving of orders needs a cash reserve of 90,000. Chapter 7 reads the matched tallies of Tang flying cash, the multiple seals and issue cap of Song jiaozi, and Liu Yan's clearing of the Bian River. Chapter 8 gives a nine-flag audit and a pre-registered experiment. Marked boxes separate evidence, 16 runnable Python programs, historical sources and hypotheses.

Keywords: zero-touch operations; multi-site architecture; shared kernel; birthday problem; receipt deduplication; SHA-256; perceptual hashing; release-then-audit; economics of crime; cascading revocation; Sybil attack; union-find; carrier-grade NAT; self-referral; invitation unlocks; state machines; model checking; idempotency; at-least-once delivery; Pollaczek-Khinchine formula; tail latency; processor sharing; load shedding; availability; canary release; blue-green deployment; Thompson sampling; optimal stopping; compound Poisson process; flying cash; jiaozi

目录 · Contents

  • 序 无人值守,并不等于无人负责English 中文Preface: Unattended Is Not the Same as Unaccountable
  • 第一章 转账回单:去重、图像哈希与先放行后抽查English 中文Chapter 1. Transfer Receipts: Deduplication, Image Hashes and Release-Then-Audit
  • 第二章 自购返佣与「邀请好友解锁」English 中文Chapter 2. Self-Referral and "Invite Friends to Unlock"
  • 第三章 订单状态机:穷举检验与幂等窗口English 中文Chapter 3. The Order State Machine: Exhaustive Checking and the Idempotency Window
  • 第四章 三十个站点共用一个内核:排队与尾延迟English 中文Chapter 4. Thirty Sites on One Kernel: Queues and Tail Latency
  • 第五章 可用性:共享内核、主备切换与蓝绿排空English 中文Chapter 5. Availability: Shared Kernels, Standby Nodes and Blue-Green Draining
  • 第六章 流量分配、升级独立域名与现金储备English 中文Chapter 6. Allocating Traffic, Promoting Domains and Holding Cash
  • 第七章 飞钱合券、交子印押与刘晏漕运English 中文Chapter 7. Matched Tallies, Banknote Seals and Liu Yan's Canal
  • 第八章 九项自动审计与一项预注册实验English 中文Chapter 8. A Nine-Flag Audit and a Pre-Registered Experiment

How to cite · 引用

Fan, Y. (2026). Zero-Touch Multi-Site Fault Tolerance, Payment Anti-Fraud State Machines and Passive Cashflow Queuing: Receipt-Hash Deduplication, Self-Referral Blocking, Host-Header Routing and Availability Bounds [零人工多站点容错架构、支付防欺诈状态机与被动现金流排队论] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090201

BibTeX
@book{fan2026zero,
  title = {{Zero-Touch Multi-Site Fault Tolerance, Payment Anti-Fraud State Machines and Passive Cashflow Queuing}: Receipt-Hash Deduplication, Self-Referral Blocking, Host-Header Routing and Availability Bounds},
  author = {Fan, Yafu},
  year = {2026},
  publisher = {5D Library},
  edition = {Version 1.0.0},
  doi = {10.5281/zenodo.24090201},
  url = {https://doi.org/10.5281/zenodo.24090201},
  note = {Chinese title: 零人工多站点容错架构、支付防欺诈状态机与被动现金流排队论}
}
DOIhttps://doi.org/10.5281/zenodo.24090201
DOI(全部版本 all versions)https://doi.org/10.5281/zenodo.24090200
ORCIDhttps://orcid.org/0009-0004-3519-1203
5D Library ID5DL-B-075
版本 Version1.0.0 · 中英双语版 Bilingual edition
出版日期 Date2026-11-08
网址 Onlinehttps://5dlibrary.com/books/zero-touch-multi-site-fault-tolerance-payment-antifraud-queuing/
SHA-256 · zero-touch-multi-site-fault-tolerance-payment-antifraud-queuing_bilingual_v1.0.0.pdfdf48f8eba3b5961e1f7e3c25e1cb70767998b7ab95467b428cd539bc60b0dd8a
SHA-256 · zero-touch-multi-site-fault-tolerance-payment-antifraud-queuing_en_v1.0.0.pdf41832daef040775db0cf2089926b90f786fefb02b43bdb536b0f3a8e433aa058
SHA-256 · zero-touch-multi-site-fault-tolerance-payment-antifraud-queuing_zh_v1.0.0.pdf23c0d836f4c142ac2b894a233087f0ac065107171d1aca88063da5da5cd52aeb
Licence · 许可Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0). https://creativecommons.org/licenses/by-nc-nd/4.0/

Disclosure. The author uses the works of 5D Library, including this book, as the methodological basis of his community courses, the 5D Ascension Cards (Dimensional Shift Card Decks) and the Yafu AI knowledge base, and develops and runs paid online reading software on traditional divinatory and mind-body themes and a multi-site network (automated payment collection and verification, affiliate and invitation programmes, a shared program kernel and multi-domain sites); the models of this book apply directly to those systems, so he has a direct commercial interest in its subject. The book promotes no software, course, card deck or service, uses no user, transaction or operations data from the author's businesses, and accepts no sponsorship. All its models are offered for mathematical study and teaching only and constitute no promise that any reading comes true and no investment, pricing, legal, security or other business advice. The experiment in Chapter 8 must be carried out with pre-registered code by an independent analyst who has no financial relationship with the author, and its results will be published whether positive or negative.