By · Last updated 2026-03-10

返回博客技术

LibreOffice个人信息匿名化扩展

使用anonym.legal扩展在LibreOffice文档中匿名化个人信息的分步指南,支持Writer、Calc和Impress,覆盖285种以上实体类型。

March 10, 202610 分钟阅读
LibreOffice extensiondocument anonymizationPII redactionopen source officeWriter anonymizationformat preservation

LibreOffice个人信息匿名化扩展

LibreOffice在全球估计拥有2亿用户。政府机构、学校和企业都依赖它处理日常工作,许多用户将其作为避免高额软件授权费用的替代方案。但直到现在,用户始终没有内置工具来查找和删除文件中的个人数据。

以往的解决方案十分繁琐:将文本复制到Web应用中,匿名化处理后再粘贴回来。这会破坏格式,损毁表格、样式和版面。对于结构复杂的Writer文档,这种方法根本行不通。

anonym.legal扩展从根本上解决了这一问题。它直接在应用内部运行,可在Writer、Calc和Impress中检测285种以上实体类型。

两分钟内完成安装

扩展以.oxt文件格式发布,这是所有LibreOffice扩展的标准格式。

快速安装:

  1. anonym.legal/api/download/libreoffice下载.oxt文件
  2. 双击文件
  3. 确认提示
  4. 重启应用

手动安装:

  1. 打开应用
  2. 进入「工具」,然后选择「扩展管理器」
  3. 点击「添加」,选择.oxt文件
  4. 重启应用

重启后,在「视图」→「侧边栏」下即可看到anonym.legal侧边栏。登录后即可开始使用。

检测引擎的工作原理

两套引擎协同运行以识别个人信息。

引擎检测对象置信度
正则引擎电子邮件、社会安全号、IBAN、信用卡、电话号码1.0
spaCy NLP人名、组织、地点0.85以上

检测通过anonym.legal API运行。文本被发送至位于德国的认证服务器,该服务器持有ISO 27001认证。结果返回扩展程序。文件本身不会被发送,仅传输文本内容。

各应用的处理方式:

  • **Writer:**提取全文或仅提取所选内容
  • **Calc:**以制表符分隔值的形式读取所有工作表的单元格
  • **Impress:**读取所有幻灯片中的文本对象

五种匿名化方法

方法示例可还原?GDPR分类
替换John Smith → PERSON匿名化(第26条序言)
遮盖john@example.com → j***@e***.com匿名化
涂黑555-0123 → [REDACTED]匿名化
哈希(SHA-256/512)社会安全号 → a1b2c3d4...假名化(WP29)
加密(AES-256-GCM)姓名 → ENC:xyz...假名化(第4(5)条)

可在一次处理中混合使用多种方法,例如对人名使用替换,对电子邮件使用加密。每种实体类型可设置独立规则。

Writer中的格式完整保留

这是相较于复制粘贴方案的核心优势。扩展在替换文本时完整保留所有格式。

七项字体属性保留:

  • 字体族、字号、粗体、斜体、颜色、下划线、删除线

四项段落属性保留:

  • 对齐方式、首行缩进、左边距、右边距

「John Smith」以粗体14pt Times New Roman呈现,替换后「PERSON」保持相同样式。表格、页眉和页脚均完整保留。扩展在文档模型内部进行操作,不进行文本导出和重新导入。

**注意:**格式追踪仅适用于Writer。Calc和Impress仅进行文本层面的替换。

应用前可预览审查

预览界面最多显示50个已识别实体,每行显示:

  • 实体类型(PERSON、EMAIL_ADDRESS、PHONE_NUMBER等)
  • 原始文本
  • 建议替换内容
  • 置信度分数

可逐项接受或拒绝每个实体,支持一键全选或全清。点击「应用」前所有更改不会生效。在Writer中,Ctrl+Z可撤销最后一次操作。

预设跨设备同步

将您的设置保存为预设,包括实体类型、处理方法和置信度阈值,可在所有文档中复用,节省操作时间。

付费计划用户的预设可在所有anonym.legal产品间同步。在Web应用中创建预设,五分钟内即可在桌面应用和Office加载项中看到。加密密钥使用零知识封装,只有您的密码才能解密。

关于Office加载项在Word中处理同类工作流的详情,请参阅Word加载项与律所文件涂黑

LibreOffice与Microsoft Office的对比

两款扩展共享同一后端,相同文本在Writer和Word中的处理结果完全一致,引擎完全统一。

功能LibreOffice扩展Office加载项
实体类型285种以上285种以上
语言48种48种
处理方法5种5种
格式追踪仅Writer仅Word
预览最多50个实体最多50个实体
零知识认证支持支持
预设同步支持(付费计划)支持(付费计划)
支持平台Windows、macOS、LinuxWindows、Mac、Web、iPad

关于跨操作系统个人信息合规的全面概述,请参阅跨平台个人信息合规:Mac、Linux、Windows

系统要求

  • LibreOffice 3.0或更高版本
  • Python 3(大多数安装版本已内置)
  • 网络连接(用于个人信息检测API)
  • anonym.legal账户(免费层:每月200个令牌)

开始使用

  1. 下载扩展
  2. 双击安装,然后重启
  3. 打开「视图」→「侧边栏」→ anonym.legal面板
  4. 登录
  5. 打开文档,点击「分析」,审查结果,点击「应用」

完整文档:LibreOffice扩展文档

参考来源

  • The Document Foundation — LibreOffice全球用户估计超过2亿
  • anonym.legal个人信息检测测试 — 准确率95.5%,42/44项独立测试通过
  • GDPR第26条序言 — 匿名化使数据退出GDPR适用范围;第4(5)条 — 假名化定义

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

开始使用 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.