Method, device, electronic device and medium for interrupting user session

By dynamically storing session status and user roles in the session index table and interrupting user sessions based on the downtime type, the problem of postpaid users' calls not being able to be interrupted immediately is solved. This enables precise session interruption, avoids losses, and ensures smooth calls.

CN115278937BActive Publication Date: 2025-09-16CHINA TELECOM CORP LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210800707.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-08
Publication Date
2025-09-16
Estimated Expiration
2042-07-08

AI Technical Summary

Technical Problem

In telecommunications networks, postpaid users' calls cannot be immediately disconnected, resulting in losses for both operators and users. In particular, in scenarios where calls need to be terminated immediately, existing technologies are unable to accurately interrupt user sessions.

Method used

The session status is dynamically stored through the session index table to determine the target user's session status, role, and outage type, and the current session is interrupted if a match is found. The session status is dynamically stored in the session index table, and precise session interruption is achieved by combining the user role and outage type.

Benefits of technology

It achieves accurate interruption of user sessions upon receiving a shutdown command, avoiding losses for operators and users, meeting the needs of anti-fraud and emergency communications, and ensuring smooth calls.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115278937B_ABST
    Figure CN115278937B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, electronic device and medium for interrupting a user session, and relates to the field of communication technology. The method comprises: upon receiving a shutdown instruction, determining the target session state of the target user corresponding to the shutdown instruction according to the session state dynamically stored in the session index table; when the target session state is in session, determining the role of the target user and the shutdown type corresponding to the target user; when the role matches the shutdown type, interrupting the current session of the target user. The method dynamically stores the session state through the session index table, and does not need to fully monitor the session process, thus saving memory and simplifying the processing mechanism; by combining the session state, user role and corresponding shutdown type, accurate session interruption is achieved, which can meet the need for immediate call interruption in scenarios such as anti-fraud and emergency, and avoid losses to operators and users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a method, device, electronic device and medium for interrupting a user session. Background Art

[0002] Currently, in the telecommunications network operating environment, users are divided into prepaid users and postpaid users. Among them, postpaid users refer to users who use the service upfront and pay later. Postpaid users need to sign a contract and register their user information first. For postpaid users, there are some scenarios where calls need to be terminated immediately. For example, when a postpaid user makes a long call, makes an international long-distance call, or makes a call that fraudulently charges high international settlement fees and meets certain conditions, the call needs to be terminated immediately. Or, in anti-fraud scenarios or emergency communication scenarios, the call needs to be terminated immediately. Because the voice architecture of telecom operators' 4G, 5G, and VOBB (Voice over BroadBand) is based on IMS (IP Multimedia Subsystem) to provide voice services, when a call needs to be terminated immediately, the shutdown command issued by BOSS (Business Operating Support System, Operation and Maintenance Support System, referred to as the accounting system) to the IMS core network cannot immediately terminate the user in the call. The user's call must be restricted the next time the user initiates a call, which causes losses to the operator and the user. Summary of the Invention

[0003] To solve the above technical problem or at least partially solve the above technical problem, embodiments of the present invention provide a method, device, electronic device, and medium for interrupting a user session.

[0004] In a first aspect, an embodiment of the present invention provides a method for interrupting a user session, comprising:

[0005] In the case of receiving a shutdown instruction, determining a target session state of a target user corresponding to the shutdown instruction according to the session state dynamically stored in the session index table;

[0006] When the target session state is in progress, determining the role of the target user and the downtime type corresponding to the target user;

[0007] When the role matches the outage type, the current session of the target user is interrupted.

[0008] In an optional embodiment, the session index table includes a session identifier, and when the session identifier is the first identifier, the session state indicated by the session identifier is an ongoing session;

[0009] Determining the target session state of the target user corresponding to the shutdown instruction based on the session state dynamically stored in the session index table includes: querying the session index table to determine the target session identifier corresponding to the target user; and determining that the target session state of the target user is in progress when the target session identifier is the first identifier.

[0010] In an optional embodiment, the method further includes: when it is detected that the current session is established, setting the target session identifier in the session index table to the first identifier.

[0011] In an optional embodiment, when the session identifier is the second identifier, the session state indicated by the session identifier is session end;

[0012] The method further includes: when detecting that the current session is released, setting the target session identifier in the session index table to the second identifier.

[0013] In an optional embodiment, the session index table further includes a user identifier;

[0014] The querying of the session index table to determine the target session identifier corresponding to the target user includes: matching the participant identifier carried in the shutdown instruction with the user identifier in the session index table to determine the target user identifier that matches the participant identifier; and determining the target session identifier corresponding to the target user based on the target user identifier.

[0015] In an optional embodiment, the target session identifier includes a first target state identifier, a second target state identifier, and a third target state identifier;

[0016] When it is detected that the current session is established, setting the target session identifier to the first identifier includes: when it is detected that the current session is established, setting the values ​​of the first target state identifier and the second target state identifier to first preset values, and setting the value of the third target state identifier to a second preset value;

[0017] When it is detected that the current session is released, setting the target session identifier to the second identifier includes: when it is detected that the current session is released, updating the value of the third target state identifier to the first preset value;

[0018] When the target session identifier is the first identifier, determining that the target session state of the target user is in progress includes: when the values ​​of the first target state identifier and the second target state identifier are both the first preset values ​​and the value of the third target state identifier is the second preset value, determining that the target session state of the target user is in progress.

