业务本体与标准实体:跨源键值对齐、对账共变算子、健康证据链与实体助手

- 新增标准业务实体(CanonicalEntity)模型、确定性跨源编码翻译、后台候选实体扫描与文档驱动实体智能助手
- 新增指标本体图谱(factor / reconciles_with / upstream_driver)、DAG 防环校验以及 ontology_neighbors / source_health 内置工具
- 新增跨源对账(analysis_reconcile)与滞后共变(analysis_cochange)分析算子,打通 [[h:H1]] 数据源健康证据链、报告导出与本体消融评测
- 数据目录新增「标准业务实体」视图与候选审阅工作台,口径页集成指标本体拓扑面板与端到端浏览器检查
This commit is contained in:
ThearchyHelios
2026-11-12 12:57:53 +08:00
parent 2f90f0eb3a
commit 8d9a712eae
106 changed files with 16654 additions and 295 deletions
+5 -2
View File
@@ -401,7 +401,8 @@ function AnalysisItemList({ nodeId, value, issues, onChange }: {
</div>
)
}
const specs = op ? paramSpecs(op, item.mode).filter((p) => !(two && TWO_QUERY_SKIP.has(p.key))) : []
const skipTwoPeriods = two && op !== 'cochange'
const specs = op ? paramSpecs(op, item.mode).filter((p) => !(skipTwoPeriods && TWO_QUERY_SKIP.has(p.key))) : []
const headline = params.headline && typeof params.headline === 'object' ? params.headline as Record<string, string> : null
const setHeadline = (side: 'base' | 'target', t: string) => {
const next = { base: headline?.base ?? '', target: headline?.target ?? '', [side]: t.trim() }
@@ -412,7 +413,9 @@ function AnalysisItemList({ nodeId, value, issues, onChange }: {
if (on) {
next.base_query = item.from ?? ''
next.target_query = ''
for (const k of TWO_QUERY_SKIP) delete next[k]
if (op !== 'cochange') {
for (const k of TWO_QUERY_SKIP) delete next[k]
}
update(i, { ...item, from: undefined, params: next })
} else {
const from = typeof next.base_query === 'string' ? next.base_query : ''
+8 -2
View File
@@ -47,11 +47,17 @@ export function paramSpecs(op: AnalysisOp, mode?: string | null): ParamSpec[] {
}
case 'comparable':
return [...PERIODS, col('measure'), { key: 'grain', kind: 'grain' }]
case 'reconcile':
return [cols('by'), cols('target_by'), col('measure'), col('target_measure'), val('unit_factor'), val('label')]
case 'cochange':
return [col('period'), col('target_period'), col('measure'), col('driver_measure'), val('target'),
{ key: 'basis', kind: 'basis' }, { key: 'grain', kind: 'grain' }, { key: 'lag', kind: 'int' }, val('label')]
}
}
/** 这种分析能不能写成基期、本期两份查询(DecomposeArgs、ComparableArgs 有 base_query / target_query) */
export const allowsTwoQueries = (op: AnalysisOp): boolean => op === 'decompose' || op === 'comparable'
/** 这种分析能不能写成两份查询(DecomposeArgs、ComparableArgs、ReconcileArgs、CochangeArgs 有 base_query / target_query) */
export const allowsTwoQueries = (op: AnalysisOp): boolean =>
op === 'decompose' || op === 'comparable' || op === 'reconcile' || op === 'cochange'
/** 有总数核对(headline)的:可加、比率的变化拆解 */
export const allowsHeadline = (op: AnalysisOp, mode?: string | null): boolean =>
op === 'decompose' && mode !== 'factor'