# 数据清洗系统配置文件 # 通过 source 切换:json(开发) / db(生产-达梦) source: json # 开发用 json;部署达梦时改为 db(或直接改 config.json) # JSON 文件模式(source=json 时生效) json: input_file: data/raw_data_sample.json output_file: data/nodes.json report_file: report/detailed_cleaning_report.json # 网络关系/效能评估读取路径(main_227 在清洗后加载) eval: nodes_file: data/nodes.json # 与 json.output_file 一致(清洗输出) triples_file: data/triples.json # 与 triplet.output_file 一致(run_all 输出) # 三元组(run_all 时一并处理;db 模式从库读,json 模式可配 input_file) triplet: enabled: true # false 可关闭三元组处理 input_file: null # json 模式下可选,如 data/triplets_raw.json output_file: data/triples.json # 与 eval.triples_file 一致,便于 main_227 直接读取 report_file: report/triplet_cleaning_report.json # 清洗配置:clean: false 关闭清洗;true 使用默认;或自定义子项 clean: deduplicate: true # 按 (HEAD_ID, RELATION_TYPE, TAIL_ID) 去重 remove_null_core: true # 移除 HEAD_ID/TAIL_ID/RELATION_TYPE 为空的记录 normalize_relation_type: true # 规范化 RELATION_TYPE(去空格) filter_orphans: false # 过滤悬空引用(需加载实体表,稍慢) # 达梦数据库模式(source=db 时生效) # 密码通过环境变量 DM_PASSWORD 传入,切勿写入配置文件 db: host: 127.0.0.1 port: 5080 user: SYSDBA schema: SYSDBA # OBJECTIVE_INSTANCE 表结构与 raw_data_sample.json 一致,直接查询即可 table: OBJECTIVE_INSTANCE query: null # 三元组表(RELATION_INSTANCE: HEAD_ID, RELATION_TYPE, TAIL_ID) triplet_table: RELATION_INSTANCE triplet_query: null # 可选:自定义 SQL # 模块1.3 形式化入库流程(source=db 时生效) formal: enabled: false user_id: ADMIN task_id: TASK_FULL_KB source_sys_type: 关系推理后的体系 target_sys_type: 形式化后的体系 # 推荐:显式 SQL 只读「关系推理后的体系」,列名与库一致时最稳(为 null 则用下方列名拼 WHERE) source_query: null user_column: USER_ID task_column: TASK_ID sys_type_column: SYS_TYPE skip_sys_type_validation: false entity_id_column: TARGET_ID objective_table: OBJECTIVE_INSTANCE triplet_table: RELATION_INSTANCE triplet_primary_key: RELATION_INSTANCE_ID triplet_omit_primary_key_on_insert: true triple_batch_column: BATCH_ID attribute_table: METRIC_VALUE_INSTANCE metric_id_column: METRIC_ID metric_value_column: METRIC_VALUE metric_insert_static: null formal_result_table: RELATION_INSTANCE analysis_table: RES_FORMAL_ANALYSIS # 若自动匹配列失败,在此列出 RES_FORMAL_ANALYSIS 的实际列名(顺序与 VALUES 一致) analysis_insert_columns: null analysis_static_columns: null rules_summary: null required_attrs: - f_IC - f_IA - f_CS - f_IT - f_DP - f_CPS - f_CC - position - effective_radius - response_time - cycle_time - data_age - time_window - core_performance - survivability - mtbf - protocol_list - format_list - interface_list - security_level - org_unit - nation - history_success