目录 / 文档-技术白皮书 / 25-EFT.WP.STG.Dynamics v1.0
一句话目标:提供 STG 动力学系统从数据→图→算子→内核→推进/同化→不确定度→运行时→发布的可拷贝清单模板与示例,保证结果可复现、可审计与可对比。
I. 范围与对象
- 对象:graph, operators(L/A/H), kernel K=g(L), dynamics/solver, filter(Q/R/x0/P0), uncertainty(u_c,g,nu_eff,α), contracts, runtime(window/watermark), artifacts, signature。
- 输入:各阶段产物之 *.hash、RefCond、单位字典 units.*、关键统计与两口径差。
- 输出:manifest.stg.*(用例版与运行时版)。
- 约束:non_decreasing(tau_mono);所有度量经 check_dim( y - f(x) ) 校核;清单含 signature 与全量字段摘要。
II. 名词与字段
- 标识与时间:TraceID, ts_publish, tau_mono, wm(t)(watermark)。
- 图与算子:graph.hash, L.hash, A.hash, H.hash, spectrum=[λ_min, λ_max]。
- 内核与推进:K.hash, mode ∈ {diff,wave,mix}, Δt, solver。
- 同化:filter ∈ {KF,UKF,PF}, Q.hash, R.hash, x0.hash, P0.hash。
- 不确定度:u_num, u_model, u_c, k, g, nu_eff, α。
- 契约与两口径:rules.hash, report.hash, delta_form_stream_p95, delta_form_unc_p95。
- 参考条件与单位:RefCond, units.*。
- 产物与签名:artifacts.*, signature。
III. 公设 P70C-*
- P70C-1:清单以 hash(*) 为主索引,可追溯至原始数据与代码版本。
- P70C-2:每个数值字段声明 unit(field) 与 dim(field) 并经 check_dim。
- P70C-3:两口径并行并记录差异:统计口径(事件时 vs 处理时)、不确定度口径(LPU vs MC)。
- P70C-4:signature 覆盖清单除 signature 自身外的全部键。
IV. 最小方程 S70C-*
- 清单签名域:signature = Sign_{key_id}( SHA256( normalize(manifest \ signature) ) )。
- 合成不确定度:u_c^2 = J V_x J^T + u_num^2 + u_model^2,g = k * u_c。
- 两口径差:delta_form_unc = | u_c^{LPU} - u_c^{MC} |(滚动分位统计记录 p95)。
- 水位线单调:wm(t_{i+1}) ≥ wm(t_i)。
V. 计量流程 M70-3(生成→校核→签名→发布)
- 聚合阶段产物与元数据,构造原始 manifest_draft。
- 运行 assert_runtime_contracts(state, rules) 得 contracts.report 与关键分位统计。
- 校核单位与量纲、谱界、覆盖率与两口径差;失败则拒绝发布。
- 规范化字段顺序与编码,生成 digest,sign_manifest 写入 signature。
- 发布至对象存储与面板索引,落盘 manifest.hash 与回放指针。
VI. 契约与断言 C70C-*(清单级)
- C70C-01:顶层最小键齐备:{TraceID, ts_publish, graph.hash, L.hash, RefCond, units, artifacts, signature}。
- C70C-02:谱区间存在且满足 λ_max ≤ λ_cap。
- C70C-03:coverage ≥ 1-α-ε_cov;delta_form_stream_p95 ≤ tol_stream;delta_form_unc_p95 ≤ tol_unc。
- C70C-04:所有 *.hash 可在版本库解析为具体工件(代码/数据/模型)。
VII. 实现绑定 I70-*(清单相关)
- emit_runtime_manifest(results, policy) -> manifest.stg.runtime。
- emit_case_manifest(results, policy) -> manifest.stg.case。
- sign_manifest(manifest, key_id) -> signature;verify_manifest(manifest, keyring) -> ok。
- assert_runtime_contracts(state, rules) -> report。
(见附录A I70-14B/161/162/163/14A)
VIII. 交叉引用
- 契约阈值与策略:见附录B C70-*。
- 滤波与指标:见第12章、第13章。
- 运行时窗口与回放:见第14章。
- 用例字段差异与面板映射:见第15章。
IX. 质量与风控
- SLO:清单生成 latency_p95 ≤ B_mod,失败进入降级通道并补发。
- 漂移监控:manifest.diff(与上一版对比的键级差异)入审计。
- 回退:验证失败→回滚至最近 verify_manifest == ok 的版本并标注 rollback.from.
模板(可直接拷贝)
manifest_version: "stg.v1.0"
TraceID: "<uuid>"
ts_publish: "<ISO8601>"
tau_mono: "<monotonic_time_ref>"
producer: { org: "<org>", service: "<svc>", version: "<semver>" }
RefCond:
timezone: "UTC"
units_policy: "SI"
sensors: ["<sensor_id>", "..."]
notes: "<free text>"
units:
x: "<unit(x)>"
y: "<unit(y)>"
u: "<unit(u)>"
Δt: "s"
u_c: "<unit(state)>"
g: "<unit(state)>"
graph:
hash: "<graph.hash>"
|V|: <int>
|E|: <int>
directed: false
weights: "nonnegative"
meta: { build_policy: "<id>", sources: ["<src>", "..."] }
operators:
L:
hash: "<L.hash>"
spectrum: { λ_min: <float>, λ_max: <float> }
A: { hash: "<A.hash>" }
H: { hash: "<H.hash>", rank: <int>, sensors_online: <float> } # fraction 0..1
kernel:
mode: "diff|wave|mix"
hyper: { τ: <float>, ω: <float>, α: <float>, order: <int> }
approx: { scheme: "chebyshev|pade|exact", order: <int>, ε_approx: <float> }
hash: "<K.hash>"
dynamics:
solver: "RK45|BDF|StrangSplit"
Δt: <float>
stiff_flag: <bool>
events: ["<event_name>", "..."]
guards: { norm_growth_γ: <float>, bound_b: <float> }
filter:
type: "KF|UKF|PF"
Q: { hash: "<Q.hash>" }
R: { hash: "<R.hash>" }
x0: { hash: "<x0.hash>" }
P0: { hash: "<P0.hash>" }
stats:
NIS_p95: <float>
ESS_over_Np: <float> # PF only
residual_p95: <float>
uncertainty:
method: { LPU: true, MC: true }
u_num: <float>
u_model: <float>
u_c: <float>
k: <float>
g: <float>
nu_eff: <float>
α: <float>
delta_form_unc_p95: <float>
contracts:
rules: { hash: "<rules.hash>", version: "<semver>" }
report: { hash: "<report.hash>", pass: <bool>, violations: <int> }
delta_form_stream_p95: <float>
coverage: <float>
runtime:
window: { type: "sliding|tumbling", Δt_win: "<dur>", Δt_slide: "<dur>" }
watermark: { wm: "<ISO8601>", policy: "<id>" }
latency_ms:
p50: <int>
p95: <int>
p99: <int>
cache: { hit_rate: <float>, policy: "ttl|lru", ttl: "<dur>" }
artifacts:
datasets: [{ name: "<id>", hash: "<sha256>", uri: "stg://..." }]
models: [{ name: "<id>", hash: "<sha256>", uri: "stg://..." }]
code: [{ repo: "<url>", commit: "<sha1>" }]
panels: [{ name: "<id>", url: "<url-or-id>" }]
provenance:
build_host: "<hostname>"
container: { image: "<name:tag>", digest: "<sha256>" }
os: "<id>", arch: "<id>"
signature:
key_id: "<kid>"
alg: "ed25519|ecdsa-p256"
value: "<base64>"
样例(城市交通—扩散核 + UKF,运行时发布)
manifest_version: "stg.v1.0"
TraceID: "7a5ac1d0-9e6a-4a1e-8fe3-41a9f7c0e2c4"
ts_publish: "2025-09-02T10:15:03Z"
tau_mono: "807453.551"
producer: { org: "EFT-Labs", service: "stg-traffic", version: "1.6.2" }
RefCond:
timezone: "Europe/Amsterdam"
units_policy: "SI"
sensors: ["cam-A12", "loop-R7", "gps-bus-021"]
notes: "Morning peak; rain"
units:
x: "veh/s"
y: "veh/s"
u: "veh/s"
Δt: "s"
u_c: "veh/s"
g: "veh/s"
graph:
hash: "graph:5d7d1c3e"
|V|: 1120
|E|: 1437
directed: true
weights: "nonnegative"
meta: { build_policy: "traffic-v4", sources: ["osm-2025Q3","city-iot-1.2"] }
operators:
L:
hash: "L:9c2a77ab"
spectrum: { λ_min: 0.0, λ_max: 3.84 }
A: { hash: "A:11f5a0cd" }
H: { hash: "H:07bb2913", rank: 468, sensors_online: 0.93 }
kernel:
mode: "diff"
hyper: { τ: 120.0, ω: 0.0, α: 0.85, order: 0 }
approx: { scheme: "chebyshev", order: 15, ε_approx: 3.1e-3 }
hash: "K:6f0dbe21"
dynamics:
solver: "RK45"
Δt: 5.0
stiff_flag: false
events: ["gate-closure-R7@2025-09-02T07:58Z"]
guards: { norm_growth_γ: 1.02, bound_b: 3.0 }
filter:
type: "UKF"
Q: { hash: "Q:4a77f2b1" }
R: { hash: "R:0b61e0e9" }
x0: { hash: "x0:2d8f9c77" }
P0: { hash: "P0:3c1185d0" }
stats:
NIS_p95: 0.91
ESS_over_Np: 0.0
residual_p95: 7.4
uncertainty:
method: { LPU: true, MC: true }
u_num: 0.9
u_model: 3.2
u_c: 4.0
k: 2.0
g: 8.0
nu_eff: 46.0
α: 0.05
delta_form_unc_p95: 0.7
contracts:
rules: { hash: "rules:stg-traffic-2025.08", version: "2.3.0" }
report: { hash: "rep:0f77a9aa", pass: true, violations: 0 }
delta_form_stream_p95: 0.6
coverage: 0.96
runtime:
window: { type: "sliding", Δt_win: "30m", Δt_slide: "5m" }
watermark: { wm: "2025-09-02T10:14:50Z", policy: "wm-lag-20s" }
latency_ms:
p50: 420
p95: 980
p99: 1710
cache: { hit_rate: 0.87, policy: "ttl", ttl: "10m" }
artifacts:
datasets:
- { name: "iot-traffic-2025-09-02T09Z", hash: "ds:8f0c7d21", uri: "stg://city/ds/8f0c7d21" }
models:
- { name: "diff-kernel-ukf-1.6.2", hash: "mdl:5bcf112e", uri: "stg://models/5bcf112e" }
code:
- { repo: "https://git.example/eft/stg-traffic", commit: "d1e9c4a" }
panels:
- { name: "traffic-ops", url: "panel://ops/traffic" }
provenance:
build_host: "runner-17"
container: { image: "ghcr.io/eft/stg-traffic:1.6.2", digest: "sha256:ab92..." }
os: "linux", arch: "x86_64"
signature:
key_id: "k-ed25519-ops-01"
alg: "ed25519"
value: "Z5hQ7v3...=="
小结
- 本附录给出 stg manifest 的必备键、生成流程与合规断言,并提供可直接投入运行的模板与样例。
- 产出物:manifest.stg.runtime/manifest.stg.case 文件、contracts.report、manifest.hash/signature,用于对比、回放与面板挂载。
版权与许可(CC BY 4.0)
版权声明:除另有说明外,《能量丝理论》(含文本、图表、插图、符号与公式)的著作权由作者(“屠广林”先生)享有。
许可方式:本作品采用 Creative Commons 署名 4.0 国际许可协议(CC BY 4.0)进行许可;在注明作者与来源的前提下,允许为商业或非商业目的进行复制、转载、节选、改编与再分发。
署名格式(建议):作者:“屠广林”;作品:《能量丝理论》;来源:energyfilament.org;许可证:CC BY 4.0。
首次发布: 2025-11-11|当前版本:v5.1
协议链接:https://creativecommons.org/licenses/by/4.0/