User path detection methods, devices, equipment, media, and program products

By assigning session identifiers to terminal PDU sessions and establishing mapping relationships, the problem of network devices being unable to accurately associate after user path changes is solved, thereby improving the accuracy of anomaly detection and the reliability of security detection for user plane path updates.

CN123123949APending Publication Date: 2026-11-17CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611363336.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-03
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In existing technologies, when a user's path changes due to the movement of a terminal across regions, network devices cannot accurately correlate the user's path before and after the change, leading to misjudgment in anomaly detection. The anomaly detection method for user plane path updates is not accurate enough.

Method used

Assign session identifiers to terminal PDU sessions and establish mapping relationships, including F-SEID, TEID, and UPF instance identifier. Maintain the association of session identifiers when updating user paths. Continuously associate node identifiers before and after the update through PDU session identifiers to ensure that network devices accurately associate user paths before and after the change.

Benefits of technology

It improves the accuracy of anomaly detection for user plane path updates, avoids misjudgments caused by incorrect associations, and ensures the accuracy of security detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123123949A_ABST
    Figure CN123123949A_ABST
Patent Text Reader

Abstract

This application provides a user path detection method, apparatus, device, medium, and program product, relating to the field of communication technology, to improve the accuracy of user path detection methods. The specific technical solution is as follows: A corresponding session identifier is assigned to at least one PDU session established by a terminal, and at least one first mapping relationship is established. The PDU session is a data connection established between the terminal and the data network. The first mapping relationship is a mapping relationship between the session identifier corresponding to the PDU session and the node identifier of the user plane path corresponding to the PDU session. When the user path corresponding to the first PDU session in at least one PDU session is updated from a first user plane path to a second user plane path, the first mapping relationship corresponding to the first PDU session is updated. Based on the session identifier corresponding to the first PDU session and the updated first mapping relationship, the user path corresponding to the first PDU session is detected. This application is applied to scenarios requiring user path detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field, and in particular to a user path detection method, apparatus, device, medium, and program product. Background Technology

[0002] With the rapid development of 5G communication technology, core network equipment can establish corresponding Protocol Data Unit (PDU) sessions with terminals based on their service requirements. This determines the user plane path for the terminal and executes its services through that path. During service execution, the user path may change due to reasons such as the terminal moving across regions, and the new user path may contain various anomalies. Therefore, anomaly detection for the changed user path becomes extremely important.

[0003] In related technologies, after establishing the corresponding PDU session, each user path can be identified using the Fully Qualified Session Endpoint Identifier (F-SEID), Tunnel Endpoint Identifier (TEID), and User Plane Function (UPF) instance identifiers within the user path. Furthermore, if a user path changes, the modified user path can be located using the F-SEID, TEID, and UPF instance identifiers within the user path, and anomaly detection can be performed on the modified user path.

[0004] However, in the above scheme, when the user path changes due to situations such as the terminal moving across regions, the user path corresponding to the terminal may change. At this time, the identifiers of F-SEID, TEID, and UPF instance in the user path may also change, causing the network device to be unable to accurately associate the user path before and after the change. Consequently, when the network device performs security checks on the changed user path, it may make misjudgments due to incorrect associations. Thus, the anomaly detection method for user plane path updates in the relevant technologies is not accurate enough. Summary of the Invention

[0005] This application provides a user path detection method, apparatus, device, medium, and program product to improve the accuracy of user path detection methods.

[0006] In a first aspect, embodiments of this application provide a user path detection method, the method comprising: assigning a corresponding session identifier to at least one PDU session established by a terminal, and establishing at least one first mapping relationship, wherein the PDU session is a data connection established between the terminal and a data network, and the first mapping relationship is a mapping relationship between the session identifier corresponding to the PDU session and the node identifier of the user plane path corresponding to the PDU session, wherein the node identifier includes at least one of the following: F-SEID, TEID, UPF instance identifier; updating the first mapping relationship corresponding to the first PDU session when the user path corresponding to the first PDU session in the at least one PDU session is updated from a first user plane path to a second user plane path; and detecting the user path corresponding to the first PDU session based on the session identifier corresponding to the first PDU session and the updated first mapping relationship.

[0007] The technical solution provided in this application brings at least the following beneficial effects: In this solution, when the user plane path corresponding to the PDU session changes, the node identifiers before and after the update are continuously associated through the PDU session identifier, so that the network device can accurately associate the user path before and after the change, thereby avoiding the problem of misjudgment caused by incorrect association when the network device performs security detection on the changed user path. Thus, the accuracy of the abnormal detection method for user plane path updates is improved.

[0008] One possible implementation is that updating the first mapping relationship corresponding to the first PDU session includes: establishing a second mapping relationship between the session identifier corresponding to the first PDU session and the second user plane path; and updating the first mapping relationship corresponding to the first PDU session based on the second mapping relationship.

[0009] Another possible implementation, the method further includes: determining the authorization information corresponding to the first PDU session based on the first data, wherein the first data includes at least one of the following: user subscription information, approved slice configuration, operator security policy, and approved resource allocation and deployment information; detecting the user path corresponding to the first PDU session based on the session identifier corresponding to the first PDU session and the updated first mapping relationship, including: determining the second user path corresponding to the first PDU session based on the session identifier corresponding to the first PDU session and the updated first mapping relationship; and detecting the user path corresponding to the first PDU session based on the second user path and the authorization information.

[0010] Another possible implementation method includes: determining whether the first user path has been deleted based on the first mapping relationship; and if the first user path has not been deleted, determining that there is a rule residue anomaly in the user plane path corresponding to the first PDU session.

[0011] Another possible implementation is to detect the user path corresponding to the first PDU session based on the second user path and the authorization information, including: if the second user path does not match the authorization information, determining that the user path corresponding to the first PDU session has an unauthorized access exception.

[0012] Another possible implementation method includes: deleting the first user path if there is a rule residue anomaly in the user plane path corresponding to the first PDU session; and updating the user plane path corresponding to the first PDU session from the second user plane path to the first user plane path if there is an unauthorized access anomaly in the user plane path corresponding to the first PDU session.

