ตั้งแต่วันที่ 27 มีนาคม 2025 เป็นต้นไป เราขอแนะนำให้ใช้ android-latest-release
แทน aosp-main
เพื่อสร้างและมีส่วนร่วมใน AOSP โปรดดูข้อมูลเพิ่มเติมที่หัวข้อการเปลี่ยนแปลงใน AOSP
การตั้งค่าที่ปรับเปลี่ยนในแบบของคุณ
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
แอปการตั้งค่า Android จะแสดงรายการคำแนะนำแก่ผู้ใช้ใน Android 8.0
โดยปกติแล้ว คำแนะนำเหล่านี้จะโปรโมตฟีเจอร์ของโทรศัพท์ และปรับแต่งได้ (เช่น "ตั้งเวลาโหมดห้ามรบกวน" หรือ "เปิดการโทรผ่าน Wi-Fi") ฟีเจอร์นี้จะจัดอันดับคำแนะนำโดยอิงตามสัญญาณตามบริบทหรือการโต้ตอบที่ผ่านมาของผู้ใช้กับคำแนะนำ
รูปแบบการจัดอันดับเริ่มต้นปัจจุบันของโปรเจ็กต์โอเพนซอร์สของ Android (AOSP) อิงตามการโต้ตอบก่อนหน้านี้ของผู้ใช้กับคำแนะนำ ซึ่งเป็นรูปแบบเชิงเส้นอย่างง่ายที่ได้รับการฝึกด้วยโลจิสติกส์รีเกรชันเพื่อถ่วงน้ำหนักสัญญาณการโต้ตอบอย่างเหมาะสม การใช้งานเริ่มต้นจะใช้คำแนะนำที่แสดง คลิก หรือปิดเป็นตัวบ่งชี้พร้อมกับความใหม่ของเหตุการณ์เหล่านี้เพื่อจัดอันดับคำแนะนำและเพิ่มโอกาสในการคาดการณ์การโต้ตอบของผู้ใช้กับคำแนะนำเหล่านี้
โมเดลนี้สร้างขึ้นโดยใช้ข้อมูลผู้ใช้ที่บันทึกไว้จํานวนจํากัด ผู้ผลิตอุปกรณ์ (OEM) สามารถพัฒนารูปแบบการจัดอันดับของตนเองโดยอิงตามข้อมูลที่รวบรวม และอาจรวมสัญญาณตามบริบทและปรับเทียบการจัดอันดับ
การใช้งาน
ค้นหาการใช้งาน packages/apps/Settings/src/com/android/settings/dashboard/suggestions/SuggestionRanker.java
เริ่มต้นใน AOSP
ฟีเจอร์นี้ได้รับการปกป้องโดย Flag isSmartSuggestionEnabled
ซึ่งตั้งค่าเป็น false โดยค่าเริ่มต้น หากเปิดใช้ (ตั้งค่าเป็น "จริง") ฟีเจอร์จะทำงานโดยไม่มีการแก้ไขเพิ่มเติมโดยใช้การใช้งาน AOSP เริ่มต้น OEM สามารถใช้การติดตั้งใช้งานเริ่มต้นหรือแนะนำการติดตั้งใช้งานของตนเองเพื่อเปิดใช้ฟีเจอร์นี้ได้
OEM อาจปรับแต่งฟีเจอร์นี้โดยใช้ฟีเจอร์ platform/packages/apps/Settings/src/com/android/settings/dashboard/suggestions/SuggestionFeatureProvider.java
และลบล้างเมธอด rankSuggestions
ของไฟล์
วิธีนี้จะรับ 2 รายการที่มีการ์ดคำแนะนำและรหัสคำแนะนำที่เกี่ยวข้อง วิธีนี้ควรจัดเรียงการ์ดในรายการใหม่ตามคะแนนการจัดอันดับที่ต้องการเท่านั้น คุณสามารถใช้ suggestionIds เพื่อระบุคำแนะนำที่ไม่ซ้ำกันและดึงข้อมูลที่ผ่านมาที่จำเป็นเกี่ยวกับคำแนะนำนั้นๆ ทั้งนี้ขึ้นอยู่กับการใช้งานการจัดอันดับ (เช่น ความใหม่ของการโต้ตอบกับคำแนะนำนี้)
การตรวจสอบความถูกต้อง
ผู้ใช้งานสามารถตรวจสอบว่าฟีเจอร์เวอร์ชันของตนทํางานได้ตามที่ต้องการโดยเขียนการทดสอบยูนิตของตนเองให้คล้ายกับ packages/apps/Settings/tests/robotests/src/com/android/settings/dashboard/suggestions/SuggestionRankerTest.java
เพื่อยืนยันการจัดอันดับ
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-27 UTC
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2025-07-27 UTC"],[],[],null,["# Personalized settings\n\nThe Android Settings app provides a list of suggestions to the users in Android 8.0.\nThese suggestions typically promote features of the phone, and they are customizable\n(e.g., \"Set Do Not Disturb schedule\" or \"Turn on Wi-Fi Calling\"). This feature provides\nranking for suggestions, based on any contextual signal or the user's past interactions\nwith suggestions.\n\n\nThe current default Android Open Source Project (AOSP) ranking model is based on\nuser's previous interactions with the suggestion, which is a simple linear model\ntrained with logistic regression to properly weight the interaction signals. The\ndefault implementation uses suggestions shown, clicked or dismissed as\nindicators along with the recency of these events to rank the suggestions and\nincrease the chance of predicting a user's interaction with these suggestions.\nThis model was built with a limited amount of logged user data. Device manufacturers\n(OEMs) can develop their own ranking model based on any collected data and potentially\ninclude contextual signals and calibrate the ranking.\n\nImplementation\n--------------\n\n\nFind the default `packages/apps/Settings/src/com/android/settings/dashboard/suggestions/SuggestionRanker.java` implementation in AOSP.\n\n\nThis feature is guarded by a flag, `isSmartSuggestionEnabled`, which\nis set to false by default. If enabled (set to true), the feature operates\nwithout additional modification using the default AOSP implementation. OEMs can\neither use the default implementation or introduce their own implementation to\nenable this feature.\n\n\nOEMs may customize the feature by implementing `platform/packages/apps/Settings/src/com/android/settings/dashboard/suggestions/SuggestionFeatureProvider.java\n` feature and Overriding the file's `rankSuggestions` method.\nThis method gets two lists containing suggestion Tiles and the corresponding\nsuggestionIds. This method should reorder the tiles in the list only according\nto the desired ranking score. The suggestionIds can be used to uniquely identify\nsuggestions and extract the required past information about the suggestion,\ndepending on the ranking implementation (e.g., recency of interaction with this\nparticular suggestion).\n\nValidation\n----------\n\n\nImplementers can ensure their version of the feature works as intended by\nwriting their own unit tests similar to `packages/apps/Settings/tests/robotests/src/com/android/settings/dashboard/suggestions/SuggestionRankerTest.java` to verify the ranking."]]