Topics API สําหรับอุปกรณ์เคลื่อนที่: ภาพรวม

ดูข้อมูลเกี่ยวกับ Topics API ใน Android และขั้นตอนในการใช้งาน หรือจะข้ามไปที่การใช้หัวข้อเลยก็ได้

How the Topics API works

The Topics API can be used to observe and provide access to topics that appear to be of interest to the user, based on their activity. The Topics API can then give API callers (such as ad tech platforms) access to a user's topics of interest, but without revealing additional information about the user's activity.

Key concepts

  • A topic is a human-readable topic of interest for the current user and is part of the Topics taxonomy.
  • A caller is an entity, such as an app, a third-party SDK, a website, or service, that makes a request to the Topics API to observe or access a user's interests.
  • A topic is observed by a caller, if the caller made a Topics API request from a web page or app associated with this topic during the past three epochs.
  • An epoch is a period of topic computation, which defaults to one week.
  • A taxonomy is a hierarchical list of categories, which includes, for example, such categories as /Arts & Entertainment/Music & Audio/Soul & R&B and /Business & Industrial/Business Services/Corporate Events.
  • Topics are derived using a classifier model that maps user activity to zero or more topics.

Topics API flow core steps

The Topics API lifecycle has three main steps:

  • Observe user activity, such as when they visit the web page https://cats.example/tabby/index.html or download the app cats.
  • Derive topics from user activity, for example /Pets & Animals/Pets/Cats.
  • Access topics previously observed for the user, for example as a signal to select relevant advertising (such as a cat food promotion).

Observe topics

Callers can only access topics of interest that they've observed. A caller observes a topic when they make a Topics API request from a context associated with this topic. To illustrate this concept, consider the following simplified example.

  • Suppose there are two Topics API callers: A and B.
  • There are two contexts:
    • Greenhouse, for example an app named Greenhouse or a website greenhouse.example, associated with the topic Home & Garden.
    • Tennis exercises, for example an app named Tennis Exercises or a website tennis.example, associated with the topic Sports/Tennis.
  • Both caller A and B are present in the context of Greenhouse.
  • Only the caller B is present in the context of Tennis exercises.
  • Assume that no topics were observed for the user before epoch 1, for the sake of simplification.
  • The user visits the Greenhouse app, and callers A and B make a Topics API call to record the user visit to the page or app (see the implementation guide suggested in Next steps to find out how to call the Topics API). This record (a hostname or app data) is later used to derive topics of interest. The Topics API will later mark the topic Home & Garden as observed by both callers A and B.
  • The user visits the Tennis exercises app. Only the caller B sends a Topics API request. The Topics API will later mark the topic Sports/Tennis as observed by the caller B.
  • By the end of the epoch, the Topics API refreshes the user's top topics and determines the callers that observed these topics based on user activity.
  • Later, when the caller B makes another Topics API call, it can get either Home & Garden or Sports/Tennis topic (or, with a 5% chance, a random topic) for this user in the response array.
  • Caller A can only access the topic Home & Garden, as it has never observed the topic Sports/Tennis. This means that a third-party will only learn about a user's topic of interest within the specific context (app or website) where it is present.
Diagram showing that the Topics API only marks the topics as observed if the callers has presence in the context.
The Topics API marks the topics observed only by the callers that have presence in the context of these topics. The callers will only be able to access the topics they have observed.

Derive topics

Topics derives topics of interest from user activity. The topics are selected from a predefined open-source taxonomy. Once per epoch, Topics refreshes the user's top five topics and the callers that observed them during the epoch. The Topics classifier model derives topics from user activity: hostname for a web page visit, app information on Android.

Caller accesses user's topics of interest

The API returns only topics that have been observed by the caller within the most recent three epochs. A maximum of three topics may be returned to a caller,one topic for each of the three recent epochs (if the caller observed topics for that epoch). The returned topics can be used by the caller to supplement any contextual information and can be combined to help find a more relevant ad for the user.

Epochs

The Topics API must ensure that the topics of interest it provides are kept up to date. The topics are inferred for a user based on their activity during a period of time known as an epoch, one week by default. Each user has their own epochs (epochs are "per user") and the initial start time is randomized.

Once each epoch, the Topics API computes the user's top five topics and determines which callers observed those topics using on-device information. The topic selected for each epoch is randomly selected from the user's top five topics for that time period. To further enhance privacy and ensure that all topics may be represented, there is a 5% chance the topic is randomly selected from all possible topics in the taxonomy of interests.