[0013] Secondly, embodiments of this application provide a user path detection device, comprising: a processing module, an updating module, and a detection module; the processing module is configured to assign a corresponding session identifier to at least one PDU session established by a terminal and establish at least one first mapping relationship, wherein the PDU session is a data connection established between the terminal and a data network, and the first mapping relationship is a mapping relationship between the session identifier corresponding to the PDU session and the node identifier of the user plane path corresponding to the PDU session, wherein the node identifier includes at least one of the following: F-SEID, TEID, and UPF instance identifier; the updating module is configured to update the first mapping relationship corresponding to the first PDU session when the user path corresponding to the first PDU session in the at least one PDU session is updated from a first user plane path to a second user plane path; the detection module is configured to detect the user path corresponding to the first PDU session based on the session identifier corresponding to the first PDU session and the updated first mapping relationship.

[0014] One possible implementation is that the update module is specifically used to: establish a second mapping relationship between the session identifier corresponding to the first PDU session and the second user plane path; and update the first mapping relationship corresponding to the first PDU session based on the second mapping relationship.

[0015] In another possible implementation, the apparatus further includes: a determining module; the determining module is configured to determine the authorization information corresponding to the first PDU session based on first data, the first data including at least one of the following: user subscription information, approved slice configuration, operator security policy, and approved resource allocation and deployment information; the detection module is specifically configured to: determine the second user path corresponding to the first PDU session based on the session identifier corresponding to the first PDU session and the updated first mapping relationship; and detect the user path corresponding to the first PDU session based on the second user path and the authorization information.

[0016] In another possible implementation, the aforementioned determining module is further configured to determine whether the aforementioned first user path has been deleted based on the aforementioned first mapping relationship; and, if the aforementioned first user path has not been deleted, to determine that there is a rule residue anomaly in the user plane path corresponding to the aforementioned first PDU session.

[0017] Another possible implementation is that the detection module described above is specifically used to: determine that the user path corresponding to the first PDU session has an unauthorized access exception when the second user path does not match the authorization information.

[0018] In another possible implementation, the above apparatus further includes: a deletion module; the deletion module is used to delete the first user path when there is a rule residue anomaly in the user plane path corresponding to the first PDU session; the update module is also used to update the user plane path corresponding to the first PDU session from the second user plane path to the first user plane path when there is an unauthorized access anomaly in the user plane path corresponding to the first PDU session.

[0019] Thirdly, this application provides an electronic device comprising: a processor and a memory; the memory stores a program or instructions executable on the processor, wherein the program or instructions, when executed by the processor, implement the method of the first aspect described above.

[0020] Fourthly, this application provides a readable storage medium on which a program or instructions are stored, which, when executed by a computer, implement the method of the first aspect described above.

[0021] Fifthly, this application provides a computer program product stored in a storage medium, which, when executed by a computer, implements the method described in the first aspect.

[0022] In a sixth aspect, embodiments of this application provide a chip including a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the method described in the first aspect.

[0023] The beneficial effects of the second to sixth aspects mentioned above are described in the corresponding description of the first aspect and will not be repeated here. Attached Figure Description

[0024] Figure 1 A schematic diagram of the network architecture for a user path detection method provided in this application embodiment;

[0025] Figure 2 A flowchart illustrating a user path detection method provided in an embodiment of this application;

[0026] Figure 3 A flowchart illustrating another user path detection method provided in an embodiment of this application;

[0027] Figure 4 A flowchart illustrating the implementation process of a user path detection method provided in this application embodiment;

[0028] Figure 5 This is a schematic diagram of the structure of a user path detection device provided in an embodiment of this application;

[0029] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0030] The user path detection method, apparatus, equipment, medium, and program products provided in this application will be described in detail below with reference to the accompanying drawings.

[0031] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0032] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0033] The terms "at least one," "at least one of," etc., used in the specification and claims of this application refer to any one, any two, or a combination of two or more of the included items. For example, at least one of a, b, and c can mean: "a," "b," "c," "a and b," "a and c," "b and c," and "a, b, and c," where a, b, and c can be single or multiple. Similarly, "at least two" refers to two or more items, and its meaning is similar to that of "at least one."

[0034] In the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0035] The user path detection method, apparatus, device, medium, and program product provided in this application embodiment can be applied to scenarios where user path detection is required.

[0036] The 5G core network adopts a control plane and user plane separation architecture. After a terminal establishes a PDU session, the Session Management Function (SMF) issues forwarding rules such as Packet Detection Rule (PDR) and Forwarding Action Rule (FAR) to the User Platform Provider (UPF) through the N4 interface. The PDU Session Anchor (PSA) UPF connects to the data network through the N6 interface. The Intermediate UPF (I-UPF) can be inserted between the access network and the PSA UPF to forward data. Under circumstances such as user mobility, load adjustment, network element failure, or policy changes, the network may perform PSA UPF changes, I-UPF insertions or removals, resulting in phased changes to the PFCP session, UPF instance, F-SEID, TEID, and forwarding rules. If, after the path update process is completed, the user plane configuration, residual rules, or actual data path exceeds the range of the UPF, routing domain, N6 egress, or target service network allowed for the PDU session, it may cause slice isolation failure, unauthorized access, exposure of sensitive networks, and incorrect audit attribution.

[0037] The relevant technologies mainly include network slicing authorization and isolation, Packet Forwarding Control Protocol (PFCP) packet or session security detection, and cross-interface state and user plane path monitoring, which can realize slice access authorization, PFCP abnormal operation identification, and observation of routing, interface, and traffic status. However, during user plane path updates such as PSA UPF changes, I-UPF insertion or removal, PFCP sessions, F-SEID, TEID, and UPF instances will change. Existing solutions have difficulty continuously confirming whether the states before and after the update belong to the same PDU session, and also have difficulty distinguishing between the short-term coexistence of old and new states during the update process and the anomalies that still exist after the update process ends. At the same time, the current PFCP rules and UPF running status are themselves objects to be checked and cannot be used alone to prove that their configuration is correct. Therefore, it is necessary to continuously associate the sessions before and after the update when the relevant identifiers change, determine whether the path update process has ended, and compare the user plane configuration, residual rules, and available actual paths with the approved allowed range.