[0019] In an optional embodiment, interrupting the current session of the target user when the role matches the outage type includes: when the role is the caller and the outage type is calling restriction or calling or called restriction, determining that the role matches the outage type, and interrupting the current session of the target user; or, when the role is the called party and the outage type is calling or called restriction, determining that the role matches the outage type, and interrupting the current session of the target user.

[0020] In an optional embodiment, determining the role of the target user and the outage type corresponding to the target user includes: obtaining a session message of the current session, and determining the role of the target user based on the session message; obtaining user data of the target user, and determining the outage type corresponding to the target user based on the user data.

[0021] In an optional embodiment, determining the role of the target user based on the conversation message includes: parsing the conversation message to determine the calling party ID and the called party ID carried by the conversation message; matching the calling party ID and the called party ID with the participant ID carried by the shutdown instruction respectively; determining the role of the target user as the calling party when the calling party ID is consistent with the participant ID; or determining the role of the target user as the called party when the called party ID is consistent with the participant ID.

[0022] In an optional embodiment, determining the shutdown type corresponding to the target user based on the user data includes: parsing the user data to determine shutdown parameters; and determining the shutdown type corresponding to the target user based on the shutdown parameters.

[0023] In an optional embodiment, the shutdown parameters include an outgoing call prohibition flag and an incoming call prohibition flag;

[0024] The determining, based on the shutdown parameters, of the shutdown type corresponding to the target user includes: determining a value of the outgoing call prohibition flag and a value of the incoming call prohibition flag; determining, when the value of the outgoing call prohibition flag is a third preset value and the value of the incoming call prohibition flag is a fourth preset value, that the shutdown type corresponding to the target user is calling restriction; and determining, when the value of the outgoing call prohibition flag and the value of the incoming call prohibition flag are both the third preset value, that the shutdown type corresponding to the target user is calling restriction.

[0025] In an optional embodiment, the acquiring the user data of the target user includes: acquiring the user data of the target user from a local storage unit or a home subscriber server HSS.

[0026] In a second aspect, an embodiment of the present invention further provides a device for interrupting a user session, comprising:

[0027] A query module, configured to, upon receiving a shutdown instruction, determine a target session state of a target user corresponding to the shutdown instruction based on the session states dynamically stored in the session index table;

[0028] a determination module, configured to determine, when the target session state is in progress, the role of the target user and the downtime type corresponding to the target user;

[0029] An interruption module is configured to interrupt the current session of the target user when the role matches the outage type.

[0030] In an optional embodiment, the apparatus further includes a creation module configured to create the session index table, wherein the session index table includes a session identifier, and when the session identifier is the first identifier, the session state indicated by the session identifier is an ongoing session;

[0031] The query module is further configured to query the session index table to determine a target session identifier corresponding to the target user; and determine that the target session state of the target user is in progress when the target session identifier is the first identifier.

[0032] In an optional embodiment, the apparatus further includes an updating module configured to set the target session identifier in the session index table to the first identifier when detecting that the current session is established.

[0033] In an optional embodiment, when the session identifier is the second identifier, the session state indicated by the session identifier is session end;

[0034] The updating module is further configured to: when detecting that the current session is released, set the target session identifier in the session index table to the second identifier.

[0035] In an optional embodiment, the session index table further includes a user identifier;

[0036] The query module is further configured to: match the participant identifier carried in the shutdown instruction with the user identifier in the session index table to determine a target user identifier that matches the participant identifier; and determine a target session identifier corresponding to the target user based on the target user identifier.

[0037] In an optional embodiment, the target session identifier includes a first target state identifier, a second target state identifier, and a third target state identifier;

[0038] The updating module is further configured to: when detecting that the current session is established, set the values ​​of the first target state identifier and the second target state identifier to first preset values, and set the value of the third target state identifier to a second preset value; and when detecting that the current session is released, update the value of the third target state identifier to the first preset value;

[0039] The query module is further configured to determine that the target session state of the target user is in session when the values ​​of the first target state identifier and the second target state identifier are both the first preset value and the value of the third target state identifier is the second preset value.

[0040] In an optional embodiment, the roles include a calling party and a called party, and the outage type includes calling restriction and calling and called restriction;

[0041] The interruption module is further configured to: interrupt the current session of the target user when the role is the calling party and the outage type is calling restriction or calling or called restriction; or interrupt the current session of the target user when the role is the called party and the outage type is calling or called restriction.

[0042] In an optional embodiment, the determination module is further used to: obtain a session message of the current session, and determine the role of the target user based on the session message; obtain user data of the target user, and determine the outage type corresponding to the target user based on the user data.

[0043] In an optional embodiment, the determination module is also used to: parse the conversation message to determine the calling party ID and the called party ID carried by the conversation message; respectively match the calling party ID and the called party ID with the participant ID carried by the shutdown instruction; when the calling party ID is consistent with the participant ID, determine the role of the target user as the calling party; or, when the called party ID is consistent with the participant ID, determine the role of the target user as the called party.

[0044] In an optional embodiment, the determination module is further configured to: parse the user data to determine shutdown parameters; and determine the shutdown type corresponding to the target user based on the shutdown parameters.

[0045] In an optional embodiment, the shutdown parameters include an outgoing call prohibition flag and an incoming call prohibition flag;

