汇总服务可为广告技术平台提供提升客户广告系列效果所需的效果数据分析。
本文档介绍了:
- 关键术语和概念
- Aggregation Service 的运作方式:如何根据原始可汇总报告为您提供详细的转化数据和覆盖面衡量结果
- 可汇总报告批量处理概念概览
- 云端组件概念性概览
本文档适合哪些对象?
本页面可帮助广告技术平台和开发者了解我们的 API 如何实现可保护隐私的有效广告效果衡量。
本文档假定您熟悉 Private Aggregation API、Attribution Reporting API、Protected Audience API、Shared Storage API 和可信执行环境。
关键术语和概念
在继续之前,请先熟悉以下关键术语:
术语库
- 广告技术
-
An ad platform is a company that provides services to deliver ads.
- 可汇总的报告
-
Aggregatable reports are encrypted reports sent from individual user devices. These reports contain data about cross-site user behavior and conversions. Conversions (sometimes called attribution trigger events) and associated metrics are defined by the advertiser or ad tech. Each report is encrypted to prevent various parties from accessing the underlying data.
- 可汇总报告的会计核算
-
A distributed ledger, located in both coordinators, that tracks the allocated privacy budget and enforces the 'No Duplicates' rule. This is the privacy preserving mechanism, located and run within coordinators, that ensures no reports pass through the Aggregation Service beyond the allocated privacy budget.
Read more on how batching strategies relate to aggregatable reports.
- 可汇总报告的会计核算预算
-
对预算的引用,用于确保不会对单个报告进行多次处理。
- 汇总服务
-
An ad tech-operated service that processes aggregatable reports to create a summary report.
Read more about the Aggregation Service backstory in our explainer and the full terms list.
- 证明
-
A mechanism to authenticate software identity, usually with cryptographic hashes or signatures. For the aggregation service proposal, attestation matches the code running in your ad tech-operated aggregation service with the open source code.
- 贡献绑定
- 协调者
-
Entities responsible for key management and aggregatable report accounting. A Coordinator maintains a list of hashes of approved aggregation service configurations and configures access to decryption keys.
- 噪声和缩放
-
Statistical noise that is added to summary reports during the aggregation process to preserve privacy and ensure the final reports provide anonymized measurement information.
Read more about additive noise mechanism, which is drawn from Laplace distribution.
- 报告来源
-
The entity that receives aggregatable reports—in other words, you or an ad tech that called the Attribution Reporting API. Aggregatable reports are sent from user devices to a well-known URL associated with the reporting origin. The reporting origin is designated during enrollment.
- 共享 ID
-
A computed value that consists of
shared_info,reporting_origin,destination_site(for Attribution Reporting API only),source_registration-time(for Attribution Reporting API only),scheduled_report_time, and version.Multiple reports that share the same attributes in the
shared_infofield should have the same shared ID. Shared IDs play an important role within Aggregatable Report Accounting. - 摘要报告
-
An Attribution Reporting API and Private Aggregation API report type. A summary report includes aggregated user data, and can contain detailed conversion data with noise added. Summary reports are made up of aggregate reports. They allow for greater flexibility and provide a richer data model than event-level reporting, particularly for some use-cases like conversion values.
- 可信执行环境 (TEE)
-
A secure configuration of computer hardware and software that allows external parties to verify the exact versions of software running on the machine without fear of exposure. TEEs allow external parties to verify that the software does exactly what the software manufacturer claims it does—nothing more or less.
To learn more about TEEs used for the Privacy Sandbox proposals, read the Protected Audience API services explainer and the Aggregation Service explainer.
Aggregation Service 工作流
汇总服务会根据原始可汇总报告生成包含详细转化和覆盖面数据的摘要报告。报告生成流程包括以下步骤:
- 浏览器会提取公钥以生成加密报告。
- 加密的可汇总报告会发送到广告技术服务器。
- 广告技术平台服务器批量处理报告(采用 avro 格式),并将其发送到汇总服务。
- 汇总工作器会检索要解密的汇总报告。
- 汇总工作器会从协调者检索解密密钥。
- 汇总 Worker 会对报告进行解密,以便进行汇总和添加噪声。
- 可汇总的报告会计服务会检查是否有足够的隐私预算来为给定的可汇总报告生成摘要报告。
- Aggregation Service 提交最终摘要报告。
下图展示了 Aggregation Service 的实际运作情形,从从网站和移动设备收到报告到 Aggregation Service 创建摘要报告的过程。
总而言之,Attribution Reporting API 或 Private Aggregation API 会根据多个浏览器实例生成报告。Chrome 会从协调器中的密钥托管服务获取一个每 7 天轮替一次的公钥,以便在将报告发送到广告技术平台报告来源之前对其进行加密。广告技术平台报告来源会收集传入的报告并将其转换为 avro 格式,然后将其发送到汇总服务。然后,当系统向汇总服务发送批量请求时,汇总服务会从密钥托管服务中提取解密密钥,解密报告,并对其进行汇总和添加噪声,以创建摘要报告(前提是隐私预算足以创建这些报告)。
如需详细了解如何准备可汇总的报告,请参阅实现部分。
可汇总报告批处理
如果没有您在注册流程期间指定的指定报告来源服务器,报告流程将无法完成。报告来源负责收集、转换和批量处理可汇总报告,并准备将其发送到 Google Cloud 或 Amazon Web Services 中的汇总服务。详细了解如何准备可汇总的报告。
Cloud 组件
汇总服务由多个云服务组件组成。您可以使用提供的 Terraform 脚本预配和配置所有必要的云服务组件。
前端服务
托管式云服务:Cloud Functions (Google Cloud) / API Gateway (Amazon Web Services)
前端服务是一种无服务器网关,是用于创建作业和检索作业状态的 Aggregation API 调用的主入口点。它负责接收汇总服务用户的请求、验证输入参数并启动汇总作业调度流程。
前端服务有两个可用 API:
| 端点 | 说明 |
|---|---|
createJob |
此 API 会触发 Aggregation Service 作业。如需触发作业,需要提供作业 ID、输入存储空间详细信息、输出存储空间详细信息和报告来源等信息。 |
getJob |
此 API 会返回具有指定作业 ID 的作业的状态。它提供有关作业状态的信息,例如“已收到”“正在处理”或“已完成”。如果作业已完成,它还会返回作业结果,包括作业执行期间遇到的所有错误消息。 |
查看汇总服务 API 文档。
作业队列
托管式云服务:Pub/Sub (Google Cloud) / Amazon SQS (Amazon Web Services)
作业队列是一个消息队列,其中包含汇总服务的作业请求。前端服务会将作业请求插入队列,然后汇总工作器会使用这些请求进行处理。
Cloud Storage
托管式云服务:Google Cloud Storage(Google Cloud)/Amazon S3(Amazon Web Services)
汇总服务使用的输入和输出文件(例如加密报告文件和输出摘要报告)会保留在云端存储空间中。
作业元数据数据库
托管式云服务:Spanner(Google Cloud)/DynamoDB(Amazon Web Services)
作业元数据数据库用于存储和跟踪汇总作业的状态。它会记录创建时间、请求时间、更新时间等元数据,以及“已收到”“正在处理”或“已完成”等状态。汇总工作器会随着作业的进度更新作业元数据数据库。
汇总 Worker
托管云服务:带有机密空间的 Compute Engine (Google Cloud) / 带有 Nitro Enclave 的 Amazon Web Services EC2 (Amazon Web Services)。
汇总 Worker 会处理作业队列中的作业请求,并使用从协调者中的密钥生成和分发服务 (KGDS) 提取的密钥解密加密输入。为了最大限度地缩短作业处理延迟时间,汇总工作器会将解密密钥缓存 8 小时,并在处理的作业中使用这些密钥。
汇总 Worker 在可信执行环境 (TEE) 实例中运行。一个工作器一次只能处理一个作业。您可以通过设置自动扩缩配置,将多个工作器配置为并行处理作业。如果使用自动扩缩,系统会根据作业队列中的消息数量动态调整工作器数量。您可以通过 Terraform 环境文件配置自动扩缩的工作器数量下限和上限。如需详细了解自动扩缩,请参阅以下 Terraform 脚本:Amazon Web Services 或 Google Cloud。
汇总 Worker 会调用可汇总报告会计核算服务,以进行可汇总报告会计核算。此服务会验证仅在未超出隐私预算上限时才运行作业。(请参阅“不得重复”规则。)如果有预算,系统会使用带噪声的汇总数据生成摘要报告。详细了解可汇总报告会计核算。
汇总 Worker 会更新作业元数据库中的作业元数据。此信息包括作业返回代码和报告错误计数器(如果部分报告失败)。用户可以使用 getJob 作业状态检索 API 提取状态。
如需详细了解 Aggregation Service,请参阅此解说。
后续步骤
现在,您已经了解了汇总服务的运作方式,接下来可以按照入门指南通过 Google Cloud 或 Amazon Web Services 部署您自己的实例。