ดูข้อมูลเกี่ยวกับ 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&Band/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.htmlor download the appcats. - 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.
- Greenhouse, for example an app named Greenhouse or a website greenhouse.example, associated with the topic
- 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 & Gardenas 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/Tennisas 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 & GardenorSports/Tennistopic (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 topicSports/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.
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 และแสดงความคิดเห็น
- ทดลองใช้ Sample App ของ Topics API เพื่อดูว่าระบบจะแสดงข้อมูลหัวข้อใดจากเครื่องมือคัดแยกในอุปกรณ์
- อัปเดตโฟลว์ของแอปและ SDK เพื่อเริ่มเรียกใช้ Topics API
- อัปเดตโปรโตคอลเพื่อเริ่มส่งหัวข้อในคำขอโฆษณา
- ลงทะเบียนเทคโนโลยีโฆษณาของคุณกับ Privacy Sandbox
สำหรับเทคโนโลยีโฆษณาฝั่งผู้ขาย
- เป็นผู้สังเกตการณ์เพื่อสร้างร่องรอยของ 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 จะใช้ชื่อแอปและชื่อแพ็กเกจเพื่อกำหนดหัวข้อที่สนใจให้กับแอป แต่ในอนาคตอาจขยายการใช้งานให้รวมข้อมูลอื่นๆ เช่น คำอธิบายแอป
ตัวแยกประเภทหัวข้อ
ระบบจะดึงหัวข้อที่น่าสนใจจากโมเดลตัวแยกประเภทที่ได้รับการฝึกโดยใช้ข้อมูลแอปที่เผยแพร่ต่อสาธารณะ
- เมื่อใช้โมเดลตัวแยกประเภทสำหรับการอนุมานเพื่อคำนวณหัวข้อสำหรับ Epoch ที่กำหนด ชุดสัญญาณที่ใช้จะยังคงอยู่ในอุปกรณ์ ชุดสัญญาณนี้อาจรวมถึงแอปที่ติดตั้งหรือใช้ล่าสุด และอาจขยายให้รวมสัญญาณอื่นๆ ในภายหลัง
- โมเดล V5 ได้รับการฝึกโดย Google จากข้อมูลแอปที่เปิดเผยต่อสาธารณะจำนวน 540,000 รายการซึ่งมีป้ายกำกับจากมนุษย์ และข้อมูลแอปจำนวน 17 ล้านรายการซึ่งมีป้ายกำกับ ML จาก App Store เช่น Google Play Store โมเดลใช้ชื่อแอปและชื่อแพ็กเกจเป็นสัญญาณอินพุต และพร้อมให้นักพัฒนาแอปทดสอบและดูว่าแอปของตนจัดอยู่ในหมวดหมู่ใด
- แอปอาจแมปกับหัวข้อมากกว่า 1 หัวข้อ หรือไม่แมปกับหัวข้อใดเลย หรืออาจไม่ได้เพิ่มลงในประวัติหัวข้อของผู้ใช้ ในกรณีที่แอปเชื่อมโยงกับมากกว่า 1 หัวข้อในอนุกรมวิธาน ระบบจะจำกัดจำนวนหัวข้อที่เลือกสำหรับแอปนี้ไว้ที่ 3 อันดับแรก
หากต้องการทำความเข้าใจวิธีการทำงานของโมเดลตัวแยกประเภทให้ดียิ่งขึ้น คุณสามารถทดสอบว่าข้อมูลแอปต่างๆ ส่งผลต่อการแยกประเภทอย่างไรได้โดยใช้ Android Topics Classifier Colab
การจัดหมวดหมู่
ระบบจะเลือกหัวข้อจากการจัดหมวดหมู่โอเพนซอร์สที่กำหนดไว้ล่วงหน้า การจัดหมวดหมู่เผยแพร่ต่อสาธารณะและอาจมีการเปลี่ยนแปลง คุณส่งคำแนะนำได้โดยใช้ปุ่มความคิดเห็นที่ด้านบนของหน้านี้ การจัดหมวดหมู่นี้ได้รับการดูแลจัดการโดยเจ้าหน้าที่เพื่อให้หัวข้อที่ละเอียดอ่อนไม่ได้เป็นส่วนหนึ่งของการจัดหมวดหมู่ โดยจะปรับให้เหมาะกับหมวดหมู่ของโฆษณาที่แสดงในแอปบนอุปกรณ์เคลื่อนที่ใน Android ได้
หัวข้อใน Android ในทางปฏิบัติ
สมมติว่าผู้ใช้ติดตั้งแอป 7 แอปในอุปกรณ์ ได้แก่ A, B, C, D, E, F และ G สมมติว่าการจัดหมวดหมู่หัวข้อสำหรับแอปและ 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 นี้
| Top Topic | ผู้โทรที่สามารถดูข้อมูลเกี่ยวกับหัวข้อ |
| 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
Implement Topics
Control & transparency
See also
Check out our resources to better understand the Topics API on Android.
- Check out Topics sample apps, collab and walkthrough videos.
- See how users and developers can control the API.
- Check out the support resources to ask questions, engage and share feedback.