[0046] The determination module is further configured to: determine a value of the outgoing call prohibition flag and a value of the incoming call prohibition flag; determine that the outage type corresponding to the target user is a calling restriction when the value of the outgoing call prohibition flag is a third preset value and the value of the incoming call prohibition flag is a fourth preset value; and determine that the outage type corresponding to the target user is a calling restriction when the value of the outgoing call prohibition flag and the value of the incoming call prohibition flag are both the third preset value.

[0047] In an optional embodiment, the acquisition module is further configured to: acquire user data of the target user from a local storage unit or a home subscriber server HSS.

[0048] In a third aspect, an embodiment of the present invention further provides an electronic device comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method for interrupting a user session as described in the first aspect.

[0049] In a fourth aspect, an embodiment of the present invention further provides a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method for interrupting a user session as described in the first aspect is implemented.

[0050] One embodiment of the above invention has the following advantages or beneficial effects:

[0051] The method for interrupting a user session in an embodiment of the present invention dynamically stores the session status through a session index table, eliminates the need for full monitoring of the session process, saves memory, and simplifies the processing mechanism; upon receiving a shutdown instruction, determines the target session status of the target user corresponding to the shutdown instruction based on the session status dynamically stored in the session index table; when the target session status is an ongoing session, determines the role and shutdown type of the target user; when the role of the target user matches the shutdown type, interrupts the current session of the target user, thereby achieving accurate session interruption in combination with the session status, user role, and corresponding shutdown type upon receiving the shutdown instruction, solving the problem in the related art that the shutdown instruction issued by the camp cannot immediately interrupt the user in the call, thereby avoiding losses to the operator; meets the need to immediately interrupt the call in anti-fraud scenarios, thereby avoiding losses to the user, meets the need to immediately interrupt the call in emergency scenarios, and ensures smooth emergency communications.

[0052] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] The accompanying drawings are provided for a better understanding of the present invention and are not intended to limit the present invention.

[0054] Figure 1 A schematic flow chart showing a method for interrupting a user session according to an embodiment of the present invention is shown;

[0055] Figure 2 A schematic flow chart showing a method for interrupting a user session according to another embodiment of the present invention is shown;

[0056] Figure 3 A schematic flow chart showing a method for interrupting a user session according to another embodiment of the present invention is shown;

[0057] Figure 4 A schematic structural diagram of an apparatus for interrupting a user session according to an embodiment of the present invention is shown;

[0058] Figure 5 The structure diagram of the electronic device according to the embodiment of the present invention is schematically shown. DETAILED DESCRIPTION

[0059] The following description of exemplary embodiments of the present invention is made in conjunction with the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding. These details should be considered as merely exemplary. Therefore, it should be appreciated by those skilled in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0060] To facilitate understanding of the method of the embodiment of the present invention, technical terms related to the embodiment of the present invention are explained below.

[0061] MMTEL (Multi Media Telephony) is an IMS-based multimedia telephony service standard jointly developed by the two major standardization organizations ETSI / TISPAN and 3GPP. It is a global standard specification that supports telecom operators to evolve traditional circuit-switched services into IP-based real-time multimedia telephony services, including voice and video calls, messaging services, and video image sharing, while supporting both fixed and mobile broadband access.

[0062] AS (Application Server) refers to application server.

[0063] The Serving Call Session Control Function (S-CSCF) is the core of the IMS network. Located in the home network, it performs session control and registration requests for user equipment (UE). However, when the UE is in a session, the S-CSCF handles the session state in the network.

[0064] The Home Subscriber Server (HSS) stores all subscription-related information and supports call and session processing by various network entities. It contains user profiles, performs user authentication and authorization, and provides information about the user's physical location. MMTELAS downloads user data via the SH interface to the HSS.

[0065] Figure 1 The flowchart of the method for interrupting a user session according to an embodiment of the present invention is schematically shown. Figure 1 As shown, the method includes:

[0066] Step 101: When a shutdown instruction is received, a target session state of a target user corresponding to the shutdown instruction is determined according to the session states dynamically stored in a session index table.

[0067] Among them, the shutdown instruction may be issued by the accounting system. The accounting system issues a shutdown instruction when it detects that a certain user needs to be shut down. For example, the accounting system issues a shutdown instruction when it detects that a postpaid user has shut down due to arrears. Or, in an anti-fraud scenario, when it detects that a user may have encountered fraud and needs to immediately disconnect the call, the accounting system needs to issue a shutdown instruction. Or, in an emergency communication scenario, the relevant department needs to urgently contact the user who is on the call, and the accounting system needs to issue a shutdown instruction to immediately disconnect the current call so that the emergency information can be quickly delivered to the user. The shutdown instruction may include a participant identifier, which is used to indicate the user's identity and can be a unique identifier of the user. As an example, the participant identifier can be a mobile phone number or an IMSI (International Mobile Subscriber Identity).

[0068] A session index table can be pre-created to dynamically store user session states: active and ended. When a session is established (i.e., communication is established), the session state can be stored as active. When the session is released (i.e., communication ends), the session state can be updated to ended. For example, when a session is established, a record can be created in the session index table to record the active session state. When the session is released, the record can be modified to update the session state to ended.