หัวข้อใน Android ในทางปฏิบัติ

Topics API ใน Android ออกแบบมาเพื่อรองรับ SDK การโฆษณาของบุคคลที่สามที่มักจะทํางานในแอปหลายแอป Topics จะให้หัวข้อการโฆษณาแบบหยาบๆ แก่ผู้เรียกใช้โดยอิงตามการใช้แอปของผู้ใช้ โดยไม่ต้องอาศัยตัวระบุข้ามแอป หัวข้อเหล่านี้สามารถใช้เพื่อเสริมข้อมูลตามบริบทที่เกี่ยวข้องกับแอปที่ต้องการแสดงโฆษณา และสามารถนำมารวมกันเพื่อช่วยเลือกโฆษณาที่เหมาะสมสำหรับผู้ใช้

ในบริบทของ Topics API ผู้ซื้อและผู้ลงโฆษณาจะขึ้นอยู่กับฝั่งผู้ขาย โดยฝั่งผู้ขายจะแสดงตัวตนอย่างกว้างขวางในแอปของผู้เผยแพร่โฆษณาและสังเกตหัวข้อของผู้ใช้ จากนั้นจึงแชร์หัวข้อกับผู้ซื้อเพื่อช่วยในการเลือกโฆษณาที่เกี่ยวข้องมากขึ้น หากต้องการรับหัวข้อ แอปและ SDK ฝั่งขายจะต้องสร้างร่องรอยด้วยการเป็นผู้สังเกตการณ์ของ Topics API เป็นเวลาอย่างน้อย 1 Epoch

โปรดดูตัวอย่างโค้ดที่แสดงวิธีตั้งค่าความสามารถในการดึงข้อมูลหัวข้อสําหรับการโฆษณาตามความสนใจในคู่มือการใช้งาน Topics API

การผสานรวม Topics ตามประเภทธุรกิจ

เปิดใช้ IBA (การโฆษณาตามความสนใจ) ด้วย Topics API ทําตามขั้นตอนตามประเภทธุรกิจเทคโนโลยีโฆษณาเพื่อผสานรวม Topics API และเตรียมพร้อมสําหรับการเปิดตัว

สำหรับเทคโนโลยีโฆษณาทั้งหมด

สําหรับเทคโนโลยีโฆษณาฝั่งขาย

  • กลายเป็นผู้สังเกตการณ์เพื่อสร้างร่องรอยของ Topics API Topics API มีสัญญาณใหม่ คุณจึงต้องอัปเดต SDK เพื่อเริ่มเรียกใช้ Topics API SDK ของคุณต้องเรียก API จากแอปของผู้เผยแพร่อย่างน้อย 1 ครั้งต่อหนึ่งศักราชเพื่อให้เรียกข้อมูลหัวข้อได้อย่างสม่ำเสมอ ระบบจะใช้เวลาสูงสุด 4 ยุคเพื่อให้ได้หัวข้อสูงสุด (3 หัวข้อ) เพื่อส่งไปพร้อมกับคําขอโฆษณา
  • ใส่ข้อมูล Topics API ไว้ในคําขอโฆษณา สําหรับคําขอโฆษณาแต่ละรายการ ให้เริ่มแชร์ข้อมูล Topics API กับพาร์ทเนอร์ฝั่งซื้อ Topics API มีแผนที่จะเสริมสัญญาณอื่นๆ (เช่น สัญญาณตามบริบท) เพื่อช่วยค้นหาโฆษณาที่เหมาะสมสําหรับผู้เข้าชมแต่ละราย
  • ทำงานร่วมกันเกี่ยวกับโปรโตคอลสำหรับการแชร์หัวข้อกับพาร์ทเนอร์ฝั่งซื้อ Topics API ต้องการให้ SDK แต่ละรายการทํางานร่วมกับพาร์ทเนอร์ดาวน์สตรีมเพื่อตกลงเกี่ยวกับวิธีแชร์ข้อมูล Topics API

