行業洞察
2026-10-21 15:33:45

5GC 中由 AMF 發起的清除程序:UDM 信令與脈絡清理

AMF 清除在取消註冊後移除本機用戶資料與行動性脈絡。SDM Unsubscribe、UECM PATCH、purgeFlag、GUAMI 驗證及各存取的狀態決定清理是否一致。

貝克電信

5GC 中由 AMF 發起的清除程序:UDM 信令與脈絡清理

AMF 清除是指 UE 被隱式或顯式取消註冊後,可選擇移除儲存在本機的用戶資料與行動性管理(MM)脈絡。相關 UDM 信令會取消訂閱資料通知,並將相應存取的註冊標記為已清除。此操作不會刪除已佈建的用戶帳戶。

典型調查從無法聯繫的 UE 與舊 AMF 脈絡開始。工程上需確認能否捨棄該脈絡、哪些 UDM 關聯必須變更,以及較新或仍有效的註冊狀態是否持續受到保護。主要交換操作為 Nudm_SDM_Unsubscribe 與 Nudm_UECM_Deregistration。

AMF 清除何時接續取消註冊執行

3GPP 將此程序稱為清除 AMF 中的用戶資料。在 TS 23.502,Release 18,第 4.5.3 節中,取消註冊後清除本機用戶資料與 MM 脈絡屬於實作選項。如果 AMF 選用此選項,就必須向 UDM 執行相關的取消訂閱與取消註冊操作。

計時器到期時,此區別非常重要。計時器條件屬於可達性與隱式取消註冊的處理範圍;它們並未建立通用清除計時器,也不要求立即刪除所有 UE 記錄。應先確認相關註冊為何結束,再判斷 AMF 是否選擇清除保留的脈絡。

程序目的應檢查的證據
初始註冊建立存取與行動性註冊Registration Request、訂閱擷取與 Registration Accept
取消註冊結束適用存取的註冊觸發原因、存取範圍、適用時的 NAS 交換及註冊狀態
AMF 清除捨棄保留的本機資料並同步 UDM本機清理、SDM Unsubscribe 與 UECM 清除指示

關於網路發起的取消註冊程序,其內容涵蓋前置決策與任何傳送給 UE 的通知。清除本身不需要 UE 發送新的 Registration Request 或 NAS Deregistration Accept。在隱式情境中,UE 可能已經無法使用。

註冊、取消註冊及後續 AMF 清除的概念比較
註冊建立關聯,取消註冊結束適用的註冊,而選擇性的 AMF 清除處理保留的本機資料。丟棄符號不代表刪除 UDM 中的用戶帳戶。

哪些內容會移除,哪些可能保留

請區分三類狀態。AMF 的用戶資料副本包含為處理存取與行動性而取得的資訊。其 MM 脈絡支援 UE 的行動性與註冊管理。SDM 訂閱則是獨立的通知關聯,UDM 透過它回報所訂閱資料的變更。

UDM 也透過 UE 脈絡管理(UECM)維護 AMF 註冊資訊。清除期間,這些資訊會針對相關存取更新為含有已清除指示的狀態。若將操作簡稱為「刪除 UDM 註冊」,就會掩蓋移除 SDM 訂閱資源與修改 AMF 註冊資源之間的差異。

清除也不等於撤銷服務使用資格。已佈建的用戶訂閱仍是獨立事項。UE 稍後返回時,會執行適當的註冊程序,存取許可取決於當時有效的訂閱與網路條件。初始註冊信令流程涵蓋身分、驗證及必要服務脈絡的重建。

3GPP 與非 3GPP 存取並存時,存取範圍至關重要。結束其中一個存取的註冊,不能證明 UE 在另一個存取上沒有有效關聯。在將剩餘脈絡視為洩漏前,應確認哪個存取已結束,以及哪些剩餘狀態仍需要該脈絡。同樣地,請使用PDU 工作階段釋放程序調查 SMF 與 UPF 工作階段資源;AMF 清除確認並不能證明這些資源已刪除。

SDM Unsubscribe 移除通知訂閱

參考流程在本機用戶資料與 MM 脈絡清除後,才開始與 UDM 交換訊息。流程先呈現 SDM Unsubscribe 請求及回應,再接續 UECM Deregistration 請求及回應。因此,不應將本機刪除描述為必須等到兩個 UDM 回應皆收到後才執行的強制最後步驟。

對於個別 SDM 訂閱,AMF 會向建立該訂閱時由 Location 標頭識別的訂閱資源發送 HTTP DELETE。以下為示意路徑:

SDM 訂閱資源

DELETE {apiRoot}/nudm-sdm/v2/{supi}/sdm-subscriptions/{subscriptionId}