[0069] In an optional embodiment, the session index table includes a user ID field, which indicates the user's identity and records the user's unique identifier. For example, the user ID can be a mobile phone number or an IMSI. In this step, the participant ID in the shutdown instruction is matched with the user ID in the session index table to determine a target user ID that matches the participant ID. The session state corresponding to the target user ID is then used as the target session state for the target user.

[0070] Step 102: When the target session state is in progress, determine the role of the target user and the shutdown type corresponding to the target user.

[0071] When the session state is in progress, the participants in the session include the caller and the called party of the session. Therefore, the roles in this embodiment include the caller and the called party.

[0072] Telecom operators' outage management mechanisms typically include single outage and double outage. Single outage refers to calling restriction and called party release. Double outage refers to both calling restriction and called party restriction. Therefore, the outage types described in this embodiment include calling outage and calling / called party outage. Calling outage corresponds to single outage, while calling / called party outage corresponds to double outage.

[0073] Step 103: When the role matches the outage type, interrupt the current session of the target user.

[0074] The case where the role matches the shutdown type includes:

[0075] (1) The role is the calling party, and the outage type is calling outage;

[0076] (2) The role is the calling party, and the outage type is the calling party outage;

[0077] (3) The role is the called party, and the outage type is the main called party outage.

[0078] Therefore, if the role is the calling party and the outage type is calling restriction or calling / receiving restriction, the target user's current session is terminated. Alternatively, if the role is the called party and the outage type is calling / receiving restriction, the target user's current session is terminated. If the role is the called party and the outage type is calling / receiving outage, the target user's current session is not processed.

[0079] The method for interrupting a user session in an embodiment of the present invention dynamically stores the session status through a session index table, eliminates the need for full monitoring of the session process, saves memory, and simplifies the processing mechanism; upon receiving a shutdown instruction, determines the target session status of the target user corresponding to the shutdown instruction based on the session status dynamically stored in the session index table; when the target session status is an ongoing session, determines the role and shutdown type of the target user; when the role of the target user matches the shutdown type, interrupts the current session of the target user, thereby achieving accurate session interruption in combination with the session status, user role, and corresponding shutdown type upon receiving the shutdown instruction, solving the problem in the related art that the shutdown instruction issued by the camp cannot immediately interrupt the user in the call, thereby avoiding losses to the operator; meets the need to immediately interrupt the call in anti-fraud scenarios, thereby avoiding losses to the user, meets the need to immediately interrupt the call in emergency scenarios, and ensures smooth emergency communications.

[0080] The method for interrupting a user session according to an embodiment of the present invention can be applied to a multimedia telephony application server (MMTELAS) and executed by an MMTEL AS. Specifically, the accounting system issues a shutdown command to the MMTEL AS. Upon receiving the shutdown command, the MMTEL AS determines the target session state of the target user corresponding to the shutdown command based on the session states dynamically stored in the session index table. If the MMTEL AS determines that the target session state is active, it determines the target user's role and the corresponding shutdown type. If the target user's role matches the shutdown type, the MMTEL AS terminates the target user's current session.

[0081] The MMTEL AS interrupting the target user's current session includes: the MMTEL AS issuing a shutdown command to the Serving Call Session Control Function (S-CSCF) network element to terminate the target user's current session. If the current session is established based on the SIP protocol, the shutdown command may be a SIP-based BYE message. In an optional embodiment, if the current session is successfully terminated, the S-CSCF network element returns a BYE 200 message to the MMTEL AS to indicate that the current session was successfully terminated.

[0082] In an optional embodiment, the above-mentioned session index table includes a session identifier, which is used to record the session status. When the session identifier is the first identifier, the session status indicated by the session identifier is an ongoing session. The first identifier can be a preset value, character, or string, etc., and the present invention is not limited thereto. The session index table also includes a user identifier, which corresponds one-to-one with the session identifier. The user identifier can be a mobile phone number or an IMSI. As an example, the session index table is shown in Table 1 below:

[0083] Table 1:

[0084] User ID Session ID 153*******1 First logo 189*******2 First logo 189*******8 First logo

[0085] In this embodiment, when it is detected that a session is established, the session identifiers corresponding to the calling number and the called number in the established session may be set as the first identifier.

[0086] In the case where the session index table includes a session identifier, step 101 may include:

[0087] When a shutdown instruction is received, querying the session index table to determine a target session identifier corresponding to the target user;

[0088] When the target session identifier is the first identifier, it is determined that the target session state of the target user is in progress.

[0089] The process of querying the session index table and determining the target session identifier corresponding to the target user may include: matching the participant identifier in the shutdown instruction with the user identifier in the session index table, determining the target user identifier corresponding to the participant identifier, and determining the target session identifier corresponding to the target user based on the target user identifier, that is, determining the session identifier corresponding to the target user identifier in the session index table as the target session identifier corresponding to the target user. Both the participant identifier and the user identifier are used to indicate the user's identity and may be a mobile phone number or an IMSI, without limitation herein.

[0090] In the embodiment of the present invention, when it is detected that the current session of the target user is established, the target session identifier in the session index table may be set as the first identifier.

[0091] In an optional embodiment, the session identifier in the session index table may also be set to a second identifier. When the session identifier is the second identifier, the session state indicated by the session identifier is session ended. Upon detecting that a session has been released, the session identifier corresponding to the session may be set to the second identifier. Therefore, in an embodiment of the present invention, upon detecting that the current session of the target user has been released, the target session identifier in the session index table is set to the second identifier.