สําหรับเทคโนโลยีโฆษณาฝั่งผู้ซื้อ

  • ติดต่อพาร์ทเนอร์ฝั่งขายเพื่อยืนยันแผนในการสังเกตหัวข้อและสร้างร่องรอย ผู้ให้บริการฝั่งขายต้องเรียกใช้ Topics API อย่างน้อย 1 ครั้งต่อศักราชจึงจะได้รับหัวข้อ
  • ทำงานร่วมกันเกี่ยวกับโปรโตคอลสำหรับการรับหัวข้อจากพาร์ทเนอร์ฝั่งขาย Topics เป็นสัญญาณใหม่ที่พาร์ทเนอร์ฝั่งขายจะแชร์เป็นส่วนหนึ่งของคําขอโฆษณา ผู้บริโภคฝั่งซื้อจะต้องตรวจสอบว่าได้ทํางานร่วมกับพาร์ทเนอร์ช่องทางต้นทางเกี่ยวกับวิธีแชร์ Topics
  • ใช้หัวข้อในโมเดลการเสนอราคาและการเพิ่มประสิทธิภาพ คาดว่า Topics API จะช่วยเสริมสัญญาณอื่นๆ เช่น บริบท เพื่อช่วยค้นหาโฆษณาที่เหมาะสมสำหรับผู้เข้าชม

วิธีที่ API อนุมานหัวข้อสําหรับแอป

ใน Android นั้น Topics API จะอนุมานหัวข้อสําหรับแอปโดยอิงตามข้อมูลแอปโดยใช้โมเดลการจัดประเภท การใช้งานปัจจุบัน Topics ใช้ชื่อแอปและชื่อแพ็กเกจเพื่อกำหนดหัวข้อที่คุณสนใจให้กับแอป แต่อาจขยายการให้บริการนี้ให้รวมข้อมูลอื่นๆ ด้วย เช่น คำอธิบายแอป

ตัวแยกประเภทหัวข้อ

หัวข้อที่น่าสนใจมาจากโมเดลการจัดประเภทที่ได้รับการฝึกด้วยข้อมูลแอปที่เผยแพร่ต่อสาธารณะ

  • เมื่อใช้โมเดลการจัดประเภทเพื่ออนุมานเพื่อคํานวณหัวข้อของยุคหนึ่งๆ ชุดสัญญาณที่ใช้จะยังคงอยู่ในอุปกรณ์ ชุดสัญญาณนี้อาจรวมถึงแอปที่ติดตั้งหรือใช้ล่าสุด และอาจขยายให้รวมสัญญาณอื่นๆ เพิ่มเติมในภายหลัง
  • Google ฝึกโมเดล V5 ด้วยข้อมูลแอปที่พร้อมใช้งานแบบสาธารณะซึ่งมีป้ายกำกับโดยมนุษย์ 540,000 รายการและป้ายกำกับ ML 17 ล้านรายการจาก App Store เช่น Google Play Store โมเดลนี้ใช้ชื่อแอปและชื่อแพ็กเกจเป็นสัญญาณอินพุต และพร้อมให้นักพัฒนาแอปทดสอบและดูว่าแอปของตนจัดประเภทเป็นหัวข้อใดบ้างโดยไม่มีค่าใช้จ่าย
  • แอปอาจแมปกับหัวข้อมากกว่า 1 หัวข้อ กับหัวข้อใดเลย หรือไม่ได้เพิ่มลงในประวัติหัวข้อของผู้ใช้ ในกรณีที่แอปจับคู่กับหัวข้อมากกว่า 1 หัวข้อในการจัดหมวดหมู่ จำนวนหัวข้อที่เลือกสำหรับแอปนี้จะจำกัดอยู่ที่ 3 อันดับแรก

หากต้องการทําความเข้าใจวิธีการทำงานของโมเดลการจัดประเภทให้ดียิ่งขึ้น คุณสามารถทดสอบว่าข้อมูลแอปต่างๆ ส่งผลต่อการจัดประเภทอย่างไรได้โดยใช้ Android Topics Classifier Colab

การจัดหมวดหมู่

ระบบจะเลือกหัวข้อจากการจัดหมวดหมู่โอเพนซอร์สที่กำหนดไว้ล่วงหน้า การจัดหมวดหมู่นี้เผยแพร่ต่อสาธารณะและอาจมีการเปลี่ยนแปลง คุณสามารถส่งคำแนะนำได้โดยใช้ปุ่มความคิดเห็นที่ด้านบนของหน้านี้ การจัดหมวดหมู่นี้ดูแลจัดการโดยเจ้าหน้าที่เพื่อให้หัวข้อที่ละเอียดอ่อนไม่เป็นส่วนหนึ่งของการจัดหมวดหมู่ โดยจะปรับให้เหมาะกับหมวดหมู่โฆษณาที่แสดงในแอปบนอุปกรณ์เคลื่อนที่ใน Android ได้

หัวข้อใน Android ในทางปฏิบัติ

