匯總服務可提供廣告技術人員所需的成效洞察資料,協助他們提升客戶的廣告活動成效。
本文件涵蓋的內容:
這份文件的目標讀者是誰?
本頁面可協助廣告技術和開發人員瞭解我們的 API 如何提供有效的廣告評估功能,同時保護使用者隱私。
本文假設您熟悉Private Aggregation API、Attribution Reporting API、Protected Audience API、Shared Storage 和 Trusted Execution Environments。
重要詞彙與概念
請先熟悉重要術語再繼續操作:
詞彙
- 廣告技術
-
廣告平台是提供服務來放送廣告的公司。
- 可匯總報表
-
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.
- 可匯總報表計算預算
-
References to the budget that ensures individual reports are not processed more than once.
- 匯總服務
-
由廣告技術營運的服務,可處理可匯總報表並產生摘要報表。
- 確認聲明
-
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)
-
電腦硬體和軟體的安全設定,可讓外部各方驗證機器上執行的確切軟體版本,不必擔心資訊外洩。在 TEE 中,外部各方可驗證軟體是否完全依軟體製造商聲明的方式運作。
如要進一步瞭解 Privacy Sandbox 提案中使用的 TEE,請參閱「Protected Audience API 服務說明」和「匯總服務說明」。
匯總服務工作流程
匯總服務會根據原始可匯總報表,產生詳細轉換和觸及資料的摘要報表。報表產生流程包含下列步驟:
- 瀏覽器會擷取公開金鑰,產生加密報表。
- 系統會將經過加密的可匯總報表傳送到廣告技術伺服器。
- 廣告技術伺服器會批次處理報表 (以 avro 格式),並傳送至匯總服務。
- 匯總工作站會擷取匯總報表並解密。
- 匯總工作站會從協調器擷取解密金鑰。
- 匯總工作站會解密報表,以便匯總及加入雜訊。
- 匯總報表計算服務會檢查是否有足夠的隱私公開程度上限,可針對指定的匯總報表產生摘要報表。
- 匯總服務會提交最終摘要報表。
下圖顯示匯總服務的運作情形,從從網站和行動裝置收到報表,到匯總服務產生摘要報表的時間。
總而言之,Attribution Reporting API 或 Private Aggregation API 會從多個瀏覽器例項產生報表。Chrome 會從協調器的金鑰代管服務取得公開金鑰,並每七天輪替一次,以便在將報表傳送至廣告技術報表來源之前先加密報表。廣告技術報表來源會收集並將傳入的報表轉換為 avro 格式,然後傳送至匯總服務。匯總服務收到批次要求後,會從 Key Hosting Service 擷取解密金鑰,解密報表,並匯總並模糊處理報表內容,產生摘要報表 (前提是隱私預算足以產生報表)。
請參閱導入部分,進一步瞭解如何準備可匯總的報表。
可匯總報表批次處理
您必須使用指定的報表來源伺服器,才能完成報表流程,這項資訊是在註冊程序中指定。報表來源負責收集、轉換及批次匯總報表,並準備將這些報表傳送至 Google Cloud 或 Amazon Web Services 中的匯總服務。進一步瞭解如何準備可匯總的報表。
雲端元件
匯總服務由多個雲端服務元件組成。您可以使用提供的 Terraform 指令碼,佈建及設定所有必要的雲端服務元件。
前端服務
代管雲端服務:Cloud Function (Google Cloud) / API Gateway (Amazon Web Services)
前端服務是無伺服器閘道,是匯總 API 呼叫的主要進入點,可用於建立工作和擷取工作狀態。負責接收匯總服務使用者的要求、驗證輸入參數,以及啟動匯總工作排程程序。
前端服務有兩個可用的 API:
| 端點 | 說明 |
|---|---|
createJob |
這個 API 會觸發匯總服務工作。如要觸發工作,您必須提供工作 ID、輸入儲存空間詳細資料、輸出儲存空間詳細資料和報表來源等資訊。 |
getJob |
這個 API 會傳回具有指定工作 ID 的工作狀態。這項資訊可提供工作狀態相關資訊,例如「已收到」、「處理中」或「已完成」。如果工作已完成,系統也會傳回工作結果,包括工作執行期間遇到的任何錯誤訊息。 |
請參閱 Aggregation Service 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)
工作中繼資料資料庫用於儲存及追蹤匯總工作狀態。它會記錄中繼資料,例如建立時間、要求時間、更新時間,以及狀態,例如已收到、處理中或已完成。匯集工作處理無人機會在工作進度達到某個點時更新工作中繼資料資料庫。
Aggregation Worker
代管雲端服務:Compute Engine 搭配機密空間 (Google Cloud) / Amazon Web Services EC2 搭配 Nitro Enclave (Amazon Web Services)。
匯總工作站會處理工作佇列中的作業要求,並使用從協調器中的金鑰產生和發布服務 (KGDS) 擷取的金鑰,解密已加密的輸入內容。為了盡量縮短工作處理延遲時間,匯總工作站會將解密金鑰快取八小時,並在處理的工作中使用這些金鑰。
匯總工作會在受信任的執行環境 (TEE) 例項中運作。工作站一次只能處理一個工作。您可以設定自動調整大小設定,讓多個 worker 並行處理工作。如果啟用自動調度資源,系統會根據工作佇列中的訊息數量,動態調整工作站數量。您可以透過 Terraform 環境檔案,設定自動調度資源的工作站數量下限和上限。如要進一步瞭解自動調度資源功能,請參閱下列 Terraform 指令碼:Amazon Web Services 或 Google Cloud。
匯總工作站會呼叫可匯總報表計算服務,以便計算可匯總報表。這項服務會驗證工作是否在未超過隱私預算限制的情況下執行。(請參閱「不重複」規則)。如果預算可用,系統會使用雜訊匯總資料產生摘要報表。請參閱可匯總的報表會計相關詳細資訊。
匯總工作站會更新工作中繼資料資料庫中的中繼資料。這項資訊包括工作傳回代碼,以及報表錯誤計數器 (在部分報表失敗的情況下)。使用者可以使用 getJob 工作狀態擷取 API 擷取狀態。
請參閱這篇說明文章,進一步瞭解匯總服務。
後續步驟
瞭解匯總服務的運作方式後,請按照入門指南的說明,透過 Google Cloud 或 Amazon Web Services 部署專屬執行個體。