[0038] However, in the above scheme, when the user path changes due to situations such as the terminal moving across regions, the user path corresponding to the terminal may change. At this time, the identifiers of F-SEID, TEID, and UPF instance in the user path may also change, causing the network device to be unable to accurately associate the user path before and after the change. Consequently, when the network device performs security checks on the changed user path, it may make misjudgments due to incorrect associations. Thus, the anomaly detection method for user plane path updates in the relevant technologies is not accurate enough.

[0039] To address the aforementioned technical problems, this application provides a user path detection method, apparatus, device, medium, and program product. It assigns a corresponding session identifier to at least one PDU session established by a terminal and establishes at least one first mapping relationship. The PDU session is a data connection established between the terminal and a data network. The first mapping relationship is a mapping relationship between the session identifier corresponding to the PDU session and the node identifier of the user plane path corresponding to the PDU session. The node identifier includes at least one of the following: F-SEID, TEID, and UPF instance identifier. When the user path corresponding to the first PDU session in the at least one PDU session is updated from a first user plane path to a second user plane path, the first mapping relationship corresponding to the first PDU session is updated. Based on the session identifier corresponding to the first PDU session and the updated first mapping relationship, the user path corresponding to the first PDU session is detected. In this scheme, when the user plane path corresponding to the PDU session changes, the node identifiers before and after the update are continuously associated through the PDU session identifier. This allows the network device to accurately associate the user path before and after the change, thereby avoiding the problem of misjudgment caused by incorrect association when the network device performs security detection on the changed user path. Thus, the accuracy of the anomaly detection method for user plane path updates is improved.

[0040] The user path detection method, apparatus, device, medium, and program products provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0041] Figure 1 This illustration shows the network architecture of a user path detection method provided in an embodiment of this application. For example... Figure 1 As shown, the network architecture includes a user path detection device 101 and a terminal device 102. The user path detection device 101 and the terminal device 102 are interconnected.

[0042] In some embodiments, the user path detection device 101 may be a server, a computer, or a processor or processing unit within a server or computer. The server may be a single server or a server cluster consisting of multiple servers. It should be noted that the specific device form of the user path detection device 101 is not limited in the embodiments of this application. Figure 1 The example shown is a user path detection device 101, which is a single server.

[0043] In some embodiments, the terminal device may be a mobile phone, tablet computer, laptop computer, handheld computer, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, personal computer (PC), ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc., and the embodiments of this application do not specifically limit it. Figure 1 The example shown is a mobile phone, with terminal device 102 as an example.

[0044] It should be noted that the network architecture described in the embodiments of this application is for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and does not constitute a limitation on the technical solutions provided in the embodiments of this application. As network architectures evolve, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0045] See Figure 2 This is a flowchart illustrating a user path detection method provided in an embodiment of this application. Figure 2 As shown, the user path detection method provided in this application embodiment can be implemented by the above-mentioned user path detection device, specifically including the following steps 201 to 203.

[0046] Step 201: The user path detection device assigns a corresponding session identifier to at least one PDU session established by the terminal and establishes at least one first mapping relationship.

[0047] In some embodiments, the PDU session is a data connection established between the terminal and the data network, and the first mapping relationship is a mapping relationship between the session identifier corresponding to the PDU session and the node identifier of the user plane path corresponding to the PDU session. The node identifier includes at least one of the following: F-SEID, TEID, and UPF instance identifier.

[0048] In some embodiments, the user path detection device can acquire information such as user identity, PDU session identifier, S-NSSAI, DNN and session status in the control plane, as well as PFCP session, UPF instance, F-SEID, TEID, PDR and FAR in N4 / PFCP and UPF runtime data.

[0049] Step 202: When the user path corresponding to the first PDU session in at least one PDU session is updated from the first user plane path to the second user plane path, the user path detection device updates the first mapping relationship corresponding to the first PDU session.

[0050] In some embodiments, the user path detection device can associate control plane PDU sessions with corresponding PFCP sessions and user plane tunnels based on user identity, PDU session context, DNN, PFCP request and response relationships, UPF roles, and changes in PDR and FAR. When path updates occur, such as PSA UPF changes, I-UPF insertions or removals, the device records the correspondence and replacement relationships between the old and new UPFs, old and new F-SEIDs, old and new TEIDs, and related forwarding rules, ensuring that the states before and after the update continue to belong to the same PDU session. If the association relationship cannot be determined, the user path detection device continues to collect data without directly making an unauthorized access judgment.

[0051] In some embodiments, the user path detection device can associate control plane PDU sessions with corresponding PFCP sessions and user plane tunnels based on user identity, PDU session context, DNN, PFCP request and response relationships, UPF roles, and changes in PDR and FAR. When path updates occur, such as PSA UPF changes, I-UPF insertions or removals, the system records the correspondence and replacement relationships between the old and new UPFs, old and new F-SEIDs, old and new TEIDs, and related forwarding rules, ensuring that the states before and after the update continue to belong to the same PDU session. If the association relationship cannot be determined, the system continues to collect data without directly making an unauthorized access judgment.

[0052] Step 203: The user path detection device detects the user path corresponding to the first PDU session based on the session identifier corresponding to the first PDU session and the updated first mapping relationship.

[0053] In some embodiments, the user path detection device can compare the currently effective UPF forwarding configuration with the authorization baseline to check whether the PSA UPF, I-UPF, network instance, routing domain, FAR forwarding target, N6 egress, and target service network exceed the authorization scope. The system also checks whether the old PDR, FAR, and related forwarding rules before the update have been deleted or invalidated. If the old rules are still in a matchable, referenceable, or forwardable state, can affect the current data path, and are not allowed backup or rollback rules, then an abnormal residual rule is determined to exist. When an unauthorized configuration or abnormal residual rule is discovered, and routing, interface telemetry, or sampled traffic information that can be associated with the target PDU session is obtained, the system further confirms whether the related anomaly has caused data to actually pass through an unauthorized UPF, routing domain, N6 egress, or target service network, forming actual path evidence. If no relevant information is obtained, it does not affect the judgment of unauthorized configuration and abnormal residual rules.