關聯封包時,應使用實際儲存的訂閱 URI 與已部署的 API 版本。此範例是資源模式,不能取代 UDM 傳回的 URI。請核對 SUPI、訂閱 ID 與來源 AMF,以免將其他脈絡的訂閱誤認為過時的訂閱。

成功移除會傳回 204 No Content。TS 29.503 第 5.2.2.4.2 節也說明了 404 Not Found,用於沒有有效訂閱的情況,例如訂閱 ID 不明。遇到 404 應檢查先前的刪除嘗試與原始建立回應。僅憑此狀態無法確認整個清除已成功。

移除後,該訂閱不再向 AMF 提供後續資料變更通知。同一用戶的其他訂閱必須分別評估。任何相應的 UDM 至 UDR 處理都屬於程序的 UDM 端,不應假設僅在 AMF 擷取的封包中可以看見這些處理。

UECM Deregistration 設定特定存取的清除旗標

對於 AMF 取消註冊,服務操作名稱並不表示 HTTP DELETE。TS 29.503,Release 18,第 5.3.2.4.2 與 5.3.2.4.3 節將其對應至適用 AMF 註冊資源上的 PATCH:

特定存取的 UECM 資源

PATCH {apiRoot}/nudm-uecm/v1/{ueId}/registrations/amf-3gpp-access
PATCH {apiRoot}/nudm-uecm/v1/{ueId}/registrations/amf-non-3gpp-access

此處,{ueId}是本操作的 SUPI。修改資料包含 guami 與 purgeFlag: true。這些是 JSON 屬性的正確拼寫;「PurgeFlag」也用作規範中的型別名稱。請勿自行增加清除端點,也不要將這兩個存取資源視為可互換資源。

UDM 在設定旗標前,會將收到的 GUAMI 與儲存的註冊進行驗證。成功請求收到 204 No Content;GUAMI 不符則得到 403 Forbidden。第 6.2.6.2.7 與 6.2.6.2.8 節的修改表明確要求,若 MCC、MNC、AMF Region ID 或 AMF Set ID 不同,必須拒絕請求。

此驗證與來自舊服務脈絡的延遲清理有關。作為疑難排解時的推論,不符可能表示服務註冊已變更,而非應強制執行清理。在將每個 403 都歸因於授權設定問題前,應比較註冊歷程與請求的歸屬。

呈現 SDM Unsubscribe、UECM Deregistration、GUAMI 與 PurgeFlag 的 AMF 和 UDM 示意圖
SDM Unsubscribe 移除通知訂閱;UECM Deregistration 更新存取註冊的 purgeFlag。劃掉的用戶符號僅為概念表達,不表示刪除 UDM 用戶帳戶或整個 AMF 註冊資源。

如何診斷未完成的 AMF 清除

請將本機 AMF 記錄與 SBI 交易關聯。HTTP 成功回應確認的是個別 UDM 操作,本機脈絡移除則需要另外的證據。在此清除程序之前,註冊管理已進入相應的取消註冊狀態;不應將最後的 UECM 回應視為首次使 UE 進入 RM-DEREGISTERED 的事件。

觀察結果下一步檢查
SDM DELETE 傳回 404找回原始訂閱 URI,並檢查先前的移除或重試歷程。
UECM PATCH 傳回 403將請求的 GUAMI 與目前儲存的註冊及近期 AMF 變更進行比較。
SDM 移除成功,但 UECM 更新失敗分別追蹤兩項結果;通知清理並不能證明已記錄清除指示。
UDM 操作成功,但本機脈絡仍存在檢查是否選擇清除、本機刪除記錄,以及任何仍有效的存取狀態。
只有一個存取被清除在將另一個存取保留的狀態判定為錯誤前,先驗證其實際註冊情況。

每次嘗試都應記錄 SUPI、服務 AMF、存取資源、訂閱 URI、回應狀態及時間戳記。請區分舊請求重試與同一用戶的新註冊。在與伺服器端處理關聯之前,逾時表示交易結果未知,並非 UDM 未做任何變更的證據。

列出 SUPI、訂閱 ID、GUAMI、PurgeFlag、MM 脈絡與 RM-DEREGISTERED 的 AMF 清除追蹤分析示意圖
追蹤檢查必須關聯受影響的存取與服務脈絡。該圖不是封包時序圖,RM-DEREGISTERED 是清除情境的先決條件,而非最終回應建立的新狀態。

常見問題

為什麼記錄的時間戳記看起來可能與程序順序矛盾?

首先檢查時鐘同步、記錄緩衝,以及項目記錄的是請求建立、傳送、處理還是完成。在認定實作調整了程序順序前,請比較交易識別碼與交換雙方。記錄的顯示順序不一定等同處理順序。