[0092] In an optional embodiment, as shown in Table 2 below, the session identifier in the session index table includes a first state identifier, a second state identifier, and a third state identifier. When it is detected that a session is established, the values ​​of the first state identifier and the second state identifier can be set to the first preset value, and the value of the third state identifier can be set to the second preset value to indicate that the session state is in progress. When it is detected that a session is released, the value of the third state identifier can be updated to the first preset value, and the values ​​of the first state identifier and the second state identifier remain unchanged to indicate that the session state is ended. The first preset value and the second preset value can be any numerical values, and the first preset value is not equal to the second preset value. As an example, the first preset value is 1 and the second preset value is 0.

[0093] In an optional embodiment, a session can be established based on the SIP (Session Initialization Protocol) protocol. The SIP protocol is a client / server protocol, and therefore SIP messages are divided into two types: request messages and response messages. A request message is a message sent by a client to a server to activate a specific operation. A response message is the server's response to a request message, indicating the success or failure status of the call. Common SIP request messages include INVITE and BYE messages. The INVITE message indicates that the calling user initiates a session request, inviting other users to join a session. The BYE message terminates an established call. Common SIP response messages include 200 (OK), indicating a successful response. Therefore, when establishing a session based on the SIP protocol, an embodiment of the present invention can set the first status flag to a first preset value upon detecting an INVITE message, set the second status flag to a second preset value upon detecting a 200 (OK), and set the third status flag to the second preset value to indicate that the session status is in progress. When a BYE message is detected, the third state flag is updated to a first preset value, while the values ​​of the first state flag and the second state flag remain unchanged, to indicate that the session state is session ended.

[0094] The embodiment of the present invention creates a session index table for each user, dynamically stores three key node messages: NVITE, INVITE200, and BYE, to dynamically store the user's session status. Through the session index table, it is determined whether the user is in a call, without the need to monitor the entire session process, saving memory and simplifying the processing mechanism.

[0095] For example, as shown in Table 2 below, the string "INVITE" can be used to represent the first status identifier, "INVITE200" to represent the second status identifier, and "BYE" to represent the third status identifier. In Table 2, the session status of user 153*******1 is "session in progress," the session status of user 189*******2 is "session ended," and the session status of user 189*******8 is "session in progress."

[0096] Table 2:

[0097] User ID INVITE INVITE 200 BYE 153*******1 1 1 0 189*******2 1 1 1 189*******8 1 1 0

[0098] Based on the above, the target session identifier includes a first target state identifier, a second target state identifier and a third target state identifier.

[0099] When detecting that a current session of a target user is established, setting a target session identifier corresponding to the target user to the first identifier includes: when detecting that the current session of the target user is established, setting values ​​of the first target state identifier and the second target state identifier to first preset values, and setting the value of the third target state identifier to a second preset value;

[0100] When it is detected that the current session is released, setting the target session identifier to the second identifier includes: when it is detected that the current session is released, updating the value of the third target state identifier to the first preset value;

[0101] When the target session identifier is the first identifier, determining that the target session state of the target user is in progress includes: when the values ​​of the first target state identifier and the second target state identifier are both the first preset values ​​and the value of the third target state identifier is the second preset value, determining that the target session state of the target user is in progress.

[0102] Figure 2 Schematically shows a flow chart of a method for interrupting a user session according to another embodiment of the present invention. Figure 2 As shown, the method includes:

[0103] Step 201: upon receiving a shutdown instruction, determining a target session state of a target user corresponding to the shutdown instruction according to the session states dynamically stored in the session index table;

[0104] Step 202: When the target session state is in progress, obtain the session message of the current session and the user data of the target user;

[0105] Step 203: Determine the role of the target user based on the conversation message;

[0106] Step 204: Determine the outage type corresponding to the target user based on the user data;

[0107] Step 205: When the role matches the outage type, interrupt the current session of the target user.

[0108] The session message may include identification information of the caller and the called party establishing the current session, such as a caller ID and a called party ID. The caller ID and the called party ID may include, but are not limited to, a mobile phone number, an IMSI, etc. The session message is parsed to determine the caller ID and the called party ID carried in the session message. After obtaining the parsed caller ID and the called party ID, the caller ID and the called party ID can be matched with the participant ID in the shutdown instruction. If the caller ID and the participant ID match, the target user's role is determined to be the caller; or if the called party ID and the participant ID match, the target user's role is determined to be the called party. As an example, the session message may be a SIP message used to establish a session based on the SIP protocol. The Request-URI in the INVITE message of the SIP message carries the called party number, and the P-Asserted-Identity carries the calling party number. The called party number and the calling party number are matched with the participant ID in the shutdown instruction to determine the target user's role.

[0109] User data (also called static user data or transparent data) may include a shutdown parameter, which is used to indicate a shutdown type. The shutdown type of the target user can be determined based on the shutdown parameter.

[0110] In an optional embodiment, the shutdown parameter can be a preset value, character, or string, etc., and the present invention is not limited thereto. As an example, when the shutdown parameter is a first preset character, the shutdown type indicated by the shutdown parameter is a calling shutdown; when the shutdown parameter is a second preset character, the shutdown type indicated by the shutdown parameter is a calling shutdown.

