A method, device and medium for determining consistency of a SIM card and a terminal

By constructing mapping tables in UPF and SMF to determine the consistency of SIM cards and terminals, the problem of SIM card and terminal verification in virtual private networks is solved, enhancing the security of private network services and preventing unauthorized access.

CN116528238BActive Publication Date: 2026-07-21CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA UNITED NETWORK COMM GRP CO LTD
Filing Date
2023-06-05
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

In virtual private network or hybrid private network scenarios, existing technologies struggle to verify the consistency between SIM cards and terminals, leading to the risk of unauthorized access in campus services with high security requirements.

Method used

By pre-constructing three mapping tables in the User Plane Functional Entity (UPF) and the Session Management Functional Entity (SMF), including mapping the relationship between the terminal identifier and the IMSI and the terminal device ID, the consistency between the SIM card and the terminal is determined, and the current session is interrupted or continued based on the determination result.

Benefits of technology

It achieves consistency verification between SIM cards and terminals, enhances the security of private network services, prevents unauthorized access, and improves the security of private network services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116528238B_ABST
    Figure CN116528238B_ABST
Patent Text Reader

Abstract

The application discloses a kind of consistency determination method, device and medium of SIM card and terminal, when method is applied to user plane function entity UPF, include steps: pre-construct three mapping tables, three mapping tables include the first mapping table of terminal identification and international mobile subscriber identity IMSI, the second mapping table of terminal device ID and terminal device identification, and the third mapping table of international mobile subscriber identity IMSI and terminal device identification;Session management function entity SMF consistency determination instruction is received;Receive first terminal identification, first terminal device ID, first terminal device identification and first international mobile subscriber identity IMSI read from first terminal SIM card;The consistency of SIM card and terminal is determined based on the three mapping tables, and the determination result is transmitted to session management function entity SMF, to complete the consistency determination of SIM card and terminal.The method can meet the demand of card and terminal consistency in private network scene, and enhance the security guarantee of private network service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication technology, and in particular to a method, apparatus and medium for determining the consistency between a SIM card and a terminal. Background Technology

[0002] To meet different needs, the communication system offers two modes: SIM card separation and SIM card binding.

[0003] However, for virtual private networks or hybrid private network scenarios, as well as campus businesses with high security requirements, not only is device-card binding required, but also specific IP addresses can only access the network using SIM card A and terminal A. Accessing the network using SIM card B and terminal A is considered illegal and should not be allowed.

[0004] Therefore, how to achieve consistency verification between the SIM card and the terminal is a problem that must be addressed. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to address the above-mentioned shortcomings of the prior art by providing a method, device and medium for determining the consistency of SIM cards and terminals, so as to meet the requirements for card and terminal consistency in private network scenarios and enhance the security of private network services.

[0006] In a first aspect, the present invention provides a method for determining the consistency between a SIM card and a terminal, applied to a User Plane Function Entity (UPF), the method comprising the following steps:

[0007] S1: Receive the consistency determination instruction from the Session Management Function (SMF) entity; and receive the terminal first identifier, the terminal first device ID, the terminal first device identifier, and the first International Mobile Subscriber Identity (IMSI) read by the terminal from the SIM card;

[0008] S2: Based on three pre-built mapping tables of terminal identifier, International Mobile Subscriber Identity (IMSI), terminal device ID, and terminal device identifier, and based on the first terminal identifier, the first terminal device ID, the first terminal device identifier, and the first International Mobile Subscriber Identity (IMSI), the consistency between the SIM card and the terminal is determined, and the determination result is transmitted to the Session Management Function (SMF) entity to complete the consistency determination of the SIM card and the terminal.

[0009] Furthermore, step S0 is included before step S1.

[0010] S0: Three mapping tables are pre-built. The three mapping tables include a first mapping table that maps the relationship between terminal identifier and IMSI, a second mapping table that maps the relationship between terminal device ID and terminal device identifier, and a third mapping table that maps the relationship between IMSI and terminal device identifier.

[0011] Wherein: the terminal identifier includes UE ID, and / or, General Public User Identifier (GPSI); the terminal device identifier includes International Mobile Equipment Identifier (IMEI), and / or, Permanent Device Identifier (PEI).

[0012] Furthermore, in step S2, the consistency determination of the SIM card and the terminal specifically includes:

[0013] S21: Define the IMSI mapped to the first identifier of the terminal as the second IMSI according to the first mapping table, and compare the first IMSI with the second IMSI;

[0014] as well as,

[0015] According to the second mapping table, the terminal device identifier mapped to the terminal first device ID is defined as the terminal second device identifier, and the terminal first device identifier and the terminal second device identifier are compared.

[0016] as well as,

[0017] The terminal device identifier mapped by the first IMSI is defined as the terminal third device identifier according to the third mapping table, and the terminal first device identifier is compared with the terminal third device identifier.

[0018] S22: If the first IMSI is the same as the second IMSI, and the first device identifier of the terminal is the same as the second device identifier of the terminal, and the first device identifier of the terminal is the same as the third device identifier of the terminal, then it is determined that the SIM card and the terminal are consistent; otherwise, it is determined that the SIM card and the terminal are inconsistent.

[0019] Furthermore, in step S2, transmitting the determination result to the session management function entity (SMF) is done by transmitting the determination result to the SMF via data channel N4.

[0020] Following step S2, the method further includes step S3:

[0021] S3: Based on the consistency determination result, decide whether to interrupt or not interrupt the current session using SMF, specifically including:

[0022] If the determination results are consistent, the SMF will not interrupt the current session.

[0023] or,

[0024] If the determination results are inconsistent, the SMF will interrupt the current session and send a request to the AMF for the current user to re-register and re-authenticate.

[0025] Secondly, the present invention provides a method for determining the consistency between a SIM card and a terminal, applied to a Session Management Function (SMF) entity, the method comprising the following steps:

[0026] A1: Send a consistency determination instruction to UPF;

[0027] A2: Receive terminal identifier, first terminal device ID, first terminal device identifier, and first IMSI read by the first terminal from the SIM card;

[0028] A3: Receive the consistency determination result sent by UPF to complete the consistency determination of SIM card and terminal; the consistency determination result sent by UPF is obtained by UPF based on three mapping tables pre-built by UPF based on terminal identifier, IMSI, terminal device ID and terminal device identifier, and based on the first terminal identifier, the first terminal device ID, the first terminal device identifier and the first IMSI to determine the consistency of SIM card and terminal.

[0029] Furthermore, in step A3, receiving the consistency determination result sent by the UPF is completed through data channel N4. One end of data channel N4 is the Session Management Function (SMF) entity, and the other end is the User Plane Function (UPF) entity.

[0030] Step A3 is followed by step A4:

[0031] A4: Based on the consistency determination result, the current session may or may not be interrupted, specifically including:

[0032] If the determination results are consistent, the current session is terminated.

[0033] or,

[0034] If the determination results are inconsistent, the current session will not be interrupted, and a request for the current user to re-register and re-authenticate will be sent to the AMF.

[0035] Thirdly, the present invention provides a SIM card and terminal consistency determination device, applied to a UPF, the device comprising:

[0036] The first receiving unit is used to receive the SMF consistency determination instruction;

[0037] The second receiving unit is configured to receive the first terminal identifier, the first terminal device ID, the first terminal device identifier, and the first IMSI read by the first terminal from the SIM card;

[0038] The first determination unit is connected to the first receiving unit and the second receiving unit respectively. It is used to determine the consistency between the SIM card and the terminal based on three mapping tables pre-built by the terminal identifier, IMSI, terminal device ID and the terminal device identifier, and according to the first terminal identifier, the first terminal device ID, the first terminal device identifier and the first IMSI, and to transmit the determination result to the session management function entity SMF to complete the consistency determination of the SIM card and the terminal.

[0039] Furthermore, the device also includes:

[0040] The construction unit, which is connected to the first determination unit, is used to pre-construct three mapping tables, including a first mapping table mapping the relationship between terminal identifier and IMSI, a second mapping table mapping the relationship between terminal device ID and terminal device identifier, and a third mapping table mapping the relationship between IMSI and terminal device identifier.

[0041] Wherein: the terminal identifier includes UE ID and / or GPSI; the terminal device identifier includes IMEI and / or PEI.

[0042] Fourthly, the present invention provides a consistency determination device for a SIM card and a terminal, applied to a Session Management Function (SMF) entity, the device comprising:

[0043] The first sending unit is used to send a consistency determination indication to the UPF;

[0044] The third receiving unit is used to receive the first terminal identifier, the first terminal device ID, the first terminal device identifier, and the first IMSI read by the first terminal from the SIM card;

[0045] The fourth receiving unit is connected to the first sending unit and the third receiving unit respectively, and is used to receive the consistency determination result sent by the UPF to complete the consistency determination of the SIM card and the terminal. The consistency determination result sent by the UPF is obtained by the UPF based on three mapping tables pre-built by the terminal identifier, IMSI, terminal device ID and terminal device identifier, and by determining the consistency of the SIM card and the terminal according to the first terminal identifier, the first terminal device ID, the first terminal device identifier and the first IMSI.

[0046] Fifthly, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-described method for determining the consistency of a SIM card and a terminal.

[0047] The beneficial effects of this invention are:

[0048] The present invention provides a method, device and medium for determining the consistency of SIM card and terminal, which can meet the requirements for card and terminal consistency in private network scenarios and enhance the security of private network services. Attached Figure Description

[0049] Figure 1 This is a schematic diagram of the consistency determination in an embodiment of the present invention;

[0050] Figure 2This is a flowchart illustrating the consistency determination process in an embodiment of the present invention;

[0051] Figure 3 This is the consistency determination process applied to UPF entities in this embodiment of the invention;

[0052] Figure 4 This is the consistency determination process applied to SMF entities in this embodiment of the invention;

[0053] Figure 5 This is a consistency determination device applied to UPF entities in an embodiment of the present invention;

[0054] Figure 6 This is a consistency determination device applied to SMF entities in an embodiment of the present invention;

[0055] In the attached figures, the reference numerals are: 10, first receiving unit; 20, second receiving unit; 30, first determination unit; 40, first sending unit; 50, third receiving unit; and 60, fourth receiving unit. Detailed Implementation

[0056] To enable those skilled in the art to better understand the technical solution of the present invention, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.

[0057] It is understood that the specific embodiments and accompanying drawings described herein are merely for explaining the invention and are not intended to limit the invention.

[0058] It is understood that, without conflict, the various embodiments and features in the embodiments of the present invention can be combined with each other.

[0059] It is understood that, for ease of description, only the parts related to the present invention are shown in the accompanying drawings, while the parts unrelated to the present invention are not shown in the drawings.

[0060] It is understood that each unit or module involved in the embodiments of the present invention may correspond to only one entity structure, or may be composed of multiple entity structures, or multiple units or modules may be integrated into one entity structure.

[0061] It is understood that, without conflict, the functions and steps marked in the flowcharts and block diagrams of this invention may occur in a different order than that marked in the accompanying drawings.

[0062] It is understood that the flowcharts and block diagrams of this invention illustrate the possible architecture, functions, and operations of systems, apparatuses, devices, and methods according to various embodiments of this invention. Each block in the flowchart or block diagram may represent a unit, module, program segment, or code, containing executable instructions for implementing the specified function. Furthermore, each block or combination of blocks in the block diagram and flowchart can be implemented using a hardware-based system to achieve the specified function, or using a combination of hardware and computer instructions.

[0063] It is understood that the units and modules involved in the embodiments of the present invention can be implemented by software or by hardware. For example, the units and modules can be located in a processor.

[0064] Example 1:

[0065] like Figure 1 , Figure 2 and Figure 3 As shown, this embodiment provides a method for determining the consistency between a SIM card and a terminal. This method is applied to the User Plane Function Entity (UPF) and includes the following steps:

[0066] Three mapping tables are pre-built in the User Plane Functional Entity (UPF). The three mapping tables include a first mapping table that maps the relationship between the terminal identifier and the IMSI (International Mobile Subscriber Identity), a second mapping table that maps the relationship between the terminal device ID and the terminal device identifier, and a third mapping table that maps the relationship between the IMSI and the terminal device identifier.

[0067] Wherein: the terminal identifier includes UE ID, and / or, General Public User Identifier (GPSI); the terminal device identifier includes International Mobile Equipment Identifier (IMEI), and / or, Permanent Device Identifier (PEI).

[0068] The three mapping tables only need to be constructed once, and after construction, they only need to be maintained. After constructing the three mapping tables, the UPF receives the consistency determination instruction from the SMF; and receives the terminal's first identifier, the terminal's first device ID, the terminal's first device identifier, and the first IMSI read by the terminal from the SIM card.

