@liuhange/dsh-data-asset-shared 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/business-rules.json +371 -0
- package/config/policy-references.json +161 -0
- package/lib/configLoader.js +20 -0
- package/lib/index.js +1 -0
- package/lib/types/configLoader.d.ts +2 -0
- package/lib/types/index.d.ts +1 -0
- package/package.json +48 -42
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.0",
|
|
3
|
+
"lastUpdated": "2026-08-21",
|
|
4
|
+
"valueAssessment": {
|
|
5
|
+
"highValue": {
|
|
6
|
+
"keywords": ["供应链", "销售明细", "设备工况", "交易流水"],
|
|
7
|
+
"score": 5,
|
|
8
|
+
"label": "★★★★★",
|
|
9
|
+
"recommendation": "优先交易,建议入表"
|
|
10
|
+
},
|
|
11
|
+
"mediumValue": {
|
|
12
|
+
"keywords": ["用户行为", "产品数据", "行业报告"],
|
|
13
|
+
"score": 3,
|
|
14
|
+
"label": "★★★",
|
|
15
|
+
"recommendation": "脱敏后交易"
|
|
16
|
+
},
|
|
17
|
+
"lowValue": {
|
|
18
|
+
"keywords": ["日志", "备份", "临时"],
|
|
19
|
+
"score": 1,
|
|
20
|
+
"label": "★",
|
|
21
|
+
"recommendation": "评估处理成本"
|
|
22
|
+
},
|
|
23
|
+
"defaultValue": {
|
|
24
|
+
"score": 3,
|
|
25
|
+
"label": "★★★",
|
|
26
|
+
"recommendation": "需进一步评估"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"sensitivePatterns": {
|
|
30
|
+
"idCard": {
|
|
31
|
+
"pattern": "[1-9]\\d{5}(18|19|20)?\\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])\\d{3}[\\dXx]",
|
|
32
|
+
"level": "FULL"
|
|
33
|
+
},
|
|
34
|
+
"phone": {
|
|
35
|
+
"pattern": "1[3-9]\\d{9}",
|
|
36
|
+
"level": "PARTIAL"
|
|
37
|
+
},
|
|
38
|
+
"bankCard": {
|
|
39
|
+
"pattern": "[1-9]\\d{15,18}",
|
|
40
|
+
"level": "PARTIAL"
|
|
41
|
+
},
|
|
42
|
+
"email": {
|
|
43
|
+
"pattern": "[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}",
|
|
44
|
+
"level": "PARTIAL"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"maskingLevels": {
|
|
48
|
+
"FULL": {
|
|
49
|
+
"description": "完全匿名化",
|
|
50
|
+
"applyTo": ["idCard"]
|
|
51
|
+
},
|
|
52
|
+
"PARTIAL": {
|
|
53
|
+
"description": "假名化,保留前3后4",
|
|
54
|
+
"applyTo": ["phone", "bankCard"]
|
|
55
|
+
},
|
|
56
|
+
"GENERALIZE": {
|
|
57
|
+
"description": "泛化处理",
|
|
58
|
+
"applyTo": ["email"]
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"cleaningRules": {
|
|
62
|
+
"missingValueStrategy": {
|
|
63
|
+
"government": "interpolation",
|
|
64
|
+
"financial": "manual_review",
|
|
65
|
+
"behavior": "mode_fill"
|
|
66
|
+
},
|
|
67
|
+
"qualityThreshold": {
|
|
68
|
+
"A": { "missingRate": 0.05, "errorRate": 0.01, "label": "优秀" },
|
|
69
|
+
"B": { "missingRate": 0.10, "errorRate": 0.03, "label": "良好" },
|
|
70
|
+
"C": { "missingRate": 0.20, "errorRate": 0.05, "label": "合格" },
|
|
71
|
+
"D": { "missingRate": 0.20, "errorRate": 0.05, "label": "不合格", "action": "不建议交易" }
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"compliance": {
|
|
75
|
+
"policies": [
|
|
76
|
+
{ "name": "数据产权登记工作指引", "doc": "国数综政策〔2026〕35号", "check": "数据来源可登记" },
|
|
77
|
+
{ "name": "数据流通安全治理", "doc": "发改数据〔2025〕18号", "check": "来源合法性" },
|
|
78
|
+
{ "name": "数据脱敏工具标准", "doc": "YD/T 6225-2024", "check": "脱敏效果达标" }
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
"packaging": {
|
|
82
|
+
"complianceStatements": [
|
|
83
|
+
"本数据产品已完成脱敏处理",
|
|
84
|
+
"不包含个人身份信息",
|
|
85
|
+
"数据来源合法",
|
|
86
|
+
"建议交易前完成数据产权登记"
|
|
87
|
+
],
|
|
88
|
+
"pricingRules": [
|
|
89
|
+
{ "valueLevel": "★★★★★", "suggestion": "根据数据质量、稀缺性和应用场景综合定价,建议高价交易" },
|
|
90
|
+
{ "valueLevel": "★★★★", "suggestion": "根据数据质量和应用场景定价,建议中高价交易" },
|
|
91
|
+
{ "valueLevel": "★★★", "suggestion": "根据数据质量和应用场景综合定价" },
|
|
92
|
+
{ "valueLevel": "★★", "suggestion": "建议低价交易或内部使用" },
|
|
93
|
+
{ "valueLevel": "★", "suggestion": "建议评估处理成本后决定是否交易" }
|
|
94
|
+
],
|
|
95
|
+
"defaultDescription": "适用于数据分析、模型训练、行业研究等场景",
|
|
96
|
+
"version": "V1.0"
|
|
97
|
+
},
|
|
98
|
+
"qualityScoring": {
|
|
99
|
+
"weights": {
|
|
100
|
+
"completeness": 0.25,
|
|
101
|
+
"accuracy": 0.25,
|
|
102
|
+
"consistency": 0.25,
|
|
103
|
+
"timeliness": 0.25
|
|
104
|
+
},
|
|
105
|
+
"thresholds": {
|
|
106
|
+
"completeness": 60,
|
|
107
|
+
"accuracy": 60,
|
|
108
|
+
"consistency": 60,
|
|
109
|
+
"timeliness": 60
|
|
110
|
+
},
|
|
111
|
+
"completeness": {
|
|
112
|
+
"missingMarkers": ["null", "undefined", "N/A", "", "NULL", "NaN"]
|
|
113
|
+
},
|
|
114
|
+
"accuracy": {
|
|
115
|
+
"formatRules": [
|
|
116
|
+
{ "fieldName": "phone", "pattern": "1[3-9]\\d{9}", "weight": 0.5 },
|
|
117
|
+
{ "fieldName": "email", "pattern": "[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}", "weight": 0.5 }
|
|
118
|
+
],
|
|
119
|
+
"domainRules": [
|
|
120
|
+
{ "fieldName": "age", "min": 0, "max": 150, "weight": 0.5 },
|
|
121
|
+
{ "fieldName": "score", "min": 0, "max": 100, "weight": 0.5 }
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
"consistency": {
|
|
125
|
+
"crossFieldRules": [
|
|
126
|
+
{ "name": "endDateAfterStartDate", "fields": ["startDate", "endDate"], "constraint": "after" },
|
|
127
|
+
{ "name": "priceNonNegative", "fields": ["price"], "constraint": "greaterThan", "value": 0 }
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
"timeliness": {
|
|
131
|
+
"timestampField": "updatedAt",
|
|
132
|
+
"freshnessThresholdHours": 720
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"lineage": {
|
|
136
|
+
"enabled": false,
|
|
137
|
+
"storagePath": "lineage",
|
|
138
|
+
"hashAlgorithm": "SHA-256"
|
|
139
|
+
},
|
|
140
|
+
"advancedMasking": {
|
|
141
|
+
"defaultAlgorithm": "hash",
|
|
142
|
+
"fieldAlgorithms": {},
|
|
143
|
+
"fpe": {
|
|
144
|
+
"key": "${FPE_KEY}",
|
|
145
|
+
"radix": 10
|
|
146
|
+
},
|
|
147
|
+
"kAnonymity": {
|
|
148
|
+
"kValue": 2,
|
|
149
|
+
"quasiIdentifiers": ["zipCode", "age", "gender"]
|
|
150
|
+
},
|
|
151
|
+
"differentialPrivacy": {
|
|
152
|
+
"epsilon": 1.0,
|
|
153
|
+
"totalBudget": 5.0,
|
|
154
|
+
"sensitivity": 1.0
|
|
155
|
+
},
|
|
156
|
+
"hash": {
|
|
157
|
+
"algorithm": "SHA-256",
|
|
158
|
+
"salt": "${HASH_SALT}"
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"visualization": {
|
|
162
|
+
"charts": {
|
|
163
|
+
"bar": { "enabled": true, "title": "脱敏统计" },
|
|
164
|
+
"comparison": { "enabled": true, "title": "清洗前后对比" },
|
|
165
|
+
"pie": { "enabled": true, "title": "数据资产分布" },
|
|
166
|
+
"radar": { "enabled": true, "title": "质量评分" },
|
|
167
|
+
"flowchart": { "enabled": true, "title": "血缘追踪" }
|
|
168
|
+
},
|
|
169
|
+
"layout": {
|
|
170
|
+
"columns": 2,
|
|
171
|
+
"responsive": true
|
|
172
|
+
},
|
|
173
|
+
"colorScheme": {
|
|
174
|
+
"primary": "#4A90D9",
|
|
175
|
+
"secondary": "#F5A623",
|
|
176
|
+
"success": "#7ED321",
|
|
177
|
+
"warning": "#F8E71C",
|
|
178
|
+
"danger": "#D0021B",
|
|
179
|
+
"background": "#F5F5F5",
|
|
180
|
+
"text": "#333333"
|
|
181
|
+
},
|
|
182
|
+
"interactions": {
|
|
183
|
+
"expandCollapse": true,
|
|
184
|
+
"chartSwitch": true,
|
|
185
|
+
"tooltip": true
|
|
186
|
+
},
|
|
187
|
+
"templateVersion": "1.0"
|
|
188
|
+
},
|
|
189
|
+
"sensitivityClassification": {
|
|
190
|
+
"fieldNameRules": [
|
|
191
|
+
{ "name": "idCard", "pattern": "id_?card|身份证|identity", "level": "Secret" },
|
|
192
|
+
{ "name": "phone", "pattern": "phone|手机|mobile|tel", "level": "Confidential" },
|
|
193
|
+
{ "name": "email", "pattern": "email|邮箱|mail", "level": "Confidential" },
|
|
194
|
+
{ "name": "bankCard", "pattern": "bank_?card|银行卡|account", "level": "Secret" },
|
|
195
|
+
{ "name": "address", "pattern": "address|地址|addr", "level": "Internal" },
|
|
196
|
+
{ "name": "name", "pattern": "^name$|姓名|username", "level": "Internal" },
|
|
197
|
+
{ "name": "public", "pattern": "status|type|category|label|tag|level", "level": "Public" }
|
|
198
|
+
],
|
|
199
|
+
"fieldValueRules": [
|
|
200
|
+
{ "name": "idCardValue", "pattern": "[1-9]\\d{5}(18|19|20)?\\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])\\d{3}[\\dXx]", "level": "Secret" },
|
|
201
|
+
{ "name": "phoneValue", "pattern": "1[3-9]\\d{9}", "level": "Confidential" },
|
|
202
|
+
{ "name": "emailValue", "pattern": "[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}", "level": "Confidential" },
|
|
203
|
+
{ "name": "bankCardValue", "pattern": "[1-9]\\d{15,18}", "level": "Secret" }
|
|
204
|
+
],
|
|
205
|
+
"levelMapping": {
|
|
206
|
+
"Public": "none",
|
|
207
|
+
"Internal": "partial",
|
|
208
|
+
"Confidential": "full",
|
|
209
|
+
"Secret": "encrypt"
|
|
210
|
+
},
|
|
211
|
+
"defaultLevel": "Internal"
|
|
212
|
+
},
|
|
213
|
+
"incrementalScheduling": {
|
|
214
|
+
"incrementalMode": false,
|
|
215
|
+
"cronExpression": "0 2 * * *",
|
|
216
|
+
"hashAlgorithm": "SHA-256",
|
|
217
|
+
"watchDirectory": "input",
|
|
218
|
+
"stateFilePath": "state/incremental-state.json",
|
|
219
|
+
"lockTimeout": 3600
|
|
220
|
+
},
|
|
221
|
+
"inventoryScan": {
|
|
222
|
+
"assetTripleCondition": {
|
|
223
|
+
"pastTransactionKeywords": ["交易", "采购", "采集", "生成", "购买", "合同", "协议", "业务", "系统"],
|
|
224
|
+
"ownershipControlKeywords": ["自有", "拥有", "控制", "授权", "委托", "归属", "产权", "经营"],
|
|
225
|
+
"economicBenefitKeywords": ["收益", "价值", "变现", "交易", "赋能", "增值", "利润", "成本", "经济"]
|
|
226
|
+
},
|
|
227
|
+
"ownershipClueRules": {
|
|
228
|
+
"holdingRightFields": ["sourceSystem", "acquisitionMethod", "contractNumber", "owner"],
|
|
229
|
+
"usageRightFields": ["usageScope", "licenseType", "authorizedUsers", "usageDuration"],
|
|
230
|
+
"operationRightFields": ["productType", "saleChannel", "pricingModel", "commercialUse"]
|
|
231
|
+
},
|
|
232
|
+
"scanScaleLimit": 10000,
|
|
233
|
+
"sensitiveKeywords": ["密码", "密钥", "token", "secret", "credential", "privateKey"]
|
|
234
|
+
},
|
|
235
|
+
"qualityScoringExtended": {
|
|
236
|
+
"weights": {
|
|
237
|
+
"normality": 0.15,
|
|
238
|
+
"completeness": 0.20,
|
|
239
|
+
"accuracy": 0.20,
|
|
240
|
+
"consistency": 0.15,
|
|
241
|
+
"timeliness": 0.15,
|
|
242
|
+
"accessibility": 0.15
|
|
243
|
+
},
|
|
244
|
+
"thresholds": {
|
|
245
|
+
"normality": 60,
|
|
246
|
+
"completeness": 60,
|
|
247
|
+
"accuracy": 60,
|
|
248
|
+
"consistency": 60,
|
|
249
|
+
"timeliness": 60,
|
|
250
|
+
"accessibility": 60
|
|
251
|
+
},
|
|
252
|
+
"normality": {
|
|
253
|
+
"fieldNamePattern": "^[a-z][a-zA-Z0-9_]*$",
|
|
254
|
+
"requiredFields": ["id", "name", "createdAt", "updatedAt"]
|
|
255
|
+
},
|
|
256
|
+
"accessibility": {
|
|
257
|
+
"readTimeoutMs": 5000,
|
|
258
|
+
"minAccessibleRate": 0.95
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
"valuation": {
|
|
262
|
+
"costBased": {
|
|
263
|
+
"costCategories": ["acquisition", "processing", "storage", "maintenance", "labor", "infrastructure"],
|
|
264
|
+
"depreciationYears": 5,
|
|
265
|
+
"depreciationMethod": "straight-line"
|
|
266
|
+
},
|
|
267
|
+
"incomeBased": {
|
|
268
|
+
"defaultDiscountRate": 0.08,
|
|
269
|
+
"defaultScenarioYears": 3,
|
|
270
|
+
"scenarioTemplates": ["direct_sale", "subscription", "api_call", "data_sharing", "analytics_service"]
|
|
271
|
+
},
|
|
272
|
+
"pricingReference": {
|
|
273
|
+
"valueLevelThresholds": {
|
|
274
|
+
"high": 80,
|
|
275
|
+
"medium": 60,
|
|
276
|
+
"low": 40
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
"capitalizationTraceGuard": {
|
|
280
|
+
"enabled": true,
|
|
281
|
+
"policyRef": "财会〔2025〕33号",
|
|
282
|
+
"rule": "不得以评估等方式得出的金额直接作为入账和调账的依据",
|
|
283
|
+
"warningMessage": "评估值仅供参考,不得直接作为入账依据。依据:《关于严格执行企业会计准则切实做好企业2025年年报工作的通知》(财会〔2025〕33号)——不得将以评估等方式得出的金额直接作为入账和调账的依据。"
|
|
284
|
+
},
|
|
285
|
+
"costReliabilityMeasurement": {
|
|
286
|
+
"enabled": true,
|
|
287
|
+
"policyRef": "财会〔2023〕11号",
|
|
288
|
+
"reliabilityLevels": ["high", "medium", "low"],
|
|
289
|
+
"criteria": {
|
|
290
|
+
"high": "有完整凭证链,成本可直接追溯至原始发票/合同",
|
|
291
|
+
"medium": "有部分凭证,成本经合理分摊计算",
|
|
292
|
+
"low": "成本为估算值,缺乏完整凭证"
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
"complianceCheck": {
|
|
297
|
+
"sourceRules": [
|
|
298
|
+
{ "id": "SRC_001", "condition": "数据来源须有合同或协议", "lawRef": "数据安全法第八条", "compliant": true },
|
|
299
|
+
{ "id": "SRC_002", "condition": "采集方式须明示告知", "lawRef": "个人信息保护法第十四条", "compliant": true },
|
|
300
|
+
{ "id": "SRC_003", "condition": "不得非法获取他人数据", "lawRef": "数据安全法第八条", "compliant": true }
|
|
301
|
+
],
|
|
302
|
+
"processingRules": [
|
|
303
|
+
{ "id": "PRC_001", "condition": "加工不得超出授权范围", "lawRef": "个人信息保护法第十三条", "compliant": true },
|
|
304
|
+
{ "id": "PRC_002", "condition": "个人信息须脱敏处理", "lawRef": "个人信息保护法第五十一条", "compliant": true }
|
|
305
|
+
],
|
|
306
|
+
"usageRules": [
|
|
307
|
+
{ "id": "USE_001", "condition": "使用不得超出约定场景", "lawRef": "数据安全法第八条", "compliant": true },
|
|
308
|
+
{ "id": "USE_002", "condition": "脱敏后可按一般数据流通", "lawRef": "发改数据〔2025〕18号", "compliant": true }
|
|
309
|
+
],
|
|
310
|
+
"personalInfoMinimizeFields": ["idCard", "phone", "bankCard", "email", "address", "name", "birthDate"],
|
|
311
|
+
"pilotPolicyReference": {
|
|
312
|
+
"enabled": true,
|
|
313
|
+
"policyName": "数据资产全过程管理试点方案",
|
|
314
|
+
"policyRef": "财资〔2024〕167号",
|
|
315
|
+
"keyPoints": ["台账编制", "登记", "授权运营", "收益分配", "交易流通"],
|
|
316
|
+
"embedMessage": "依据:《数据资产全过程管理试点方案》(财资〔2024〕167号)——围绕数据资产台账编制、登记、授权运营、收益分配、交易流通等重点环节开展试点。"
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
"registration": {
|
|
320
|
+
"rules": {
|
|
321
|
+
"disallowedScenarios": [
|
|
322
|
+
{ "id": "DIS_001", "label": "危害国家安全", "keywords": ["国家安全", "机密", "涉密"] },
|
|
323
|
+
{ "id": "DIS_002", "label": "来源违反法律法规", "keywords": ["非法", "窃取", "违规采集"] },
|
|
324
|
+
{ "id": "DIS_003", "label": "权属纠纷未解决", "keywords": ["纠纷", "争议", "诉讼"] },
|
|
325
|
+
{ "id": "DIS_004", "label": "隐瞒真实情况", "keywords": ["隐瞒", "虚假", "欺诈"] }
|
|
326
|
+
]
|
|
327
|
+
},
|
|
328
|
+
"agencies": {
|
|
329
|
+
"mode": "local",
|
|
330
|
+
"httpEndpoints": {
|
|
331
|
+
"beijing": { "url": "https://sjcqdj.nda.gov.cn/api/beijing", "apiKey": "${REG_BJ_API_KEY}" },
|
|
332
|
+
"shanghai": { "url": "https://sjcqdj.nda.gov.cn/api/shanghai", "apiKey": "${REG_SH_API_KEY}" },
|
|
333
|
+
"shenzhen": { "url": "https://sjcqdj.nda.gov.cn/api/shenzhen", "apiKey": "${REG_SZ_API_KEY}" }
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
"nationalSystem": {
|
|
337
|
+
"url": "https://sjcqdj.nda.gov.cn",
|
|
338
|
+
"apiKey": "${NATIONAL_REG_API_KEY}",
|
|
339
|
+
"timeoutMs": 10000
|
|
340
|
+
},
|
|
341
|
+
"tripleAuditStandard": {
|
|
342
|
+
"enabled": true,
|
|
343
|
+
"standards": ["数据描述准确性", "数据来源合规性", "数据产权明确性"],
|
|
344
|
+
"policyRef": "国数综政策〔2026〕35号",
|
|
345
|
+
"promptMessage": "登记审查重点为三重审核标准:①数据描述准确性 ②数据来源合规性 ③数据产权明确性。依据:《数据产权登记工作指引(试行)》(国数综政策〔2026〕35号)。"
|
|
346
|
+
},
|
|
347
|
+
"sevenStepFlow": {
|
|
348
|
+
"enabled": true,
|
|
349
|
+
"steps": [
|
|
350
|
+
{ "step": 1, "name": "申请", "durationDays": null },
|
|
351
|
+
{ "step": 2, "name": "受理", "durationDays": 3 },
|
|
352
|
+
{ "step": 3, "name": "审查", "durationDays": null },
|
|
353
|
+
{ "step": 4, "name": "公示", "durationDays": 5 },
|
|
354
|
+
{ "step": 5, "name": "异议处理", "durationDays": 10 },
|
|
355
|
+
{ "step": 6, "name": "信息存证", "durationDays": null },
|
|
356
|
+
{ "step": 7, "name": "凭证核发", "durationDays": null }
|
|
357
|
+
],
|
|
358
|
+
"policyRef": "国数综政策〔2026〕35号"
|
|
359
|
+
},
|
|
360
|
+
"allowedAgencies": ["beijing", "shanghai", "shenzhen"],
|
|
361
|
+
"maxAgencyCount": 3,
|
|
362
|
+
"onlineDate": "2026-09-11"
|
|
363
|
+
},
|
|
364
|
+
"pluginRoles": {
|
|
365
|
+
"data-asset-inventory-scan": "入表资格初筛工具——专注判断哪些数据具备入表资格",
|
|
366
|
+
"data-asset-quality-score": "质量审计工具——输出物可直接提交给审计机构作为质量依据",
|
|
367
|
+
"data-asset-valuation": "估值底稿自动化生成器——注重成本能够可靠计量的要求",
|
|
368
|
+
"data-asset-compliance-check": "合规预检工具——让企业先自查再找律师出正式意见",
|
|
369
|
+
"data-asset-registration-helper": "材料生成器——材料准备环节最适合工具化"
|
|
370
|
+
}
|
|
371
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
{
|
|
2
|
+
"configVersion": "1.0",
|
|
3
|
+
"policyReferences": [
|
|
4
|
+
{
|
|
5
|
+
"stage": "INVENTORY",
|
|
6
|
+
"stageLabel": "盘点",
|
|
7
|
+
"documents": [
|
|
8
|
+
{
|
|
9
|
+
"name": "中华人民共和国数据安全法",
|
|
10
|
+
"docNumber": "主席令第八十四号",
|
|
11
|
+
"coreRequirement": "数据分类分级保护"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "数据产权登记工作指引(试行)",
|
|
15
|
+
"docNumber": "国数综政策〔2026〕35号",
|
|
16
|
+
"coreRequirement": "数据产权三权分置"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"stage": "CLEANING",
|
|
22
|
+
"stageLabel": "清洗",
|
|
23
|
+
"documents": [
|
|
24
|
+
{
|
|
25
|
+
"name": "企业数据资源相关会计处理暂行规定",
|
|
26
|
+
"docNumber": "财会〔2023〕11号",
|
|
27
|
+
"coreRequirement": "数据资源入表条件"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "数据资产评估指导意见",
|
|
31
|
+
"docNumber": "中评协〔2023〕17号",
|
|
32
|
+
"coreRequirement": "六维质量评价标准"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"stage": "MASKING",
|
|
38
|
+
"stageLabel": "脱敏",
|
|
39
|
+
"documents": [
|
|
40
|
+
{
|
|
41
|
+
"name": "中华人民共和国个人信息保护法",
|
|
42
|
+
"docNumber": "主席令第九十一号",
|
|
43
|
+
"coreRequirement": "匿名化后不再属于个人信息"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "关于完善数据流通安全治理的实施方案",
|
|
47
|
+
"docNumber": "发改数据〔2025〕18号",
|
|
48
|
+
"coreRequirement": "脱敏后可按一般数据流通"
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"stage": "PACKAGING",
|
|
54
|
+
"stageLabel": "包装",
|
|
55
|
+
"documents": [
|
|
56
|
+
{
|
|
57
|
+
"name": "数据产权登记工作指引(试行)",
|
|
58
|
+
"docNumber": "国数综政策〔2026〕35号",
|
|
59
|
+
"coreRequirement": "登记凭证可用于入表、融资、入股"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"stage": "PRECHECK",
|
|
65
|
+
"stageLabel": "登记预检",
|
|
66
|
+
"documents": [
|
|
67
|
+
{
|
|
68
|
+
"name": "数据产权登记工作指引(试行)",
|
|
69
|
+
"docNumber": "国数综政策〔2026〕35号",
|
|
70
|
+
"coreRequirement": "不予登记情形"
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"stage": "DOC_GENERATION",
|
|
76
|
+
"stageLabel": "材料生成",
|
|
77
|
+
"documents": [
|
|
78
|
+
{
|
|
79
|
+
"name": "数据产权登记工作指引(试行)",
|
|
80
|
+
"docNumber": "国数综政策〔2026〕35号",
|
|
81
|
+
"coreRequirement": "7步登记流程审查重点"
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"stage": "AGENCY_MATCHING",
|
|
87
|
+
"stageLabel": "机构匹配",
|
|
88
|
+
"documents": [
|
|
89
|
+
{
|
|
90
|
+
"name": "数据产权登记工作指引(试行)",
|
|
91
|
+
"docNumber": "国数综政策〔2026〕35号",
|
|
92
|
+
"coreRequirement": "登记机构名录"
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"stage": "INVENTORY_SCAN",
|
|
98
|
+
"stageLabel": "资产扫描",
|
|
99
|
+
"documents": [
|
|
100
|
+
{
|
|
101
|
+
"name": "企业数据资源相关会计处理暂行规定",
|
|
102
|
+
"docNumber": "财会〔2023〕11号",
|
|
103
|
+
"coreRequirement": "数据资源需满足企业合法拥有或控制、预期会给企业带来经济利益的条件,才能确认为无形资产或存货"
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"stage": "QUALITY_SCORE",
|
|
109
|
+
"stageLabel": "质量评分",
|
|
110
|
+
"documents": [
|
|
111
|
+
{
|
|
112
|
+
"name": "信息技术 数据质量评价指标",
|
|
113
|
+
"docNumber": "GB/T 36344-2018",
|
|
114
|
+
"coreRequirement": "数据质量评价指标框架,含规范性、完整性、准确性、一致性、时效性、可访问性六维"
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"stage": "VALUATION",
|
|
120
|
+
"stageLabel": "估值辅助",
|
|
121
|
+
"documents": [
|
|
122
|
+
{
|
|
123
|
+
"name": "关于加强数据资产管理的指导意见",
|
|
124
|
+
"docNumber": "财资〔2023〕141号",
|
|
125
|
+
"coreRequirement": "推进数据资产全过程管理以及合规化、标准化、增值化,支持数据资产赋能增值"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": "企业数据资源相关会计处理暂行规定",
|
|
129
|
+
"docNumber": "财会〔2023〕11号",
|
|
130
|
+
"coreRequirement": "外购数据资源的成本包括购买价款、相关税费以及直接归属于使该项无形资产达到预定用途所发生的加工支出"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"name": "关于严格执行企业会计准则切实做好企业2025年年报工作的通知",
|
|
134
|
+
"docNumber": "财会〔2025〕33号",
|
|
135
|
+
"coreRequirement": "不得将以评估等方式得出的金额直接作为入账和调账的依据;强化减值测试和披露"
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"stage": "COMPLIANCE_CHECK",
|
|
141
|
+
"stageLabel": "合规审查",
|
|
142
|
+
"documents": [
|
|
143
|
+
{
|
|
144
|
+
"name": "中华人民共和国数据安全法",
|
|
145
|
+
"docNumber": "主席令第八十四号",
|
|
146
|
+
"coreRequirement": "开展数据处理活动应当遵守法律法规,履行数据安全保护义务,不得危害国家安全和公共利益"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": "中华人民共和国个人信息保护法",
|
|
150
|
+
"docNumber": "主席令第九十一号",
|
|
151
|
+
"coreRequirement": "处理个人信息应当遵循合法、正当、必要原则,取得个人同意或符合法定情形"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"name": "数据资产全过程管理试点方案",
|
|
155
|
+
"docNumber": "财资〔2024〕167号",
|
|
156
|
+
"coreRequirement": "围绕数据资产台账编制、登记、授权运营、收益分配、交易流通等重点环节开展试点"
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { readFileSync, existsSync } from 'node:fs';
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
export function loadJsonConfig(envVar, localPath, sharedPackagePath) {
|
|
4
|
+
const envPath = process.env[envVar];
|
|
5
|
+
if (envPath && existsSync(envPath)) {
|
|
6
|
+
return JSON.parse(readFileSync(envPath, 'utf-8'));
|
|
7
|
+
}
|
|
8
|
+
if (existsSync(localPath)) {
|
|
9
|
+
return JSON.parse(readFileSync(localPath, 'utf-8'));
|
|
10
|
+
}
|
|
11
|
+
try {
|
|
12
|
+
const req = createRequire(import.meta.url);
|
|
13
|
+
const resolved = req.resolve(sharedPackagePath);
|
|
14
|
+
return JSON.parse(readFileSync(resolved, 'utf-8'));
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
throw new Error(`CONFIG_NOT_FOUND: tried ${envVar}, ${localPath}, ${sharedPackagePath}`);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=configLoader.js.map
|
package/lib/index.js
CHANGED
|
@@ -2,6 +2,7 @@ export * from './types.js';
|
|
|
2
2
|
export { defaultBusinessRules } from './defaultBusinessRules.js';
|
|
3
3
|
export { defaultQualityScoringConfig, defaultLineageConfig, defaultAdvancedMaskingConfig, defaultVisualizationConfig, defaultSensitivityClassificationConfig, defaultIncrementalSchedulingConfig, } from './defaultBusinessRules.js';
|
|
4
4
|
export { BusinessRulesLoader } from './businessRulesLoader.js';
|
|
5
|
+
export { loadJsonConfig } from './configLoader.js';
|
|
5
6
|
export { FileFormatAdapter } from './fileFormatAdapter.js';
|
|
6
7
|
export { ReportGenerator } from './reportGenerator.js';
|
|
7
8
|
export { PathValidator } from './pathValidator.js';
|
package/lib/types/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from './types.js';
|
|
|
2
2
|
export { defaultBusinessRules } from './defaultBusinessRules.js';
|
|
3
3
|
export { defaultQualityScoringConfig, defaultLineageConfig, defaultAdvancedMaskingConfig, defaultVisualizationConfig, defaultSensitivityClassificationConfig, defaultIncrementalSchedulingConfig, } from './defaultBusinessRules.js';
|
|
4
4
|
export { BusinessRulesLoader } from './businessRulesLoader.js';
|
|
5
|
+
export { loadJsonConfig } from './configLoader.js';
|
|
5
6
|
export { FileFormatAdapter } from './fileFormatAdapter.js';
|
|
6
7
|
export type { FileReadResult } from './fileFormatAdapter.js';
|
|
7
8
|
export { ReportGenerator } from './reportGenerator.js';
|
package/package.json
CHANGED
|
@@ -1,46 +1,52 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name":
|
|
3
|
-
"description":
|
|
4
|
-
"version": "3.
|
|
5
|
-
"publishConfig":
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"repository":
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"type":
|
|
14
|
-
"main":
|
|
15
|
-
"types":
|
|
16
|
-
"exports":
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"files":
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
2
|
+
"name": "@liuhange/dsh-data-asset-shared",
|
|
3
|
+
"description": "Shared infrastructure for data assetization plugins: business rules loader, file format adapter, report generator, path validator, audit logger",
|
|
4
|
+
"version": "3.1.0",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/liuhange789/data-asset-inspector.git",
|
|
11
|
+
"directory": "packages/data-asset/data-asset-shared"
|
|
12
|
+
},
|
|
13
|
+
"type": "module",
|
|
14
|
+
"main": "lib/index.js",
|
|
15
|
+
"types": "lib/types/index.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./lib/types/index.d.ts",
|
|
19
|
+
"default": "./lib/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./invariant": {
|
|
22
|
+
"types": "./lib/types/invariant.d.ts",
|
|
23
|
+
"default": "./lib/invariant.js"
|
|
24
|
+
},
|
|
25
|
+
"./src/*": "./src/*",
|
|
26
|
+
"./package.json": "./package.json"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"lib/**/*.js",
|
|
30
|
+
"lib/types/**/*.d.ts",
|
|
31
|
+
"config/**/*.json"
|
|
32
|
+
],
|
|
33
|
+
"license": "MIT",
|
|
32
34
|
"scripts": {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
"typecheck": "tsc --noEmit",
|
|
36
|
+
"test": "vitest run",
|
|
37
|
+
"build": "tsc"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"csv-parse": "^5.5.0"
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"@deepseek-ai/cordis": "^4.0.0",
|
|
44
|
+
"@deepseek-ai/dsh-tools": "0.0.1-rc.1",
|
|
45
|
+
"@deepseek-ai/schemastery": "^3.18.0"
|
|
36
46
|
},
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"@deepseek-ai/dsh-tools": "0.0.1-rc.1",
|
|
43
|
-
"@deepseek-ai/schemastery": "^3.18.0"
|
|
44
|
-
},
|
|
45
|
-
"dsh": { "bundle": { "patch": true } }
|
|
47
|
+
"dsh": {
|
|
48
|
+
"bundle": {
|
|
49
|
+
"patch": true
|
|
50
|
+
}
|
|
51
|
+
}
|
|
46
52
|
}
|