[0054] This application provides a user path detection method. When the user plane path corresponding to a PDU session changes, the method continuously associates the node identifiers before and after the update with the PDU session identifier. This allows the network device to accurately associate the user path before and after the change, thereby avoiding misjudgment caused by incorrect association when the network device performs security detection on the changed user path. Thus, the accuracy of the abnormal detection method for user plane path updates is improved.

[0055] In some embodiments, combined with Figure 2 ,like Figure 3 As shown, step 202 above can be implemented through steps 202a and 202b.

[0056] Step 202a: When the user path corresponding to the first PDU session in at least one PDU session is updated from the first user plane path to the second user plane path, the user path detection device establishes a second mapping relationship between the session identifier corresponding to the first PDU session and the second user plane path.

[0057] Step 202b: The user path detection device updates the first mapping relationship corresponding to the first PDU session based on the second mapping relationship.

[0058] Thus, when the user plane path corresponding to the PDU session changes from the first user plane path to the second user plane path, a second mapping relationship is established between the session identifier corresponding to the first PDU session and the second user plane path. Then, the node identifiers before and after the update are continuously associated through the PDU session identifier, so that the network device can accurately associate the user path before and after the change. This avoids the problem of misjudgment caused by incorrect association when the network device performs security detection on the changed user path. In this way, the accuracy of the anomaly detection method for user plane path updates is improved.

[0059] In some embodiments, the user path detection method provided in this application may further include the following step 204a, and the above step 203 may be implemented by the following steps 203a and 203b.

[0060] Step 204a: The user path detection device determines the authorization information corresponding to the first PDU session based on the first data.

[0061] In some embodiments, the first data mentioned above includes at least one of the following: user subscription information, approved slice configuration, operator security policy, and approved resource allocation and deployment information.

[0062] Step 203a: The user path detection device determines the second user path corresponding to the first PDU session based on the session identifier corresponding to the first PDU session and the updated first mapping relationship.

[0063] Step 203b: The user path detection device detects the user path corresponding to the first PDU session based on the second user path and authorization information.

[0064] In this way, the user path detection device can determine the authorization information corresponding to the first PDU session based on the first data, and determine the second user path corresponding to the first PDU session based on the session identifier corresponding to the first PDU session and the updated first mapping relationship. Thus, by continuously associating the node identifiers before and after the update through the PDU session identifier, the network device can accurately associate the user paths before and after the change, thereby avoiding the problem of misjudgment caused by incorrect association when the network device performs security detection on the changed user path. This improves the accuracy of the anomaly detection method for user plane path updates.

[0065] In some embodiments, the user path detection method provided in this application may further include the following steps 205a and 205b.

[0066] Step 205a: The user path detection device determines whether the first user path has been deleted based on the first mapping relationship.

[0067] Step 205b: If the first user path has not been deleted, the user path detection device determines that there is a rule residue anomaly in the user plane path corresponding to the first PDU session.

[0068] In this way, the user path detection device can determine whether the first user path has been deleted based on the first mapping relationship, and if the first user path has not been deleted, it can determine that there is a rule residue anomaly in the user plane path corresponding to the first PDU session, thereby improving the accuracy of the anomaly detection method for user plane path updates.

[0069] In some embodiments, the user path detection method provided in this application can be implemented by the following step 203b1.

[0070] Step 203b1: If the second user path does not match the authorization information, the user path detection device determines that there is an unauthorized exception in the user path corresponding to the first PDU session.

[0071] In this way, the user path detection device can determine that the user path corresponding to the first PDU session has an unauthorized access exception when the second user path does not match the authorization information, thus improving the accuracy of the anomaly detection method for user plane path updates.

[0072] In some embodiments, the user path detection method provided in this application may further include the following steps 204a and 204b.

[0073] Step 204a: If the user path detection device has an abnormal rule residue in the user plane path corresponding to the first PDU session, it deletes the first user path.

[0074] Step 204b: If there is an unauthorized access exception in the user plane path corresponding to the first PDU session, the user path detection device updates the user plane path corresponding to the first PDU session from the second user plane path to the first user plane path.

[0075] In this way, the user path detection device can delete the first user path if there is a rule residue anomaly in the user plane path corresponding to the first PDU session; or, if there is an unauthorized access anomaly in the user plane path corresponding to the first PDU session, update the user plane path corresponding to the first PDU session from the second user plane path to the first user plane path, thereby improving the ability to handle abnormal user paths.

[0076] The methods of the embodiments of this application will be described below through specific examples.

[0077] like Figure 4 As shown, the implementation process of the method provided in this application embodiment includes the following S1 to S6:

[0078] S1. The user path detection device acquires and standardizes relevant data.

[0079] In some embodiments, the user path detection device can acquire user identity, PDU session identifier, S-NSSAI, DNN and session status from the control plane, as well as PFCP session, UPF instance, F-SEID, TEID, PDR and FAR information from N4 / PFCP and UPF operation data. Network instance, routing domain, N6 interface, routing status, interface telemetry and sampled traffic information can be collected according to the system deployment location and data source access. Data from different sources is standardized with unified timestamps and event sequence, the network element to which the data belongs is identified and the field format is standardized to form event records related to PDU sessions and user plane path updates.

[0080] S2. The user path detection device establishes session associations before and after the path update.

[0081] In some embodiments, the user path detection device can associate control plane PDU sessions with corresponding PFCP sessions and user plane tunnels based on user identity, PDU session context, DNN, PFCP request and response relationships, UPF roles, and changes in PDR and FAR. When path updates occur, such as PSA UPF changes, I-UPF insertions or removals, the system records the correspondence and replacement relationships between the old and new UPFs, old and new F-SEIDs, old and new TEIDs, and related forwarding rules, ensuring that the states before and after the update continue to belong to the same PDU session. If the association relationship cannot be determined, the system continues to collect data without directly making an unauthorized access judgment.

[0082] S3. The user path detection device forms the authorization benchmark for the PDU session.