[0069] Specifically, the consistency determination of the SIM card and the terminal includes:

[0070] The IMSI mapped to the first identifier of the terminal is defined as the second IMSI according to the first mapping table, and the first IMSI and the second IMSI are compared.

[0071] as well as,

[0072] According to the second mapping table, the terminal device identifier mapped to the terminal first device ID is defined as the terminal second device identifier, and the terminal first device identifier and the terminal second device identifier are compared.

[0073] as well as,

[0074] The terminal device identifier of the first IMSI is defined as the terminal third device identifier according to the third mapping table, and the terminal first device identifier is compared with the terminal third device identifier.

[0075] Based on the above comparison results, the consistency of the SIM card and the terminal is determined as follows: if the first IMSI is the same as the second IMSI, and the first device identifier of the terminal is the same as the second device identifier of the terminal, and the first device identifier of the terminal is the same as the third device identifier of the terminal, then the SIM card and the terminal are determined to be consistent; otherwise, the SIM card and the terminal are determined to be inconsistent.

[0076] Specifically, the UPF transmits the determination result to the SMF via data channel N4. After transmitting the determination result to the SMF, the UPF also performs the following steps: based on the consistency determination result, it determines whether the SMF should interrupt or not interrupt the current session execution, specifically:

[0077] If the determination results are consistent, the SMF will not interrupt the current session.

[0078] or,

[0079] If the determination results are inconsistent, the SMF will interrupt the current session and send a request to the AMF for the current user to re-register and re-authenticate.

[0080] The specific implementation process is as follows:

[0081] 1. Add an authentication module to UPF and maintain three mapping tables related to IMEI, PEI, user identifier, and device identifier, such as... Figure 1 As shown, the three mapping tables include a first mapping table that maps the relationship between terminal identifier and IMSI, a second mapping table that maps the relationship between terminal device ID and terminal device identifier, and a third mapping table that maps the relationship between IMSI and terminal device identifier.

[0082] 2. Define the flags and information elements related to consistency verification:

[0083] The flags and information cells related to consistency verification are defined and implemented on the N4 interface:

[0084] Add a group to the PFCP Session Modification Request message on the N4 interface.

[0085] Consistency Check Information (IE):

[0086]

[0087] And define Consistency Check Information (IE).

[0088]

[0089] Add a combined message to the PFCP Session Report Request message on the N4 interface.

[0090] MetaConsistency Check Report IE:

[0091]

[0092] Simultaneously, set the 8th bit of the Report Type IE to the Consistency Check Flag (CCR). When CCR = 1, it indicates that a consistency check report is being submitted, and define the Consistency Check Report IE element:

[0093] Consistency Check Report (IE)

[0094]

[0095]

[0096] Consistency Check Result IE:

[0097]

[0098] The Consistency Check Result is a 2-digit binary integer. When the SIM card and the terminal are compatible, the Consistency Check Result will show a match, with a value of 1. When the SIM card and the terminal are incompatible, the Consistency Check Result will show a mismatch, with a value of 0, as shown in the table below:

[0099] Check Inconsistent 0 Check Consistent 1 Spare 2 to 3

[0100] 3. For example Figure 2 As shown, the design of the private network application AF request for consistency verification messages triggers the initiation of the consistency verification process for the specified UE in the session. The specific steps of the consistency verification are as follows:

[0101] (1) For security reasons, specific private network application AF can trigger a device-card consistency verification request to start the user plane of a specific running UE once / periodically;

[0102] (2) AF calls the Network Open Function (NEF) service, carrying the UE IP to be verified, IndicationforconsistencyCheck (consistency check flag);

[0103] (3) After receiving the request, NEF will store the UE (terminal) information requested by AF in UDR (AF ID, UE IP, GPSI, Indication for ConsisitencyCheck).

[0104] It also returns a response message to the AF, indicating that the AF request has been received;

[0105] (4) After receiving the NEF request, the UDM / UDR queries the stored session context data based on the provided UE IP and writes the UE information (accessed S-NSSAI+DNN, IMSI, PEI, etc., note: additional UE information may also be included).

[0106] Information such as GPS I is written to the PCF, and the corresponding session information (Session ID) is written to it.

