By · Last updated 2026-06-05

返回博客GDPR 与合规

瑞典IMY:人口号码与Luhn校验

IMY发现45%的通用工具无法检测瑞典personnummer。大多数实现遗漏samordningsnummer(60位偏移)。瑞典79%的GDPR权利行使率。

June 5, 20267 分钟阅读
Sweden IMYpersonnummer LuhnsamordningsnummerSwedish GDPR technicalNordic compliance

瑞典IMY:人口号码与Luhn校验

2026年更新版

瑞典的数据保护机构是IMY——「完整性保护局」(Integritetsskyddsmyndigheten)。该机构对在用个人信息工具进行了测试,结果显示:45%的工具无法检测personnummer(瑞典主要国家身份标识符)。此外,79%的瑞典成年人每年行使其GDPR权利,是欧盟中比例最高的国家。检测能力薄弱直接导致合规漏洞。

Personnummer格式与Luhn校验

Personnummer有两种格式:短格式YYMMDD-XXXX(10位),长格式YYYYMMDD-XXXX(12位)。最后一位是Luhn校验字符。

Luhn校验: 从右到左取各位数字,对每隔一位的数字进行翻倍处理,翻倍后若得两位数则将两位相加,最后对所有值求和,结果须能被10整除。

Luhn校验同样出现在信用卡和加拿大社会保险号(SIN)中,但personnummer的前六位编码了出生日期,这形成了与金融Luhn校验不同的约束条件。跳过日期逻辑的工具会产生大量误报。

Samordningsnummer的检测缺口

瑞典为外籍居民发放协调号码(samordningsnummer),用于在正式personnummer签发之前使用。其格式与personnummer相同,区别在于:出生日期数字加60。

  • Personnummer,出生于1月15日:日期数字=15。
  • Samordningsnummer,同一日期:日期数字=75(15+60)。

Samordningsnummer的有效日期数字范围为61至91。仅接受01至31的工具将遗漏所有samordningsnummer。

外籍出生居民约占瑞典人口的20%。对于拥有非瑞典籍员工或客户的企业而言,这一缺口意味着大量记录无法被检测到。

IMY的匿名化规则

IMY 2023年匿名化指南是欧盟各数据保护机构中最为详尽的,已有12个其他DPA引用。

适用于瑞典数据集的三项规则:

  • k-匿名度≥5。 每条记录须在所有关键字段上与至少四条其他记录无法区分。年龄、性别、市镇和职业是典型的准标识符。瑞典人口较少,小规模群体易于被锁定。
  • 医疗和金融数据须满足l-多样性。 仅靠k-匿名度无法防止推断攻击,l-多样性要求每个群体至少包含l个不同的敏感值。
  • 须提供正式证明。 IMY不接受声明式合规,技术文档须证明已达到相关阈值。

79%权利行使率的实践含义

对于拥有5万名瑞典用户的企业,79%意味着每年约3.95万次权利请求,每次须在30天内响应。

人工处理无法应对这一规模。企业需要在所有存储介质(主数据库、备份、分析系统和AI训练集)中实现自动化个人信息检索,系统必须能够查找personnummer和samordningsnummer,两者均须进行Luhn校验和60日偏移规则验证。

这一技术准确性是大规模响应瑞典权利请求的基础要求。没有它,自动化数据清单系统将遗漏必须查找和返回的大量记录。

有关完整匿名化框架和IMY 2024年执法记录,请参阅我们的IMY GDPR匿名化与北欧指南

有关欧盟各成员国的对比,请参阅我们的德国BfDI GDPR技术指南

参考来源

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

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