เป้าหมายที่กรองแล้วในบริการด้านสุขภาพ
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ตอนนี้บริการด้านสุขภาพรองรับเป้าหมายที่กรองการเปลี่ยนแปลงสำหรับเมตริกแบบเรียลไทม์ เช่น
อัตราการเต้นของหัวใจ ระยะทาง และความเร็ว เป้าหมายที่กรองแล้วจะช่วยปรับปรุงประสบการณ์ของผู้ใช้
สำหรับผู้ที่ต้องการรักษาระดับหรือช่วงที่เฉพาะเจาะจง เช่น อัตราการเต้นของหัวใจ
ตลอดการออกกำลังกาย
เป้าหมายที่กรองการตีกลับจะป้องกันไม่ให้มีการปล่อยเหตุการณ์เดียวกันหลายครั้งทุกครั้งที่เงื่อนไขเป็นจริงในช่วงเวลาสั้นๆ แต่จะปล่อยเหตุการณ์ก็ต่อเมื่อมีการเกินเกณฑ์อย่างต่อเนื่องเป็นระยะเวลาที่กำหนดค่าได้ ซึ่งโดยปกติแล้วคือ 2-3 วินาที ระยะเวลาที่เกณฑ์คือระยะเวลา
แบบต่อเนื่องที่ผู้ใช้ต้องข้ามเกณฑ์ที่ระบุก่อนที่
บริการด้านสุขภาพจะส่งเหตุการณ์การแจ้งเตือน
นอกจากนี้ คุณยังป้องกันไม่ให้มีการส่งเหตุการณ์ทันทีหลังจากลงทะเบียนเป้าหมายได้ด้วย
การหน่วงเวลาเริ่มต้นคือระยะเวลาที่ต้องผ่านไปนับตั้งแต่การลงทะเบียนเป้าหมาย
ก่อนที่ระบบจะแจ้งเตือนแอปของคุณ
เมื่อรวมกันแล้ว "ระยะเวลาที่เกณฑ์" และ "การหน่วงเวลาเริ่มต้น" จะช่วยลดจำนวนผลบวกลวงและการแจ้งเตือนซ้ำที่แสดงต่อผู้ใช้ หากแอปของคุณอนุญาตให้ผู้ใช้ตั้งเป้าหมายหรือเป้าหมายการออกกำลังกาย
กรณีศึกษา: อัตราการเต้นของหัวใจ
กรณีการใช้งานทั่วไปสำหรับเป้าหมายที่กรองการตีกลับเกี่ยวข้องกับโซนอัตราการเต้นของหัวใจ อัตราการเต้นของหัวใจ
จะผันผวนอย่างต่อเนื่องตลอดการออกกำลังกาย โดยเฉพาะในระหว่าง
กิจกรรมที่เน้นคาร์ดิโอ หากไม่รองรับการดีบาวซ์ แอปอาจได้รับการแจ้งเตือนจำนวนมากในระยะเวลาอันสั้น เช่น ทุกครั้งที่อัตราการเต้นของหัวใจของผู้ใช้สูงหรือต่ำกว่าช่วงเป้าหมาย
การกำหนด "ระยะเวลาหน่วงเริ่มต้น" จะช่วยให้คุณแจ้งให้ Health Services ส่งการแจ้งเตือนเป้าหมายหลังจากผ่านระยะเวลาที่ระบุแล้วเท่านั้น ซึ่งคุณอาจคิดว่านี่คือระยะเวลาปรับตัว การใช้ "ระยะเวลาที่เกณฑ์" จะช่วยให้คุณปรับแต่งได้มากยิ่งขึ้นโดยการระบุระยะเวลาที่ต้องผ่านไปในขณะที่ผู้ใช้อยู่ในหรือนอกเกณฑ์ที่ระบุเพื่อให้เป้าหมายเปิดใช้งาน
ในทางปฏิบัติ การดำเนินการนี้อาจเกี่ยวข้องกับการรอให้ผู้ใช้อยู่นอกช่วงอัตราการเต้นของหัวใจเป้าหมาย
เป็นเวลา 15 วินาทีก่อนที่แอปจะแจ้งให้ผู้ใช้ทราบเพื่อเพิ่มหรือ
ลดความเข้มข้นของการออกกำลังกาย
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา 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,["# Debounced goals in Health Services\n\nHealth Services now supports *debounced goals* for instantaneous metrics, such\nas heart rate, distance, and speed. Debounced goals improve the user experience\nfor people who want to maintain a specific threshold or range---such as heart\nrate---throughout their workout.\n\nDebounced goals prevent the same event from being emitted multiple times---every\ntime the condition is true---over a short time period. Instead, events are emitted\nonly if the threshold has been continuously exceeded for a configurable period\nof time, usually some number of seconds. **Duration at threshold** is the amount\nof uninterrupted time the user needs to cross the specified threshold before\nHealth Services sends an alert event.\n\nYou can also prevent events from being emitted immediately after goal\nregistration. **Initial delay** is the amount of time that must pass, since goal\nregistration, before your app is notified.\n\nWhen combined, \"duration at threshold\" and \"initial delay\" reduce the number of\nfalse positives and repeated alerts surfaced to users if your app lets users set\nfitness goals or targets.\n\nCase study: heart rate\n----------------------\n\nA common use case for debounced goals involves heart rate zones. Heart rate\ncontinuously fluctuates throughout an exercise, especially during\ncardio-intensive activities. Without support for debouncing, an app might get\nmany alerts in a short period of time, such as each time the user's heart rate\ndips above or below the target range.\n\nBy introducing an \"initial delay,\" you can inform Health Services to send a goal\nalert only after a specified time period has passed--you can think of this as an\nadjustment period. By introducing a \"duration at threshold,\" you can take this\ncustomization further, by specifying the amount of time that must elapse while\nthe user is in or out of the specified threshold for their goal to be activated.\n\nIn practice, this might involve waiting for the user to be out of their target\nheart rate range for 15 seconds before your app lets them know to increase or\ndecrease their exercise intensity."]]