[0111] In an optional embodiment, the shutdown parameters may include an outgoing barring flag (OutgoingBarring) and an incoming barring flag (IncomingBarring). When the value of the outgoing barring flag is a third preset value and the value of the incoming barring flag is a fourth preset value, the shutdown type is calling restriction. When the value of the outgoing barring flag and the value of the incoming barring flag are both the third preset value, the shutdown type is primary called restriction. The above process of determining the shutdown type corresponding to the target user based on the shutdown parameters may include: determining the value of the outgoing barring flag and the value of the incoming barring flag; when the value of the outgoing barring flag is the third preset value and the value of the incoming barring flag is the fourth preset value, determining the shutdown type corresponding to the target user is calling restriction; when the value of the outgoing barring flag and the value of the incoming barring flag are both the third preset value, determining the shutdown type corresponding to the target user is primary called restriction.

[0112] In an optional embodiment, the user data may further include a user identification (User-Identity).

[0113] In an optional embodiment, the user data is stored in a local storage unit or in a Home Subscriber Server (HSS). In step 202 , the user data may be obtained from the local storage unit or from the HSS.

[0114] As shown above, the method for interrupting a user session in an embodiment of the present invention can be applied to an MMTEL AS, and the user data can be stored in the MMTEL AS, so that the user data can be obtained from the local storage unit of the MMTEL AS. When the user data is stored in the HSS, the MMTEL AS can send a Profile-Update-Request (PUR) message to the HSS via the SH interface to request the user data. The HSS sends a Push-Notification-Request (PNR) message via the SH interface to notify the MMTEL AS of the user data (User-Data), which includes the outage parameters OutgoingBarring, IncomingBarring, and the user identifier User-Identity.

[0115] Figure 3 A schematic diagram of a method for interrupting a user session according to another embodiment of the present invention is shown schematically. Figure 3 As shown, the method includes:

[0116] Step 1: MMTEL AS receives the shutdown instruction issued by the accounting system through the accounting interface.

[0117] Step 2: The MMTEL AS sends a Profile-Update-Request (PUR) message to the HSS through the SH interface to obtain User-Data. The User-Data message body includes User-Identity, Outgoing Barring, and Incoming Barring.

[0118] Step 3: The HSS notifies the MMTEL AS to update the User-Data through the Push-Notification-Request (PNR) message on the SH interface.

[0119] Step 4: The MMTEL AS generates a decision mechanism based on the received User-Identity, OutgoingBarring, and IncomingBarring parameters, combined with the session status in the session index table, to determine whether the user's current session needs to be terminated immediately. If termination is required, a BYE message is sent through steps 7-8.

[0120] Step 5: The MMTEL AS returns a Push-Notifications-Answer (PNA) message to the HSS via the SH interface, which includes the notification update result.

[0121] Step 6: The HSS returns a Profile-Update-Answer (PUA) message to the MMTEL AS through the SH interface. The message contains the result of successful user data update.

[0122] Step 7: The MMTEL AS sends a BYE message to the S-CSCF to terminate the session.

[0123] Step 8: The S-CSCF returns a BYE 200 message to the MMTEL AS, and the session is disconnected.

[0124] In an embodiment of the present invention, the IMS core network MMTELAS establishes a session index table for each user and dynamically stores the session status, such as dynamically storing the three key node messages of INVITE, INVITE 200, and BYE; if a shutdown instruction is received from the accounting system, the User-Identity, OutgoingBarring, and IncomingBarring are obtained through the SH interface, and a comprehensive judgment is made on whether the user session needs to be interrupted immediately based on the four elements of the user session status, OutgoingBarring, and IncomingBarring; if the session needs to be interrupted, a BYE message is sent to the S-CSCF through the MMTEL AS to immediately interrupt the call of the suspended user.

[0125] Through the method of interrupting user sessions in the embodiment of the present invention, it is possible to interrupt the ongoing conversation of a postpaid user in the state of single suspension due to arrears or double suspension due to arrears, thereby realizing the same functions as the 2G mobile network, achieving service consistency, reducing user complaints and operator losses, and being able to meet the real-time suspension of calls in the user states of single suspension and double suspension, providing precise services for operators and reducing corporate losses; it can be extended to the third-party intervention interruption of calls in 4G, 5G, and VOBB user calls, such as: interrupting fraudulent calls to reduce user losses; it can also be used in emergency scenarios to interrupt user calls and ensure the smooth flow of emergency information.

[0126] Figure 4 The schematic diagram of the structure of the device 400 for interrupting a user session according to an embodiment of the present invention is shown schematically. Figure 4 As shown, the apparatus 400 includes:

[0127] The query module 401 is configured to, upon receiving a shutdown instruction, determine a target session state of a target user corresponding to the shutdown instruction based on the session states dynamically stored in the session index table;

[0128] A determination module 402 is configured to determine the role of the target user and the downtime type corresponding to the target user when the target session status is in progress;

[0129] The interruption module 403 is configured to interrupt the current session of the target user when the role matches the outage type.