應如何準備提供給外部支援的清除追蹤資料?

移除憑證、權杖及不必要的用戶資料。以一致方式取代用戶識別碼,讓交易仍可關聯,並保留相關存取類型、回應原因、時間戳記與版本資訊。透過營運商核准的支援流程分享追蹤資料。

調查部署問題時應使用哪個規範版本?

從網路宣告的版本、支援的 API 版本及實作文件著手。此處參考資料標明了本說明使用的 Release 18 修訂版。在將細節套用至不同版本或軟體建置之前,請比較任何相關變更。

推薦產品
目錄
客服 電話
We use cookie to improve your online experience. By continuing to browse this website, you agree to our use of cookie.

Cookies

This Cookie Policy explains how we use cookies and similar technologies when you access or use our website and related services. Please read this Policy together with our Terms and Conditions and Privacy Policy so that you understand how we collect, use, and protect information.

By continuing to access or use our Services, you acknowledge that cookies and similar technologies may be used as described in this Policy, subject to applicable law and your available choices.

Updates to This Cookie Policy

We may revise this Cookie Policy from time to time to reflect changes in legal requirements, technology, or our business practices. When we make updates, the revised version will be posted on this page and will become effective from the date of publication unless otherwise required by law.

Where required, we will provide additional notice or request your consent before applying material changes that affect your rights or choices.

What Are Cookies?

Cookies are small text files placed on your device when you visit a website or interact with certain online content. They help websites recognize your browser or device, remember your preferences, support essential functionality, and improve the overall user experience.

In this Cookie Policy, the term “cookies” also includes similar technologies such as pixels, tags, web beacons, and other tracking tools that perform comparable functions.

Why We Use Cookies

We use cookies to help our website function properly, remember user preferences, enhance website performance, understand how visitors interact with our pages, and support security, analytics, and marketing activities where permitted by law.

We use cookies to keep our website functional, secure, efficient, and more relevant to your browsing experience.

Categories of Cookies We Use

Strictly Necessary Cookies

These cookies are essential for the operation of the website and cannot be disabled in our systems where they are required to provide the service you request. They are typically set in response to actions such as setting privacy preferences, signing in, or submitting forms.

Without these cookies, certain parts of the website may not function correctly.

Functional Cookies

Functional cookies enable enhanced features and personalization, such as remembering your preferences, language settings, or previously selected options. These cookies may be set by us or by third-party providers whose services are integrated into our website.

If you disable these cookies, some services or features may not work as intended.

Performance and Analytics Cookies

These cookies help us understand how visitors use our website by collecting information such as traffic sources, page visits, navigation behavior, and general interaction patterns. In many cases, this information is aggregated and does not directly identify individual users.

We use this information to improve website performance, usability, and content relevance.

Targeting and Advertising Cookies

These cookies may be placed by our advertising or marketing partners to help deliver more relevant ads and measure the effectiveness of campaigns. They may use information about your browsing activity across different websites and services to build a profile of your interests.

These cookies generally do not store directly identifying personal information, but they may identify your browser or device.

First-Party and Third-Party Cookies

Some cookies are set directly by our website and are referred to as first-party cookies. Other cookies are set by third-party services, such as analytics providers, embedded content providers, or advertising partners, and are referred to as third-party cookies.

Third-party providers may use their own cookies in accordance with their own privacy and cookie policies.

Information Collected Through Cookies

Depending on the type of cookie used, the information collected may include browser type, device type, IP address, referring website, pages viewed, time spent on pages, clickstream behavior, and general usage patterns.

This information helps us maintain the website, improve performance, enhance security, and provide a better user experience.

Your Cookie Choices

You can control or disable cookies through your browser settings and, where available, through our cookie consent or preference management tools. Depending on your location, you may also have the right to accept or reject certain categories of cookies, especially those used for analytics, personalization, or advertising purposes.

Please note that blocking or deleting certain cookies may affect the availability, functionality, or performance of some parts of the website.

Restricting cookies may limit certain features and reduce the quality of your experience on the website.

Cookies in Mobile Applications

Where our mobile applications use cookie-like technologies, they are generally limited to those required for core functionality, security, and service delivery. Disabling these essential technologies may affect the normal operation of the application.

We do not use essential mobile application cookies to store unnecessary personal information.

How to Manage Cookies

Most web browsers allow you to manage cookies through browser settings. You can usually choose to block, delete, or receive alerts before cookies are stored. Because browser controls vary, please refer to your browser provider’s support documentation for details on how to manage cookie settings.

Contact Us

If you have any questions about this Cookie Policy or our use of cookies and similar technologies, please contact us at support@becke.cc .