[0083] In some embodiments, the user path detection device can determine the permitted S-NSSAI, DNN, PSA UPF, I-UPF or corresponding UPF resource pools, network instances, routing domains, N6 egress points, and target service network range for the PDU session to be detected, based on user subscriptions, approved slice configurations, operator security policies, and approved resource allocation and deployment information, thus forming an authorization benchmark for subsequent unauthorized access verification. If the permitted resources and data forwarding range for the PDU session cannot be clearly defined temporarily, relevant information is supplemented and verified until the authorization range is clarified, at which point an authorization benchmark is formed. The current PFCP rules, UPF real-time routes, and current forwarding status are only considered as content to be checked and are not used as the basis for forming the authorization benchmark.

[0084] S4. The user path detection device determines whether the user plane path update process has ended.

[0085] In some embodiments, the user path detection device can determine whether the current user plane path update process has ended based on whether the control plane path update process has ended, whether the PFCP request and response have been completed, whether the new PDR and FAR have taken effect, whether the new path has been established, and whether the related states are stable, and check whether the old rules have been deleted or become invalid. If the path update process has not ended, data collection continues and the association between the new and old sessions and related identifiers is maintained, and the coexistence of new and old paths for a short period of time is not directly judged as abnormal. When the control plane update process and related PFCP operations have been completed, the new path has taken effect, and no further related changes occur within a set time, the path update process is considered to have ended. If the old rules have been deleted or become invalid, the path update is considered to have been completed normally; if, after the set time has expired, the old rules are still in a matchable, referenceable, or forwardable state, and do not belong to the allowed backup or rollback rules, they are marked as suspected abnormal residual rules and enter subsequent verification.

[0086] S5. The user path detection device verifies the UPF forwarding configuration, abnormal residual rules, and actual path.

[0087] In some embodiments, after the path update process is completed, the user path detection device can compare the currently effective UPF forwarding configuration with the authorization benchmark to check whether the PSA UPF, I-UPF, network instance, routing domain, FAR forwarding target, N6 egress, and target service network exceed the authorization scope. The system also checks whether the old PDR, FAR, and related forwarding rules before the update have been deleted or invalidated. If the old rules are still in a matchable, referenceable, or forwardable state, can affect the current data path, and are not allowed backup or rollback rules, then it is determined that there are abnormal residual rules. When configuration overreach or abnormal residual rules are discovered, and routing, interface telemetry, or sampled traffic information that can be associated with the target PDU session is obtained, the system further confirms whether the relevant anomaly has caused data to actually pass through an unauthorized UPF, routing domain, N6 egress, or target service network, forming actual path evidence. If no relevant information is obtained, it does not affect the judgment of configuration overreach and abnormal residual rules.

[0088] S6. The user path detection device outputs evidence and performs security measures.

[0089] In some embodiments, when the user path detection device confirms the existence of unauthorized configuration, abnormal residual rules, or further confirms the existence of actual path unauthorized access, the system outputs evidence such as PDU session identifier, S-NSSAI, DNN, new and old UPF, F-SEID and TEID change relationships, abnormal PDR or FAR, network instance, routing domain, N6 egress and target service network, and directly implements or triggers relevant network elements to implement traffic blocking, rule correction, session isolation, session re-establishment, or restores the PDU session to the original user plane path that still meets the authorization requirements. After the handling is completed, the system re-acquires the relevant sessions, PFCP rules and UPF running status to review the handling results; after confirming that the anomaly has been eliminated, the handling ends; if the anomaly still exists, the corresponding rule correction, session re-establishment, traffic blocking or path restoration measures continue to be implemented.

[0090] Thus, this application provides a method and system for detecting and protecting against anomalies in 5G network slice isolation, which solves the problems of easy interruption of session association during user plane path update, difficulty in distinguishing between short-term differences during the update process and anomalies that still exist after the update process, and lack of clear verification basis for user plane configuration, residual rules and actual data paths. It enables accurate identification and secure handling of configuration overreach, actual path overreach and abnormal residual rules after the user plane path update process.

[0091] It should be noted that the descriptions of each step S1 to S6 in this embodiment can be found in the descriptions in the above embodiments, and will not be repeated here.

[0092] The user path detection method proposed in this application will be described below through specific embodiments.

[0093] This example illustrates a scenario where a PDU session switches to a new PSA UPF and enters an unauthorized corporate intranet due to a routing configuration error. Terminal UE-1 has established a PDU session, PDU-10, with S-NSSAI of S-NSSAI-A and DNN of internet. Based on the user's subscription and approved slice configuration, this PDU session is allowed to use PSA UPFs within a specified range and should access the internet through the Internet-VRF routing domain for internet services and the Internet N6 exit, but is not permitted to enter the corporate intranet.

[0094] Before the update, UE-1 accessed the Internet through PSA UPF-1. Due to user movement, load adjustment, or UPF maintenance, the network switched the user plane path of PDU-10 to PSA UPF-2, which is also within the authorized scope. Based on PDU session information, the PFCP session establishment or modification process, the changes in the old and new PDRs and FARs, and the relationships between F-SEID and TEID, the system confirmed that both the PFCP session and the user plane tunnel before and after the switch belonged to PDU-10. Since the user subscription and slice permissions remained unchanged, the original resource usage scope and data forwarding scope should still be adhered to after the path switch.

[0095] The system further checks whether the PFCP session on PSA UPF-2 has been established, whether the new PDR and FAR have taken effect, and whether the control plane path update process and related PFCP operations have been completed. When the new path has taken effect and no further changes occur within a set time, the user plane path update process is considered complete. The system also checks whether the old PDR, FAR, and related forwarding rules on PSA UPF-1 have been deleted or deactivated; if the old rules are still valid or deactivated, they are treated as residual rules to be verified and entered into subsequent verification.