[0130] The device for interrupting a user session in an embodiment of the present invention dynamically stores the session status through a session index table, eliminates the need for full monitoring of the session process, saves memory, and simplifies the processing mechanism; upon receiving a shutdown instruction, determines the target session status of the target user corresponding to the shutdown instruction based on the session status dynamically stored in the session index table, and when the target session status is an ongoing session, determines the role and shutdown type of the target user; when the role of the target user matches the shutdown type, interrupts the current session of the target user, thereby achieving accurate session interruption based on the session status, user role, and corresponding shutdown type upon receiving a shutdown instruction, solving the problem in the related art that a shutdown instruction issued by a business account cannot immediately interrupt a user in a call, thereby avoiding losses to operators; meets the need to immediately interrupt calls in anti-fraud scenarios, thereby avoiding losses to users, and meets the need to immediately interrupt calls in emergency scenarios, thereby ensuring smooth emergency communications.

[0131] In an optional embodiment, the apparatus further includes a creation module configured to create the session index table, wherein the session index table includes a session identifier, and when the session identifier is the first identifier, the session state indicated by the session identifier is an ongoing session;

[0132] The query module is further configured to query the session index table to determine a target session identifier corresponding to the target user; and determine that the target session state of the target user is in progress when the target session identifier is the first identifier.

[0133] In an optional embodiment, the apparatus further includes an updating module configured to set the target session identifier in the session index table to the first identifier when detecting that the current session is established.

[0134] In an optional embodiment, when the session identifier is the second identifier, the session state indicated by the session identifier is session end;

[0135] The updating module is further configured to: when detecting that the current session is released, set the target session identifier in the session index table to the second identifier.

[0136] In an optional embodiment, the session index table further includes a user identifier;

[0137] The query module is further configured to: match the participant identifier carried in the shutdown instruction with the user identifier in the session index table to determine a target user identifier that matches the participant identifier; and determine a target session identifier corresponding to the target user based on the target user identifier.

[0138] In an optional embodiment, the target session identifier includes a first target state identifier, a second target state identifier, and a third target state identifier;

[0139] The updating module is further configured to: when detecting that the current session is established, set the values ​​of the first target state identifier and the second target state identifier to first preset values, and set the value of the third target state identifier to a second preset value; and when detecting that the current session is released, update the value of the third target state identifier to the first preset value;

[0140] The query module is further configured to determine that the target session state of the target user is in session when the values ​​of the first target state identifier and the second target state identifier are both the first preset value and the value of the third target state identifier is the second preset value.

[0141] In an optional embodiment, the interruption module is further used to: when the role is the caller and the outage type is calling restriction or calling or called restriction, determine that the role matches the outage type and interrupt the current session of the target user; or, when the role is the called party and the outage type is calling or called restriction, determine that the role matches the outage type and interrupt the current session of the target user.

[0142] In an optional embodiment, the determination module is further used to: obtain a session message of the current session, and determine the role of the target user based on the session message; obtain user data of the target user, and determine the outage type corresponding to the target user based on the user data.

[0143] In an optional embodiment, the determination module is also used to: parse the conversation message to determine the calling party ID and the called party ID carried by the conversation message; respectively match the calling party ID and the called party ID with the participant ID carried by the shutdown instruction; when the calling party ID is consistent with the participant ID, determine the role of the target user as the calling party; or, when the called party ID is consistent with the participant ID, determine the role of the target user as the called party.

[0144] In an optional embodiment, the determination module is further configured to: parse the user data to determine shutdown parameters; and determine the shutdown type corresponding to the target user based on the shutdown parameters.

[0145] In an optional embodiment, the shutdown parameters include an outgoing call prohibition flag and an incoming call prohibition flag;

[0146] The determination module is further configured to: determine a value of the outgoing call prohibition flag and a value of the incoming call prohibition flag; determine that the outage type corresponding to the target user is a calling restriction when the value of the outgoing call prohibition flag is a third preset value and the value of the incoming call prohibition flag is a fourth preset value; and determine that the outage type corresponding to the target user is a calling restriction when the value of the outgoing call prohibition flag and the value of the incoming call prohibition flag are both the third preset value.

[0147] In an optional embodiment, the acquisition module is further configured to: acquire user data of the target user from a local storage unit or a home subscriber server HSS.

[0148] The above device can execute the method provided by the embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not fully described in this embodiment, please refer to the method provided by the embodiment of the present invention.

[0149] The embodiment of the present invention further provides an electronic device, such as Figure 5As shown, it includes a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504.

[0150] Memory 503, used for storing computer programs;

[0151] The processor 501 is configured to implement the following steps when executing the program stored in the memory 503: upon receiving a shutdown instruction, determining the target session state of the target user corresponding to the shutdown instruction based on the session state dynamically stored in the session index table; when the target session state is in progress, determining the role of the target user and the shutdown type corresponding to the target user; and when the role matches the shutdown type, interrupting the current session of the target user.

[0152] The communication bus 504 mentioned in the terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 504 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.

[0153] The communication interface 502 is used for communication between the terminal and other devices.

[0154] The memory 503 may include a random access memory (RAM) or a non-volatile memory, such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor 501.

[0155] The above-mentioned processor 501 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

[0156] In another embodiment of the present invention, a computer-readable medium is provided. The computer-readable medium stores instructions that, when executed on a computer, enable the computer to execute any of the methods for interrupting a user session described in the above embodiments.

[0157] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is executed on a computer, the computer is enabled to execute the method for interrupting a user session described in any one of the above embodiments.

[0158] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0159] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.

