By · Last updated 2026-06-05

返回博客GDPR 与合规

GDPR 与遗留扫描文件:OCR 识别 PII 的合规实践

GDPR 的删除权适用于「无论何种格式」的个人数据。基于图像的 PDF 纸质档案并不例外。

June 5, 20267 分钟阅读
legacy documentsOCR PII detectionGDPR erasurescanned documentsdocument archive

GDPR 与遗留扫描文件:OCR 识别 PII

2026 年更新版

GDPR 审计中频繁出现同一个隐患:历史图像型 PDF 档案。

律所保存着 20 年的扫描客户文件,医院留存着几十年的患者表格,政府机构存储着扫描记录,银行保有影像化的贷款文件。

这些档案有一个共同特点:文件是光栅图像——扫描 PDF、TIFF 或 JPEG。没有文本层,标准 PII 工具无法读取,对大多数匿名化工具来说,这些文件如同不存在。

一种常见的误解是:「这些是图像文件——GDPR 不适用。」

GDPR 第 17 条第 1 款赋予个人删除权,第 26 条前言说明匿名化可将个人信息移出适用范围。两者都没有为图像格式设置例外。一家律所无法满足 15 年前客户文件的删除请求,这是合规缺口,而非豁免。

关于我们如何支持 GDPR 合规,请参阅合规概览安全实践

检测管道的工作原理

整个流程分三个阶段。

第一阶段——OCR

OCR 引擎读取图像并提取文本,记录每个词的位置,输出带坐标的机器可读文本。当文件中含有手写内容、褪色字迹或历史字体时,准确率会有所下降。

第二阶段——NLP 实体检测

命名实体识别(NER)扫描 OCR 文本,查找人名、机构名称和地名,模式匹配额外识别社会安全号、电话号码和账户号码,每个命中结果获得一个置信度分数。

第三阶段——匿名化

在文本输出中替换检测到的实体,原始图像不做修改(修改图像需要独立的脱敏工具),匿名化文本用于支持删除请求、数据主体访问请求回复和合规记录。

现代 OCR 引擎对清晰印刷页面的字符准确率可达 98 至 99%;手写内容或质量较差的扫描件会降至 85 至 92%。实体级准确率通常高于字符级——即便个别字母有误,姓名仍可被识别。

实际结论是:OCR 准确率影响能捕获多少实体,但并不决定该方法是否可行。即便准确率为 90%,大多数姓名和号码仍可被找到。仍需建立质量分级机制,但方法本身是可靠的。

处理大型档案

大型遗留档案适合采用四阶段工作流程。

第一阶段——建立清单: 列出所有图像型档案,注明来源系统和日期范围,优先处理删除请求风险较高的记录,客户类文件优先于内部文件。

第二阶段——批量处理: 分批运行 OCR 和 PII 检测,通常每批 5,000 至 10,000 个文件,处理任务在夜间运行,输出每个文件的 PII 报告和匿名化文本摘录。

第三阶段——满足删除请求: 数据主体提供其姓名和时间范围,在匿名化摘录中搜索相关令牌,定位文件,执行脱敏,记录操作。

第四阶段——持续合规: 将新扫描文件在归档前纳入同一管道处理,将 PII 报告作为第 30 条处理活动记录的证明保留。

案例研究:律所档案

一次律所审计发现了 8 万份图像型 PDF 客户合同,均为 1998 年至 2010 年间的扫描件。标准 PII 工具显示零检测结果——图像格式是盲区。

过去 12 个月内,15 位前客户已提交删除请求,律所的回应是:「我们无法确认您的记录已被删除。」这个答案不符合 GDPR 第 17 条的要求。

律所采取的措施:

  • 以每批 5,000 份的规模对全部 8 万份文件运行 OCR 和 PII 检测
  • 处理耗时约三周
  • 成果:8 万份匿名化文本摘录及每份文件的 PII 报告
  • 建立了将实体与文件 ID 关联的可检索索引

处理完成后:

  • 定位某数据主体的文件:平均 4 分钟
  • 每个请求涉及文件数:平均 6 至 8 份
  • 每个请求的脱敏时间:20 至 30 分钟

15 份积压请求均在 30 天内处理完毕。

关键要点:合规义务在处理之前就已存在,律所只是缺少履行义务的工具。基于 OCR 的处理并非新增义务,而是让既有义务得以履行。

OCR 的局限性与质量分级

手写内容的 OCR 准确率较低,处理手写内容前应设定较低的置信度阈值。

扫描质量差会降低准确率,OCR 运行前可进行对比度增强和倾斜校正。

非常规版式——多栏页面、旧式法律字体——也可能降低准确率。

对合规工作设定质量分级:

  • 页面准确率 95% 以上:自动化处理
  • 80 至 95%:自动化处理后,对标记实体进行人工复核
  • 80% 以下:转入人工审核

分级方法为监管机构提供了清晰的可靠性评估记录。大多数文件自动处理,剩余部分进入人工审核队列,整体吞吐量和合规质量两全其美。

关于基于 OCR 的处理和审计追踪的常见问题,请参阅 FAQ

参考资料

准备好保护您的数据了吗?

开始使用 285 种实体类型在 48 种语言中匿名化 PII。

About this page

We update this page when our platform or the law changes.

Read our founder note for how we work.

Each change shows up in the timestamp at the top.

Related reading

We follow these rules

  • GDPR (EU 2016/679).
  • ISO/IEC 27001:2022.
  • NIS2 (EU 2022/2555).
  • HIPAA safe harbor under 45 CFR § 164.514(b)(2).

Our promise

We do not sell your data.

We do not train models on your text.

We store your files in Germany.

You can delete your account at any time.

You own your work.

Where we run

Our servers live in Falkenstein, Germany.

We use Hetzner. They hold ISO 27001 certification.

All data stays in the EU.

Backups run every day.

Need help?

Email support@anonym.legal.

We reply within one business day.

How we test

We run a full check suite on every release.

Each surface gets its own sweep script and report.

Human reviewers spot-check the output each week.

We track recall and precision on a labelled set.

Bad runs block the deploy.

What we never do

  • We never sell your information to third parties.
  • We never train models on what you upload.
  • We never keep your work after you delete it.
  • We never share keys with any outside firm.
  • We never run ads inside the product.

Plans in plain words

We sell credits, not seats.

One credit covers one short job.

Long jobs use a few credits each.

You can top up at any time.

Unused credits roll over each month.

Read the plans page for current rates.

Who built this

A small team of engineers and lawyers built this.

We ship from Europe and work in the open.

Our founder note spells out why we started.

Where to start

How the parts fit

A browser add-on cleans text inside Chrome.

A Word plug-in handles drafts in Office.

A small desktop tool works on whole folders.

An agent protocol link feeds large models safely.

All four share one core engine and one rule set.

Words from our team

We started this work after a lunch about cookies.

One friend kept getting odd ads on her phone.

We asked why a court file leaked through a draft.

We sketched the first build on a napkin that week.

By month three we had a tiny demo for a friend.

She used it on her first case the next day.

Common questions we hear

Can the tool read scanned PDFs? Yes, with OCR.

Does it work on long files? Yes, in small chunks.

Can I roll my own rule set? Yes, save it as a preset.

Does it run offline? The desktop build runs offline.

Do you keep my files? No, the cloud build wipes after each run.

Will it learn from my work? No, we never train on inputs.

A short tour of the workflow

Upload a file or paste a snippet of prose.

Pick the entities you want gone from the draft.

Choose a method: replace, mask, hash, encrypt, or redact.

Press run and watch the side panel show each hit.

Skim the result and tweak any rule that misfired.

Save the cleaned file or send it to a teammate.