[0096] If, due to a local configuration error, PSA UPF-2 incorrectly redirects internet services to the Corp-VRF routing domain used by the enterprise intranet and forwards data through the corresponding N6 egress point of the enterprise intranet, the system compares the currently effective UPF forwarding configuration of PSA UPF-2 with the authorization baseline of PDU-10. Since the routing domain, N6 egress point, and target service network all exceed the scope determined by the authorization baseline, the system determines that PDU-10 has exceeded its configuration authority. The system also checks the aforementioned residual rules to be verified; if the old rules are still in a matchable, referenceable, or forwardable state, can affect the current data path, and are not allowed to be retained as backup or rollback rules, then an abnormal residual rule is determined to exist.

[0097] After obtaining routing information, interface operation data, or sampled traffic, the system further confirms whether the relevant information can be associated with PDU-10. If relevant evidence indicates that UE-1's data has entered the enterprise intranet through Corp-VRF, then it further determines that there is actual path privilege escalation. If relevant evidence cannot be obtained, or if it cannot be confirmed that the relevant evidence belongs to PDU-10, actual path privilege escalation is not determined, but this does not affect the judgment of configuration privilege escalation and abnormal residual rules.

[0098] Upon confirming the existence of unauthorized configuration, abnormal residual rules, or further confirmation of actual path unauthorized access, the system generates anomaly evidence, recording information such as PDU session identifier, S-NSSAI, DNN, the relationship between the old and new PSA UPF, F-SEID and TEID changes, abnormal PDR or FAR, network instance, routing domain, N6 exit, and target service network. Depending on the anomaly type, the system directly implements or triggers the SMF, UPF management system, or network management system to implement traffic blocking, rule modification or deletion, session isolation, or session re-establishment. If PSA UPF-1 remains within the authorized baseline range, the original forwarding path is still available, and no anomalies are found after re-checking, PDU-10 is restored to the original forwarding path carried by PSA UPF-1; otherwise, PDU-10 is released, and a new PDU session conforming to the user subscription and approved slice configuration requirements is established.

[0099] After the handling is completed, the system re-acquires the PDU session, PFCP rules, UPF configuration and running status, and reviews the handling results; after confirming that the abnormal rules have been deleted or invalidated, the abnormal paths have been eliminated and the current forwarding scope meets the authorization requirements, the handling ends; if the abnormality still exists, the corresponding rule modification or deletion, session re-establishment, traffic blocking or path restoration measures continue to be implemented.

[0100] It should be noted that in the user path detection method proposed in this application, data acquisition and session association can be carried out in different ways. Control plane, user plane and actual path information can be obtained from interface data, network element logs, configuration status, routing information, interface telemetry or sampled traffic, and combined with PDU session information, PFCP interaction, tunnel endpoint, UPF role, time and forwarding rule changes, the same PDU session before and after the path update is associated.

[0101] Whether the path update process has ended can be determined based on different update scenarios, including whether the control plane process and PFCP operation have ended, whether the new path has taken effect, and whether the relevant status is stable. Old rules that can still be matched, referenced, or forwarded after the path update process has ended can be verified as abnormal residual rules.

[0102] The authorization criteria can be determined based on user subscriptions, approved slice configurations, NSSF or PCF policies, resource deployment information, data network access lists, routing domain mappings, and carrier security policies. The PFCP rules, UPF routes, and operational status to be inspected are only considered as inspection targets.

[0103] The detection function can be deployed independently or integrated into SMF, UPF, firewalls, controllers, network management systems, or security management platforms. Upon detecting an anomaly, it can take actions such as issuing alerts, blocking traffic, modifying or deleting rules, isolating sessions, re-establishing sessions, or restoring the original user plane path that still meets authorization requirements, and then reviewing the actions afterward.

[0104] It should be noted that the various method embodiments described above, or the various possible implementations of the various method embodiments, can be executed individually, or, provided there is no conflict, they can be combined with each other. The specific implementation can be determined according to actual usage requirements, and this application embodiment does not impose any limitations on this. It can be seen that the above mainly introduces the solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, this application embodiment provides corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the modules and algorithm steps of the various examples described in the embodiments disclosed herein, this application embodiment can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0105] This application provides a method and system for detecting and protecting against anomalies in 5G network slice isolation, which can be implemented without altering the original PDU session establishment, UPF selection, and user plane path update processes in the 5G core network. During the user plane path update process, the system continuously correlates the PDU sessions, PFCP sessions, UPF instances, F-SEID, TEID, and forwarding rules before and after the update. Based on user subscriptions, approved slice configurations, operator security policies, and approved resource allocation and deployment information, an authorization benchmark is formed to clarify the user plane resources and data forwarding scope allowed for the PDU session. After the path update process is completed, the system checks the currently effective UPF forwarding configuration and any residual rules that have not been properly deleted or set to an invalid state. If routing, interface, or traffic information can be obtained, the actual data path is further checked. If the UPF forwarding configuration or actual data path is found to exceed the authorized scope, or if abnormal residual rules exist, anomaly evidence is output and appropriate action is taken.

[0106] This system includes the following modules:

[0107] The data acquisition module is used to acquire two types of information: one type includes user identity, PDU session identifier, S-NSSAI, DNN, PFCP session, UPF instance, F-SEID, TEID, PDR, and FAR session and forwarding rule information; the other type includes actual path information such as routing information, interface running status, and sampled traffic. The actual path information is acquired based on the deployment environment and data collection conditions, and data from different sources is processed uniformly.

[0108] The session association module is used to associate control plane PDU sessions with corresponding PFCP sessions and user plane tunnels, and to record the correspondence and replacement relationships between UPF instances, F-SEID, TEID and forwarding rules before and after path updates.

[0109] The authorization baseline management module is used to determine the PSA UPF, I-UPF or corresponding UPF resource pool, network instance, routing domain, N6 egress, and target service network range that the current PDU session is allowed to use, based on user subscriptions, approved slice configurations, operator security policies, and approved resource allocation and deployment information, thus forming an authorization baseline for unauthorized access verification. This authorization baseline is independent of the PFCP rules to be detected and the current operating status of the UPF.

[0110] The path update judgment module is used to determine whether the user plane path update process has ended based on the control plane update process, PFCP requests and responses, the effectiveness of the new path, and the stability of related states, and to check whether old rules have been deleted or become invalid. If the path update process has not yet ended, it continues to collect and associate relevant data; after the path update process has ended, it enters the stage of privilege escalation and residual rule verification.