สมมติว่าผู้ใช้ติดตั้งแอป 7 แอปในอุปกรณ์ ได้แก่ ก, ข, ค, ง, จ, ฉ และช สมมติว่าการจัดประเภทหัวข้อสําหรับแอปและ SDK เทคโนโลยีโฆษณาในแอปเหล่านี้มีดังนี้

App การจัดประเภทหัวข้อ SDK เทคโนโลยีโฆษณา
A T1, T5 ad-sdk1, ad-sdk2
B T2 ad-sdk2
C T3, T6 ad-sdk3, ad-sdk4
D T1, T4 ad-sdk1
E T5 ad-sdk4, ad-sdk5
F T6 ad-sdk2, ad-sdk3, ad-sdk4
G T7 ad-sdk2

สิ้นสุดสัปดาห์ที่ 1: Topics API จะสร้าง 5 หัวข้อยอดนิยมของผู้ใช้สำหรับ Epoch นี้

หัวข้อยอดนิยม ผู้โทรที่รับข้อมูลเกี่ยวกับหัวข้อได้
T1 ad-sdk1, ad-sdk2
T2 ad-sdk2
T3 ad-sdk3, ad-sdk4
T4 ad-sdk1
T5 ad-sdk1, ad-sdk2, ad-sdk4, ad-sdk5

ในสัปดาห์ที่ 2 หากผู้โทรในแอปใดก็ตามเรียกใช้ API รายการหัวข้อที่แสดงผลจะมีเฉพาะหัวข้อที่ผู้โทรอยู่ในคอลัมน์ "ผู้โทรที่เรียนรู้เกี่ยวกับหัวข้อได้" สำหรับหัวข้อนั้นในแอปนั้นสำหรับช่วงเวลานั้น

  • กรอบเวลาประวัติที่รวมอยู่ในการคำนวณหัวข้อที่พร้อมใช้งานสำหรับผู้เรียกแต่ละรายคือ 3 ยุค (หรือ 3 สัปดาห์)
  • ระบบจะใช้เฉพาะหัวข้อที่เชื่อมโยงกับแอปที่เรียกใช้ Topics API ผ่าน SDK โฆษณาเท่านั้น ซึ่งหมายความว่าหากแอปไม่มี SDK โฆษณาที่เรียก Topics API หัวข้อที่เชื่อมโยงกับแอปนั้นจะไม่รวมอยู่ในกลุ่มหัวข้อที่ SDK โฆษณาเข้าถึงได้
  • นอกจากนี้ แอปยังเลือกไม่ใช้ Topics API ได้ด้วย หัวข้อที่เชื่อมโยงกับแอปที่เลือกไม่ใช้จะไม่รวมอยู่ในการคํานวณหัวข้อรายสัปดาห์ เอกสารนี้จะได้รับการอัปเดตเพื่อรวมรายละเอียดการใช้งานที่เกี่ยวข้อง

หากมีการใช้งานแอปไม่เพียงพอที่แพลตฟอร์มจะอนุมานหัวข้อได้ 5 หัวข้อ แพลตฟอร์มอาจพิจารณาตัวเลือกต่างๆ เช่น การสร้างหัวข้อที่เหลือแบบสุ่ม

การเข้ารหัสหัวข้อที่แสดง

แพลตฟอร์มเทคโนโลยีโฆษณาที่ลงทะเบียนซึ่งเรียกใช้ Topics API จะต้องระบุคีย์การเข้ารหัสด้วยเพื่อให้มั่นใจว่าหัวข้อที่แสดงจะอ่านได้เฉพาะผู้ที่เรียกใช้เท่านั้น

Privacy Sandbox จะดึงข้อมูลคีย์เหล่านี้จากปลายทางที่เทคโนโลยีโฆษณาระบุ เราขอแนะนําแนวทางปฏิบัติแนะนำให้อัปเดตคีย์เป็นประจำ แต่อย่างน้อยทุก 6 เดือน

Privacy Sandbox จะขอให้เทคโนโลยีโฆษณายืนยันความพร้อมใช้งานของปลายทางที่ระบุในระหว่างขั้นตอนการลงทะเบียน ดูรายละเอียดเพิ่มเติมเกี่ยวกับการดำเนินการที่จําเป็นสำหรับเทคโนโลยีโฆษณาที่ลงทะเบียนแล้วและที่ลงทะเบียนใหม่ได้ที่คู่มือการลงทะเบียน

Next steps

Check out implementation details and code samples for callers to observe and access topics.
Learn how users and developers can manage and customize the Topics API to suit user's preferences and needs.

See also

Check out our resources to better understand the Topics API on Android.