[0107] (5) Send to the Session Management Function Entity (SMF), which determines the Session ID based on the Session ID.

[0108] Locate the N4 tunnel corresponding to this session and communicate with the user plane functional entity on the N4 interface.

[0109] UPF sends a PFCP Session Modification Request message, which includes a newly defined combined information element, Consistency Check Information (IE), instructing UPF to initiate the consistency verification process;

[0110] Note: For security reasons, the User ID information carried can be encrypted or decrypted.

[0111] (6) After the UPF receives the N4 message

[0112] (6-1) Add the UE IP to the PDR rules included in this session to filter out packets whose source address is the specified UE IP address;

[0113] (6-2) The IMSI0 and PEI0 information are sent to the authentication module for comparison with the user face identifier identified by the DPI module.

[0114] (6-3) Filter out the data packets and send them to the DPI module for deep packet inspection. Detect the user identifier UE ID / GPSI (i.e., terminal identifier or mobile phone number) carried by the application layer AF service. For trusted private network services, the user's mobile phone number can be used directly to identify UE ID and terminal device identifier Device ID.

[0115] Note 1): For other data packets, UPF executes the original standard forwarding process;

[0116] Note 2): Typically, the user identifier and device identifier here refer to identifiers that can be identified by private network applications. These are different from the IMSI and PEI information stored in the operator's network. The relevant mapping relationship can be configured in the UPF's authentication module.

[0117] (6-4) The DPI module sends the user identifier UE ID / GPSI and the terminal device identifier Device ID to the authentication module;

[0118] (6-5) After receiving the information from steps 7-2 and 7-4, the authentication module maps the UE ID / GPSI to IMSI1 and the Device ID to PEI1 according to the locally configured mapping table.

[0119] (7) If IMSI1 = IMSI0 and PEI1 = PEI0, it indicates that the SIM card and terminal are consistent. The UPF will initiate a PFCP Session ReportRequest message with CCR = 1 and Consistency Check Result = 1 for Consistency Check Report IE. Otherwise, it will initiate a message with CCR = 1 and Consistency Check Result = 0 for Consistency Check Report IE. Only when the device ID corresponds to the terminal identifier, the obtained International Mobile Subscriber Identity (IMSI) is the same as the mapped IMSI, and the obtained terminal device identifier is the same as the mapped terminal device identifier, can it be determined that the SIM card and terminal are consistent. Otherwise, it is determined that the SIM card and terminal are inconsistent.

[0120] (8) If the verification results are consistent after the SMF receives the data, the current session will not be interrupted; if the verification results are inconsistent, the current session will be interrupted and a process to request the current user to re-register for authentication will be initiated to the AMF.

[0121] Example 2:

[0122] like Figure 1 , Figure 2 and Figure 4As shown, this embodiment provides a method for determining the consistency between a SIM card and a terminal, applied to a Session Management Function (SMF) entity. The method includes the following steps:

[0123] A1: Send a consistency determination instruction to UPF;

[0124] A2: Receive terminal identifier, first terminal device ID, first terminal device identifier, and first IMSI read by the first terminal from the SIM card;

[0125] A3: Receive the consistency determination result sent by the User Plane Function Entity (UPF) to complete the consistency determination of the SIM card and the terminal; wherein, the consistency determination result sent by the UPF is obtained by the User Plane Function Entity (UPF) based on three mapping tables pre-built by the terminal identifier, IMSI, terminal device ID and the terminal device identifier, and based on the first terminal identifier, the first terminal device ID, the first terminal device identifier and the first IMSI to determine the consistency of the SIM card and the terminal.

[0126] Specifically, in step A3, receiving the consistency determination result sent by the User Plane Function Entity (UPF) is accomplished through data channel N4, where one end of data channel N4 is the SMF and the other end is the UPF entity.

[0127] Step A3 is followed by step A4:

[0128] A4: Based on the consistency determination result, the current session may or may not be interrupted, specifically including:

[0129] If the determination results are consistent, the current session is terminated.

[0130] or,

[0131] If the determination results are inconsistent, the current session will not be interrupted, and a request for the current user to re-register and re-authenticate will be sent to the AMF.

[0132] The process and principle of Example 2 are the same as those of Example 1. The same parts will not be described again.

