关于「核销自动机:截图是声明,入账才是事实」,《截图不是钱》给出的定量结论是什么?

结论:第四章穷举证明「截图是声明,入账才是事实」,只看金额时错配率约 0.17823。

数据口径:书中订单、账号末码、金额、截图与哈希均由固定种子合成,参数为示意,全部计算由书中程序生成;本书只讨论核销方如何检出重复或改动过的凭证,不提供任何制作凭证的方法;属非个人化经营方法,不构成法律、财务或理财建议,任何置付与发货都须由主事者人工放行。 第一章用生日问题量化撞单:从 10 单到 100 单,期望撞单配对数增长 110.0 倍,撞单概率只增长 41.3 倍;示意目录的有效金额只有 19.3 种,5.2 单即有对半机会撞单。

English version

对照数据表

下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.17823

200 orders a day, 300 days
keyrulereceipts in tiesmisassigned share
AMTFIFO0.99970.17823
AMTLIFO0.99970.17200
AMT+L5FIFO0.00030.00000
AMT+L5LIFO0.00030.00000
查看完整验算程序
# Chapter 4. p42: inside a tie, no algorithm recovers missing fields
# Model: a day of n = 200 orders with times uniform over 1,440
# minutes; amounts from an illustrative 12-point Zipf law; each buyer
# pays after a lognormal delay (median 6 minutes, sigma 1.0) and the
# receipt arrives at the payment time. Receipts are matched inside
# groups that share the key. FIFO pairs the k-th receipt with the
# k-th order in time (the optimal monotone matching for any convex
# cost of the delay); LIFO gives each receipt the latest open order
# placed before it. Keys: amount only, amount plus last five digits.
# A receipt matched to another buyer's order is a misassignment.
# Seeded Monte Carlo over DAYS days; all parameters illustrative.
import math
import random

N, DAYS = 200, 300
AMTS = [74 + 40 * k for k in range(12)]
WT = [1.0 / r for r in range(1, 13)]
CUM = [math.fsum(WT[:k + 1]) / math.fsum(WT) for k in range(12)]
rng = random.Random(20261113)


def amount():
    u = rng.random()
    for a, c in zip(AMTS, CUM):
        if u <= c:
            return a
    return AMTS[-1]


def day():
    orders = []
    for i in range(N):
        t = rng.random() * 1440.0
        pay = t + rng.lognormvariate(math.log(6.0), 1.0)
        orders.append((i, amount(), rng.randrange(100000), t, pay))
    return orders


def match(orders, use_tail, rule):
    groups = {}
    for o in orders:
        key = (o[1], o[2]) if use_tail else (o[1],)
        groups.setdefault(key, []).append(o)
    wrong = tied = 0
    for key in sorted(groups):
        g = groups[key]
        if len(g) > 1:
            tied += len(g)
        by_t = sorted(g, key=lambda o: o[3])
        recs = sorted(g, key=lambda o: o[4])
        if rule == "FIFO":
            for o, r in zip(by_t, recs):
                wrong += o[0] != r[0]
        else:
            open_ = list(by_t)
            for r in recs:
                before = [o for o in open_ if o[3] <= r[4]]
                pick = before[-1] if before else open_[0]
                open_.remove(pick)
                wrong += pick[0] != r[0]
    return wrong, tied


res = {}
for _ in range(DAYS):
    orders = day()
    for tail in (False, True):
        for rule in ("FIFO", "LIFO"):
            w, t = match(orders, tail, rule)
            a, b = res.get((tail, rule), (0, 0))
            res[(tail, rule)] = (a + w, b + t)
print("%d orders a day, %d days" % (N, DAYS))
print("key          rule   receipts in ties   misassigned share")
for tail in (False, True):
    for rule in ("FIFO", "LIFO"):
        w, t = res[(tail, rule)]
        print("%-11s  %-4s   %16.4f   %17.5f"
              % ("AMT+L5" if tail else "AMT", rule, t / (N * DAYS),
                 w / (N * DAYS)))

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《多模态汇款凭证与口语订单容错解析、转账末五码核销自动机与重复截图欺诈阻断母典》第 4 章「核销自动机:截图是声明,入账才是事实」(版本 1.0.0). 5D Library. DOI 待发布

DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-267 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026267,
  author    = {Fan, Yafu},
  title     = {Fault-Tolerant Parsing of Payment Receipts and Spoken Orders: Last-Five-Digit Write-Off Automata and Blocking Duplicate-Screenshot Fraud},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

本书其他章节结论