[0111] The privilege escalation verification module is used to compare the currently effective UPF forwarding configuration with the allowed UPFs, network instances, routing domains, N6 egress points, and target service network ranges determined by the authorization baseline after the path update process is completed, to determine whether there is any privilege escalation; to check for old PDRs, FARs, or related forwarding rules that have not been properly deleted or set to an invalid state, to determine whether there are any abnormal residual rules; and when obtaining routing, interface, or traffic information that can be associated with the target PDU session, to further check whether the actual data path exceeds the range determined by the authorization baseline.

[0112] The security handling module outputs evidence such as PDU session identifier, UPF instance, F-SEID, TEID, abnormal PDR or FAR, routing domain, N6 egress, and target service network. Based on the verification results, it directly implements or triggers relevant network elements to perform traffic blocking, rule correction, session isolation, session re-establishment, or restore the original user plane path that still meets authorization requirements. After the handling is completed, the data acquisition module is triggered to re-collect relevant data and verify the handling results.

[0113] The aforementioned modules can be deployed on a standalone security detection platform or integrated with core network management, security management platforms, SMF, UPF management systems, or other network security devices. The basic detection process of this solution consists of session association before and after path updates, determination of the end of the path update process, formation of authorization benchmarks, and verification of UPF forwarding configuration and abnormal residual rules. Actual path verification can be implemented based on the acquisition of routing, interface, or traffic information and its association with the target PDU session. Specific security handling methods can be determined based on the anomaly type and deployment method.

[0114] This application embodiment can divide the user path detection device into functional modules according to the above method example. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. Optionally, the module division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.

[0115] In some embodiments, this application also provides a user path detection device. The user path detection device may include one or more functional modules for implementing the user path detection method of the above method embodiments.

[0116] For example, Figure 5 This is a schematic diagram of a user path detection device provided in an embodiment of this application. Figure 5 As shown, the user path detection device 900 includes: a processing module 901, an update module 902, and a detection module 903.

[0117] The processing module 901 is configured to assign a corresponding session identifier to at least one PDU session established by the terminal and establish at least one first mapping relationship. The PDU session is a data connection established between the terminal and the data network. The first mapping relationship is a mapping relationship between the session identifier corresponding to the PDU session and the node identifier of the user plane path corresponding to the PDU session. The node identifier includes at least one of the following: F-SEID, TEID, and UPF instance identifier. The update module 902 is configured to update the first mapping relationship corresponding to the first PDU session when the user path corresponding to the first PDU session in the at least one PDU session is updated from a first user plane path to a second user plane path. The detection module 903 is configured to detect the user path corresponding to the first PDU session based on the session identifier corresponding to the first PDU session and the updated first mapping relationship.

[0118] In some embodiments, the update module 902 is specifically used to: establish a second mapping relationship between the session identifier corresponding to the first PDU session and the second user plane path; and update the first mapping relationship corresponding to the first PDU session based on the second mapping relationship.

[0119] In other embodiments, the apparatus further includes: a determining module; the determining module is configured to determine the authorization information corresponding to the first PDU session based on first data, the first data including at least one of the following: user subscription information, approved slice configuration, operator security policy, and approved resource allocation and deployment information; the detection module is specifically configured to: determine the second user path corresponding to the first PDU session based on the session identifier corresponding to the first PDU session and the updated first mapping relationship; and detect the user path corresponding to the first PDU session based on the second user path and the authorization information.

[0120] In some other embodiments, the determining module is further configured to determine whether the first user path has been deleted based on the first mapping relationship; and, if the first user path has not been deleted, to determine that there is a rule residue anomaly in the user plane path corresponding to the first PDU session.

[0121] In some other embodiments, the detection module 903 is specifically used to: determine that the user path corresponding to the first PDU session has an unauthorized access exception when the second user path does not match the authorization information.

[0122] In some other embodiments, the above apparatus further includes: a deletion module; the deletion module is configured to delete the first user path when there is a rule residue anomaly in the user plane path corresponding to the first PDU session; the update module is further configured to update the user plane path corresponding to the first PDU session from the second user plane path to the first user plane path when there is an unauthorized access anomaly in the user plane path corresponding to the first PDU session.

[0123] In the user path detection device provided in this application, when the user plane path corresponding to the PDU session changes, the node identifiers before and after the update are continuously associated through the PDU session identifier. This enables the network device to accurately associate the user path before and after the change, thereby avoiding the problem of misjudgment caused by incorrect association when the network device performs security detection on the changed user path. Thus, the accuracy of the abnormal detection method for user plane path updates is improved.

[0124] It should be noted that the user path detection device can implement all the processes implemented in the above method embodiments and achieve the same beneficial effects. To avoid repetition, it will not be described again here.

[0125] In the case where the functions of the integrated modules described above are implemented in hardware, this application provides a possible structural schematic diagram of the electronic device involved in the above embodiments. For example... Figure 6 As shown, the electronic device 90 includes: a processor 92, a communication interface 93, and a bus 94. Optionally, the electronic device 90 may also include a memory 91.

[0126] Processor 92 may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 92 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 92 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0127] Communication interface 93 is used to connect with other devices via a communication network. This communication network can be Ethernet, wireless access network, wireless local area network (WLAN), etc.

[0128] The memory 91 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto.

[0129] As one possible implementation, the memory 91 can exist independently of the processor 92. The memory 91 can be connected to the processor 92 via a bus 94 and is used to store instructions or program code. When the processor 92 calls and executes the instructions or program code stored in the memory 91, it can implement the user path detection method provided in the embodiments of this application.

[0130] In another possible implementation, memory 91 can also be integrated with processor 92.

[0131] Bus 94 can be an Extended Industry Standard Architecture (EISA) bus, etc. Bus 94 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0132] Through the above description of the implementation methods, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the service calling device can be divided into different functional modules to complete all or part of the functions described above.