[0133] Both the method in Example 2 and the method in Example 1 can meet the requirements for card and terminal consistency verification or validation in private network scenarios, thus enhancing the security of private network services.

[0134] Example 3:

[0135] like Figure 1 , Figure 2 and Figure 5 As shown, this embodiment provides a consistency determination device for a SIM card and a terminal, applied to a UPF. The device includes:

[0136] The first receiving unit 10 is used to receive the consistency determination indication of SMF;

[0137] The second receiving unit 20 is used to receive the first terminal identifier, the first terminal device ID, the first terminal device identifier, and the first IMSI read by the first terminal from the SIM card;

[0138] The first determination unit 30 is connected to the first receiving unit 10 and the second receiving unit 20 respectively. It is used to determine the consistency between the SIM card and the terminal based on the terminal identifier, IMSI, terminal device ID and three pre-built mapping tables of the terminal device identifier, and according to the terminal first identifier, terminal first device ID, terminal first device identifier and first IMSI, and transmit the determination result to the session management function entity SMF to complete the consistency determination of the SIM card and the terminal.

[0139] The device also includes:

[0140] The construction unit, connected to the first determination unit 30, is used to pre-construct three mapping tables. The three mapping tables include a first mapping table mapping the relationship between terminal identifier and IMSI, a second mapping table mapping the relationship between terminal device ID and terminal device identifier, and a third mapping table mapping the relationship between IMSI and terminal device identifier.

[0141] Wherein: the terminal identifier includes UE ID and / or GPSI; the terminal device identifier includes IMEI and / or PEI.

[0142] Example 4:

[0143] like Figure 1 , Figure 2 and Figure 6 As shown, this embodiment provides a consistency determination device for SIM cards and terminals, applied to SMF (Signal-Mobile Function). The device includes:

[0144] The first sending unit 40 is used to send a consistency determination indication to the UPF;

[0145] The third receiving unit 50 is used to receive the first terminal identifier, the first terminal device ID, the first terminal device identifier, and the first IMSI read by the first terminal from the SIM card;

[0146] The fourth receiving unit 60 is connected to the first sending unit 40 and the third receiving unit 50 respectively, and is used to receive the consistency determination result sent by the UPF to complete the consistency determination of the SIM card and the terminal. The consistency determination result sent by the UPF is obtained by the UPF based on three mapping tables pre-built by the terminal identifier, IMSI, terminal device ID and terminal device identifier, and by determining the consistency of the SIM card and the terminal according to the first terminal identifier, the first terminal device ID, the first terminal device identifier and the first IMSI.

[0147] The apparatus in Embodiment 3 and the apparatus in Embodiment 4 can meet the requirements for card and terminal consistency verification or validation in private network scenarios, thereby enhancing the security of private network services.

[0148] Example 5:

[0149] Based on the same technical concept as Embodiments 1 and 2, this embodiment provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the consistency determination method for SIM card and terminal described in Embodiments 1 and 2.

[0150] It is understood that the above embodiments are merely exemplary implementations used to illustrate the principles of the present invention, and the present invention is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also considered to be within the scope of protection of the present invention.

Claims

1. A method for determining the consistency between a SIM card and a terminal, applied to a User Plane Function Entity (UPF), characterized in that, The method includes the following steps: S1: Receive the consistency determination instruction from the Session Management Function (SMF) entity; and receive the terminal first identifier, the terminal first device ID, the terminal first device identifier, and the first International Mobile Subscriber Identity (IMSI) read by the terminal from the SIM card; The procedure preceding step S1 also includes: Three mapping tables are pre-built, including a first mapping table that maps the relationship between terminal identifier and IMSI, a second mapping table that maps the relationship between terminal device ID and terminal device identifier, and a third mapping table that maps the relationship between IMSI and terminal device identifier. Wherein: the terminal identifier includes UE ID, and / or, General Public User Identifier (GPSI); the terminal device identifier includes International Mobile Equipment Identifier (IMEI), and / or, Permanent Device Identifier (PEI); S2: Based on three pre-built mapping tables of terminal identifier, International Mobile Subscriber Identity (IMSI), terminal device ID, and terminal device identifier, and based on the first terminal identifier, the first terminal device ID, the first terminal device identifier, and the first International Mobile Subscriber Identity (IMSI), the consistency between the SIM card and the terminal is determined, and the determination result is transmitted to the Session Management Function (SMF) entity to complete the consistency determination of the SIM card and the terminal. In step S2, the consistency between the SIM card and the terminal is determined, specifically including: S21: Define the IMSI mapped to the first identifier of the terminal as the second IMSI according to the first mapping table, and compare the first IMSI with the second IMSI; as well as, According to the second mapping table, the terminal device identifier mapped to the terminal first device ID is defined as the terminal second device identifier, and the terminal first device identifier and the terminal second device identifier are compared. as well as, The terminal device identifier mapped by the first IMSI is defined as the terminal third device identifier according to the third mapping table, and the terminal first device identifier is compared with the terminal third device identifier. S22: If the first IMSI is the same as the second IMSI, and the first device identifier of the terminal is the same as the second device identifier of the terminal, and the first device identifier of the terminal is the same as the third device identifier of the terminal, then it is determined that the SIM card and the terminal are consistent; otherwise, it is determined that the SIM card and the terminal are inconsistent.