[0160] Each embodiment in this specification is described in a related manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiment is generally similar to the method embodiment, so the description is relatively simple. For related parts, refer to the description of the method embodiment.

[0161] The above description is only a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention are included in the scope of protection of the present invention.

Claims

1. A method for interrupting a user session, characterized in that: include: When a shutdown instruction is received, determining a target session state of a target user corresponding to the shutdown instruction according to the session states dynamically stored in the session index table, wherein the session states include ongoing session and session ended; When the target session state is in progress, determining the role of the target user and the outage type corresponding to the target user, the outage type including calling restriction and calling / called restriction; When the role matches the outage type, interrupting the current session of the target user; Wherein, when the role matches the outage type, interrupting the current session of the target user includes: In a case where the role is a calling party and the outage type is calling restriction or calling and called restriction, determining that the role matches the outage type, and interrupting the current session of the target user; or In a case where the role is the called party and the outage type is the calling party restriction, it is determined that the role matches the outage type, and the current session of the target user is interrupted.

2. The method according to claim 1, characterized in that The session index table includes a session identifier. When the session identifier is a first identifier, the session state indicated by the session identifier is an ongoing session. The determining, based on the session states dynamically stored in the session index table, a target session state of a target user corresponding to the shutdown instruction, includes: Query the session index table to determine the target session identifier corresponding to the target user; When the target session identifier is the first identifier, it is determined that the target session state of the target user is in progress.

3. The method according to claim 2, characterized in that The method further comprises: When it is detected that the current session is established, the target session identifier in the session index table is set as the first identifier.

4. The method according to claim 3, characterized in that In a case where the session identifier is the second identifier, the session state indicated by the session identifier is session end; The method further includes: when detecting that the current session is released, setting the target session identifier in the session index table to the second identifier.

5. The method according to claim 2, characterized in that The session index table also includes a user identifier; The querying the session index table to determine the target session identifier corresponding to the target user includes: Matching the participant identifier carried in the shutdown instruction with the user identifier in the session index table to determine a target user identifier that matches the participant identifier; A target session identifier corresponding to the target user is determined according to the target user identifier.

6. The method according to claim 4, characterized in that The target session identifier includes a first target state identifier, a second target state identifier and a third target state identifier; The step of setting the target session identifier to the first identifier upon detecting that the current session is established includes: setting the values ​​of the first target state identifier and the second target state identifier to first preset values, and setting the value of the third target state identifier to a second preset value upon detecting that the current session is established; When the current session is detected to be released, setting the target session identifier to the second identifier includes: when the current session is detected to be released, updating the value of the third target state identifier to the first preset value; The determining, when the target session identifier is the first identifier, that the target session state of the target user is in progress includes: determining, when the values ​​of the first target state identifier and the second target state identifier are both the first preset values ​​and the value of the third target state identifier is the second preset value, that the target session state of the target user is in progress.

7. The method according to claim 1, characterized in that The determining the role of the target user and the outage type corresponding to the target user includes: Acquire a session message of the current session, and determine the role of the target user based on the session message; Obtain user data of the target user, and determine the outage type corresponding to the target user based on the user data.

8. The method according to claim 7, characterized in that Determining the role of the target user according to the conversation message includes: Parsing the conversation message to determine the calling party ID and the called party ID carried in the conversation message; matching the calling party ID and the called party ID with the participant ID carried in the shutdown instruction respectively; When the calling identifier is consistent with the participant identifier, the role of the target user is determined to be the calling party; or when the called identifier is consistent with the participant identifier, the role of the target user is determined to be the called party.

9. The method according to claim 8, characterized in that The determining, based on the user data, the outage type corresponding to the target user includes: Parsing the user data to determine shutdown parameters; Determine the outage type corresponding to the target user according to the outage parameter.

10. The method according to claim 9, characterized in that The shutdown parameters include an outgoing call prohibition mark and an incoming call prohibition mark; The determining, according to the outage parameter, the outage type corresponding to the target user includes: Determining a value of the outgoing call barring flag and a value of the incoming call barring flag; When the value of the outgoing call prohibition flag is a third preset value and the value of the incoming call prohibition flag is a fourth preset value, determining that the outage type corresponding to the target user is calling restriction; When the value of the outgoing call prohibition flag and the value of the incoming call prohibition flag are both the third preset value, it is determined that the outage type corresponding to the target user is calling and called restriction.

11. The method according to claim 7, characterized in that The acquiring the user data of the target user includes: The user data of the target user is obtained from a local storage unit or a home subscriber server HSS.

12. A device for interrupting a user session, characterized in that: include: A query module is used to determine, upon receiving a shutdown instruction, a target session state of a target user corresponding to the shutdown instruction based on the session states dynamically stored in the session index table, wherein the session states include ongoing and ended; a determination module, configured to determine, when the target session state is in progress, the role of the target user and the outage type corresponding to the target user, the outage type including calling restriction and calling / called restriction; an interruption module, configured to interrupt the current session of the target user if the role matches the outage type; The interruption module is further used to: when the role is the calling party and the outage type is calling restriction or calling or called restriction, determine that the role matches the outage type and interrupt the current session of the target user; or, when the role is the called party and the outage type is calling or called restriction, determine that the role matches the outage type and interrupt the current session of the target user.

13. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 11.

14. A computer-readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.

Citation Information

Patent Citations

  • Shutdown method and application server

    CN112187707A