[0133] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described user path detection method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0134] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0135] This application also provides a readable storage medium storing a program or instructions that, when executed by a computer, implement the user path detection method provided in the above embodiments. It is understood that all or part of the processes in the above method embodiments can be executed by computer instructions instructing related hardware; the readable storage medium can be any of the foregoing embodiments or memory; the readable storage medium can also be an external storage device of the service invocation device, such as a pluggable hard drive, SmartMedia Card (SMC), Secure Digital (SD) card, flash card, etc., equipped on the service invocation device. Further, the readable storage medium can include both internal storage units of the service invocation device and external storage devices. The readable storage medium is used to store the computer program and other programs and data required by the service invocation device. The readable storage medium can also be used to temporarily store data that has been output or will be output.

[0136] This application also provides a computer program product, which is stored in a storage medium and implements the user path detection method provided in the above embodiments when the computer program product is executed by a computer.

[0137] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0138] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0139] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A user path detection method, characterized in that, include: Assign a corresponding session identifier to at least one Protocol Data Unit (PDU) session established by the terminal, and establish at least one first mapping relationship. The PDU session is a data connection established between the terminal and the data network. The first mapping relationship is a mapping relationship between the session identifier corresponding to the PDU session and the node identifier of the user plane path corresponding to the PDU session. The node identifier includes at least one of the following: Complete Session Endpoint Identifier (F-SEID), Tunnel Endpoint Identifier (TEID), and User Plane Function (UPF) instance identifier. If the user path corresponding to the first PDU session in the at least one PDU session is updated from the first user plane path to the second user plane path, the first mapping relationship corresponding to the first PDU session is updated. Based on the session identifier corresponding to the first PDU session and the updated first mapping relationship, the user path corresponding to the first PDU session is detected.

2. The user path detection method according to claim 1, characterized in that, Updating the first mapping relationship corresponding to the first PDU session includes: Establish a second mapping relationship between the session identifier corresponding to the first PDU session and the second user plane path; Based on the second mapping relationship, update the first mapping relationship corresponding to the first PDU session.

3. The user path detection method according to claim 1, characterized in that, The method further includes: Based on the first data, the authorization information corresponding to the first PDU session is determined, wherein the first data includes at least one of the following: user subscription information, approved slice configuration, operator security policy, and approved resource allocation and deployment information; The step of detecting the user path corresponding to the first PDU session based on the session identifier corresponding to the first PDU session and the updated first mapping relationship includes: Based on the session identifier corresponding to the first PDU session and the updated first mapping relationship, the second user path corresponding to the first PDU session is determined; Based on the second user path and the authorization information, the user path corresponding to the first PDU session is detected.

4. The user path detection method according to claim 1, characterized in that, The method further includes: Based on the first mapping relationship, determine whether the first user path has been deleted; If the first user path has not been deleted, it is determined that there is a rule residue anomaly in the user plane path corresponding to the first PDU session.

5. The user path detection method according to claim 3, characterized in that, The step of detecting the user path corresponding to the first PDU session based on the second user path and the authorization information includes: If the second user path does not match the authorization information, it is determined that the user path corresponding to the first PDU session has an unauthorized access exception.

6. The user path detection method according to any one of claims 1 to 5, characterized in that, The method further includes: If there is a rule residue anomaly in the user plane path corresponding to the first PDU session, delete the first user path; If an unauthorized access exception occurs in the user plane path corresponding to the first PDU session, the user plane path corresponding to the first PDU session will be updated from the second user plane path to the first user plane path.

7. A user path detection device, characterized in that, include: Processing module, update module, and detection module; The processing module is used to assign a corresponding session identifier to at least one Protocol Data Unit (PDU) session established by the terminal, and to establish at least one first mapping relationship. The PDU session is a data connection established between the terminal and the data network. The first mapping relationship is a mapping relationship between the session identifier corresponding to the PDU session and the node identifier of the user plane path corresponding to the PDU session. The node identifier includes at least one of the following: Complete Session Endpoint Identifier (F-SEID), Tunnel Endpoint Identifier (TEID), and User Plane Function (UPF) instance identifier. The update module is used to update the first mapping relationship corresponding to the first PDU session when the user path corresponding to the first PDU session in the at least one PDU session is updated from the first user plane path to the second user plane path. The detection module is used to detect the user path corresponding to the first PDU session based on the session identifier corresponding to the first PDU session and the updated first mapping relationship.

8. The user path detection device according to claim 7, characterized in that, The update module is specifically used for: Establish a second mapping relationship between the session identifier corresponding to the first PDU session and the second user plane path; Based on the second mapping relationship, update the first mapping relationship corresponding to the first PDU session.

9. The user path detection device according to claim 7, characterized in that, The device further includes: a determining module; The determining module is used to determine the authorization information corresponding to the first PDU session based on the first data, wherein the first data includes at least one of the following: user subscription information, approved slice configuration, operator security policy, and approved resource allocation and deployment information; The detection module is specifically used for: Based on the session identifier corresponding to the first PDU session and the updated first mapping relationship, the second user path corresponding to the first PDU session is determined; Based on the second user path and the authorization information, the user path corresponding to the first PDU session is detected.

10. The user path detection device according to claim 7, characterized in that, The determining module is further configured to determine, based on the first mapping relationship, whether the first user path has been deleted; and, If the first user path has not been deleted, it is determined that there is a rule residue anomaly in the user plane path corresponding to the first PDU session.

11. The user path detection device according to claim 9, characterized in that, The detection module is specifically used for: If the second user path does not match the authorization information, it is determined that the user path corresponding to the first PDU session has an unauthorized access exception.

12. The user path detection device according to any one of claims 7 to 11, characterized in that, The device further includes: a deletion module; The deletion module is used to delete the first user path when there is an anomaly in the user plane path corresponding to the first PDU session. The update module is further configured to update the user plane path corresponding to the first PDU session from the second user plane path to the first user plane path when there is an unauthorized access exception in the user plane path corresponding to the first PDU session.

13. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the user path detection method as described in any one of claims 1 to 6.

14. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a computer, implement the user path detection method as described in any one of claims 1 to 6.

15. A computer program product, characterized in that, The computer program product is stored in a storage medium, and when executed by a computer, the computer program product implements the user path detection method as described in any one of claims 1 to 6.