2. The method for determining the consistency of SIM card and terminal according to claim 1, characterized in that, In step S2, the determination result is transmitted to the session management function entity (SMF) via data channel N4. Following step S2, the method further includes step S3: S3: Based on the consistency determination result, determine whether the SMF interrupts or does not interrupt the current session, specifically including: If the determination results are consistent, the SMF will not interrupt the current session. or, If the determination results are inconsistent, the SMF will interrupt the current session and send a request to the AMF for the current user to re-register and re-authenticate.

3. A method for determining the consistency between a SIM card and a terminal, applied to a Session Management Function (SMF) entity, characterized in that, The method includes the following steps: A1: Send a consistency determination instruction to UPF; Before sending the consistency determination instruction to the UPF, the method further includes: Three mapping tables are pre-built, including a first mapping table that maps the relationship between terminal identifier and IMSI, a second mapping table that maps the relationship between terminal device ID and terminal device identifier, and a third mapping table that maps the relationship between IMSI and terminal device identifier. Wherein: the terminal identifier includes UE ID, and / or, General Public User Identifier (GPSI); the terminal device identifier includes International Mobile Equipment Identifier (IMEI), and / or, Permanent Device Identifier (PEI); A2: Receive terminal identifier, first terminal device ID, first terminal device identifier, and first IMSI read by the first terminal from the SIM card; A3: Receive the consistency determination result sent by UPF to complete the consistency determination of SIM card and terminal; wherein, the consistency determination result sent by UPF is obtained by the user plane function entity UPF based on three mapping tables pre-built by terminal identifier, IMSI, terminal device ID and terminal device identifier, and based on the first terminal identifier, the first terminal device ID, the first terminal device identifier and the first IMSI to determine the consistency of SIM card and terminal. The consistency between the SIM card and the terminal is determined, specifically including: The IMSI mapped to the first identifier of the terminal is defined as the second IMSI according to the first mapping table, and the first IMSI and the second IMSI are compared. as well as, According to the second mapping table, the terminal device identifier mapped to the terminal first device ID is defined as the terminal second device identifier, and the terminal first device identifier and the terminal second device identifier are compared. as well as, The terminal device identifier mapped by the first IMSI is defined as the terminal third device identifier according to the third mapping table, and the terminal first device identifier is compared with the terminal third device identifier. If the first IMSI is the same as the second IMSI, and the first device identifier of the terminal is the same as the second device identifier of the terminal, and the first device identifier of the terminal is the same as the third device identifier of the terminal, then it is determined that the SIM card and the terminal are consistent; otherwise, it is determined that the SIM card and the terminal are inconsistent.

4. The method for determining the consistency of SIM card and terminal according to claim 3, characterized in that, In step A3, receiving the consistency determination result sent by the UPF is accomplished through data channel N4. Step A3 is followed by step A4: A4: Based on the consistency determination result, the current session may or may not be interrupted, specifically including: If the determination results are consistent, the current session is terminated. or, If the determination results are inconsistent, the current session will not be interrupted, and a request for the current user to re-register and re-authenticate will be sent to the AMF.

