選項說明

匯總服務可為廣告技術提供成效洞察資料,協助廣告主提升廣告活動成效。

本文涵蓋

這份文件的目標讀者是誰?

本頁面可協助廣告技術和開發人員瞭解,我們的 API 如何提供有效的廣告評估資料,同時保護隱私。

本文假設您已熟悉 Private Aggregation APIAttribution Reporting APIProtected Audience APIShared StorageTrusted Execution Environments

重要詞彙與概念

請先熟悉重要詞彙,再繼續操作:

詞彙

廣告技術

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.

Learn more about aggregatable reports.

可匯總報表計算

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.

匯總服務

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.

確認聲明

驗證軟體身分的機制,通常會使用加密雜湊或簽章。對於匯總服務提案,認證會將廣告技術營運匯總服務中執行的程式碼與開放原始碼進行比對。

進一步瞭解認證

貢獻綁定
協調員

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_info field should have the same shared ID. Shared IDs play an important role within Aggregatable Report Accounting.

Read more about Trusted Servers.

摘要報表

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.

匯總服務工作流程

匯總服務會根據原始的可匯總報表,產生詳細轉換和觸及資料的摘要報表。報表產生流程包含下列步驟:

  1. 瀏覽器會擷取公開金鑰,以產生加密報表
  2. 系統會將加密的可匯總報表傳送至廣告技術伺服器。
  3. 廣告技術伺服器會批次處理報表 (avro 格式),並傳送至匯總服務。
  4. 匯總工作站會擷取匯總報表並解密。
  5. 匯總工作站會從協調器擷取解密金鑰。
  6. 匯總工作站會解密報表以進行匯總和加入雜訊
  7. 可匯總報表會計服務會檢查是否有足夠的隱私權預算,可為指定的可匯總報表產生摘要報表。
  8. 匯總服務會提交最終摘要報表。

下圖顯示匯總服務的運作方式,從接收網站和行動裝置的報表,到匯總服務建立摘要報表,整個過程一目瞭然。

端對端匯總服務流程。
端對端匯總服務流程

總而言之,Attribution Reporting API 或 Private Aggregation API 會從多個瀏覽器例項產生報表。Chrome 會從協調器的金鑰代管服務取得公開金鑰 (每七天輪替一次),以便加密報表,然後傳送至廣告技術報表來源。廣告技術報表來源會收集並將收到的報表轉換為 avro 格式,然後傳送至匯總服務。接著,當批次要求傳送至匯總服務時,只要有足夠的隱私權預算,匯總服務就會從金鑰代管服務擷取解密金鑰、解密報表、匯總並加入隨機雜訊,建立摘要報表。

如要進一步瞭解如何準備可匯總的報表,請參閱實作部分。

可匯總報表批次處理

如果沒有您在註冊程序中指定的指定回報來源伺服器,回報流程就無法完成。報表來源負責收集、轉換及批次處理可匯總報表,並準備將這些報表傳送至 Google Cloud 或 Amazon Web Services 中的匯總服務。進一步瞭解如何準備可匯總報表

雲端元件

匯總服務包含多個雲端服務元件。您可以使用提供的 Terraform 指令碼,佈建及設定所有必要的雲端服務元件。

匯總服務雲端元件。
匯總服務雲端元件。

前端服務

代管式雲端服務:Cloud Function (Google Cloud) / API Gateway (Amazon Web Services)

前端服務是無伺服器閘道,也是職缺建立和職缺狀態擷取的 Aggregation API 呼叫主要進入點。負責接收匯總服務使用者的要求、驗證輸入參數,以及啟動匯總作業排程程序。

前端服務提供兩種 API:

端點 說明
createJob 這個 API 會觸發匯總服務工作。如要觸發這項工作,需要提供工作 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)

工作中繼資料資料庫用於儲存及追蹤匯總工作的狀態。這項記錄會儲存中繼資料,例如建立時間、要求時間、更新時間和狀態 (例如「已收到」、「處理中」或「已完成」)。匯總工作站會在工作進行時更新工作的中繼資料庫。

匯總工作者

代管雲端服務:Compute Engine with Confidential space (Google Cloud) / Amazon Web Services EC2 with Nitro Enclave (Amazon Web Services)。

匯總工作站會在「工作佇列」中處理工作要求,並使用從協調器中的金鑰產生和發布服務 (KGDS) 擷取的金鑰,解密加密輸入內容。為盡量縮短工作處理延遲時間,匯總工作站會將解密金鑰快取八小時,並在處理工作時使用這些金鑰。

匯總工作人員會在受信任的執行環境 (TEE) 執行個體中運作。工作站一次只能處理一項工作。您可以設定自動調度資源設定,讓多個工作站並行處理工作。如果使用自動調度資源,系統會根據工作佇列中的訊息數量,動態調整工作站數量。您可以透過 Terraform 環境檔案,設定自動調度資源的 worker 數量下限與上限。如要進一步瞭解自動調度資源功能,請參閱這些 Terraform 指令碼:Amazon Web ServicesGoogle Cloud

匯總工作站會呼叫可匯總報表會計服務,進行可匯總報表會計作業。這項服務會驗證作業是否超出隱私權預算上限,如果超出上限,就不會執行作業。(請參閱「不得重複」規則)。如果預算充足,系統會使用加入干擾的匯總資料產生摘要報表。進一步瞭解可匯總報表會計

匯總工作站會更新工作元資料庫中的工作元資料。如果報表部分失敗,這項資訊會包含工作回傳代碼和報表錯誤計數器。使用者可以透過 getJob 工作狀態擷取 API 擷取狀態。

如要進一步瞭解匯總服務,請參閱這篇說明文章

後續步驟

您已瞭解匯總服務的運作方式,現在請按照入門指南,透過 Google Cloud 或 Amazon Web Services 部署自己的執行個體。