5. A consistency determination device for a SIM card and a terminal, applied to a UPF, characterized in that, include: The first receiving unit is used to receive the SMF consistency determination instruction; Before receiving the SMF's consistency determination instruction, the following steps are also included: Three mapping tables are pre-built, including a first mapping table that maps the relationship between terminal identifier and IMSI, a second mapping table that maps the relationship between terminal device ID and terminal device identifier, and a third mapping table that maps the relationship between IMSI and terminal device identifier. Wherein: the terminal identifier includes UE ID, and / or, General Public User Identifier (GPSI); the terminal device identifier includes International Mobile Equipment Identifier (IMEI), and / or, Permanent Device Identifier (PEI); The second receiving unit is used to receive the terminal first identifier, the terminal first device ID, the terminal first device identifier, and the first IMSI read by the terminal from the SIM card; The first determination unit is connected to the first receiving unit and the second receiving unit respectively. It is used to determine the consistency between the SIM card and the terminal based on three mapping tables pre-built according to the terminal identifier, IMSI, terminal device ID and the terminal device identifier, and according to the first terminal identifier, the first terminal device ID, the first terminal device identifier and the first IMSI, and transmit the determination result to the session management function entity SMF to complete the consistency determination of the SIM card and the terminal. The consistency between the SIM card and the terminal is determined, specifically including: The IMSI mapped to the first identifier of the terminal is defined as the second IMSI according to the first mapping table, and the first IMSI and the second IMSI are compared. as well as, According to the second mapping table, the terminal device identifier mapped to the terminal first device ID is defined as the terminal second device identifier, and the terminal first device identifier and the terminal second device identifier are compared. as well as, The terminal device identifier mapped by the first IMSI is defined as the terminal third device identifier according to the third mapping table, and the terminal first device identifier is compared with the terminal third device identifier. If the first IMSI is the same as the second IMSI, and the first device identifier of the terminal is the same as the second device identifier of the terminal, and the first device identifier of the terminal is the same as the third device identifier of the terminal, then it is determined that the SIM card and the terminal are consistent; otherwise, it is determined that the SIM card and the terminal are inconsistent.

6. A consistency determination device for a SIM card and a terminal, applied to a Session Management Function (SMF) entity, characterized in that, include: The first sending unit is used to send a consistency determination indication to the UPF; Before sending the consistency determination instruction to the UPF, the method further includes: Three mapping tables are pre-built, including a first mapping table that maps the relationship between terminal identifier and IMSI, a second mapping table that maps the relationship between terminal device ID and terminal device identifier, and a third mapping table that maps the relationship between IMSI and terminal device identifier. Wherein: the terminal identifier includes UE ID, and / or, General Public User Identifier (GPSI); the terminal device identifier includes International Mobile Equipment Identifier (IMEI), and / or, Permanent Device Identifier (PEI); The third receiving unit is used to receive the first terminal identifier, the first terminal device ID, the first terminal device identifier, and the first IMSI read by the first terminal from the SIM card; The fourth receiving unit is connected to the first sending unit and the third receiving unit respectively, and is used to receive the consistency determination result sent by the UPF to complete the consistency determination of the SIM card and the terminal. The consistency determination result sent by the UPF is obtained by the UPF based on three mapping tables pre-built by the terminal identifier, IMSI, terminal device ID and terminal device identifier, and by determining the consistency of the SIM card and the terminal according to the terminal first identifier, terminal first device ID, terminal first device identifier and IMSI. The consistency between the SIM card and the terminal is determined, specifically including: The IMSI mapped to the first identifier of the terminal is defined as the second IMSI according to the first mapping table, and the first IMSI and the second IMSI are compared. as well as, According to the second mapping table, the terminal device identifier mapped to the terminal first device ID is defined as the terminal second device identifier, and the terminal first device identifier and the terminal second device identifier are compared. as well as, The terminal device identifier mapped by the first IMSI is defined as the terminal third device identifier according to the third mapping table, and the terminal first device identifier is compared with the terminal third device identifier. If the first IMSI is the same as the second IMSI, and the first device identifier of the terminal is the same as the second device identifier of the terminal, and the first device identifier of the terminal is the same as the third device identifier of the terminal, then it is determined that the SIM card and the terminal are consistent; otherwise, it is determined that the SIM card and the terminal are inconsistent.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the consistency determination method for the SIM card and the terminal as described in any one of claims 1 to 4.