CN115278937A - Method, device, electronic equipment and medium for interrupting user session - Google Patents

Method, device, electronic equipment and medium for interrupting user session Download PDF

Info

Publication number
CN115278937A
CN115278937A CN202210800707.5A CN202210800707A CN115278937A CN 115278937 A CN115278937 A CN 115278937A CN 202210800707 A CN202210800707 A CN 202210800707A CN 115278937 A CN115278937 A CN 115278937A
Authority
CN
China
Prior art keywords
session
target
identifier
user
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210800707.5A
Other languages
Chinese (zh)
Inventor
曾彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202210800707.5A priority Critical patent/CN115278937A/en
Publication of CN115278937A publication Critical patent/CN115278937A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/30Connection release
    • H04W76/34Selective release of ongoing connections
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/20Manipulation of established connections

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a method, a device, electronic equipment and a medium for interrupting a user session, and relates to the technical field of communication. The method comprises the following steps: under the condition of receiving a shutdown instruction, determining a target session state of a target user corresponding to the shutdown instruction according to a session state dynamically stored in a session index table; determining the role of the target user and the shutdown type corresponding to the target user under the condition that the target session state is a session; interrupting a current session of the target user if the role matches the outage type. The method dynamically stores the session state through the session index table without monitoring the session process in full name, thereby saving the memory and simplifying the processing mechanism; by combining the session state, the user role and the corresponding shutdown type, the accurate session interruption is realized, the requirement that the call needs to be interrupted immediately in anti-fraud, emergency and other scenes can be met, and the loss of operators and users is avoided.

Description

Method, device, electronic equipment and medium for interrupting user session
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, an electronic device, and a medium for interrupting a user session.
Background
Currently, in the operating environment of telecommunications networks, users are divided into pre-paid users and post-paid users. The post-paid user refers to a user who uses a previous payment and a post-paid user needs to sign up and register user data. For the postpaid user, there are some situations that the call needs to be interrupted immediately, for example, when the postpaid user has a long-time call, makes an international long-distance call, makes a call for collecting international high-settlement fees, and meets a certain condition, the call needs to be interrupted immediately, or the call needs to be interrupted immediately in a fraud prevention scene or an emergency communication scene. Because the Voice architecture of telecom operators 4G, 5G, VOBB (Voice over BroadBand ) provides Voice service based on IMS (IP Multimedia System), when a call needs to be interrupted immediately, a shutdown instruction issued by BOSS (Business Operating Support System, operation and operation Support System, or Operating System for short) to the IMS core network cannot interrupt the user in the call immediately, and the call of the user needs to be limited when the user initiates the call next time, thereby bringing loss to the operators and the user.
Disclosure of Invention
To solve the technical problems or at least partially solve the technical problems, embodiments of the present invention provide a method, an apparatus, an electronic device, and a medium for interrupting a user session.
In a first aspect, an embodiment of the present invention provides a method for interrupting a user session, including:
under the condition of receiving a shutdown instruction, determining a target session state of a target user corresponding to the shutdown instruction according to a session state dynamically stored in a session index table;
determining the role of the target user and the shutdown type corresponding to the target user under the condition that the target session state is a session;
interrupting a current session of the target user if the role matches the outage type.
In an optional embodiment, the session index table includes a session identifier, and in a case that the session identifier is the first identifier, a session state indicated by the session identifier is a session;
the 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 includes: querying the session index table, and determining a target session identifier corresponding to the target user; and under the condition that the target session identifier is the first identifier, determining that the target session state of the target user is a session.
In an optional embodiment, the method further comprises: and when the current session establishment is detected, setting the target session identifier in the session index table as the first identifier.
In an optional embodiment, in a case that the session identifier is the second identifier, a session state indicated by the session identifier is a session end;
the method further comprises the following steps: and when the current session release is detected, setting the target session identifier in the session index table as the second identifier.
In an alternative embodiment, the session index table further includes a user identification;
the querying the session index table to determine the target session identifier corresponding to the target user includes: matching the participant identification carried by the halt instruction with the user identification in the session index table, and determining a target user identification matched with the participant identification; and determining a target session identifier corresponding to the target user according to the target user identifier.
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;
when the current session establishment is detected, setting the target session identifier as the first identifier, including: when the current session is detected to be established, setting the values of the first target state identifier and the second target state identifier as a first preset value, and setting the value of the third target state identifier as a second preset value;
when the current session release is detected, setting the target session identifier as the second identifier, including: when the current session release is detected, updating the value of the third target state identifier to the first preset value;
determining that the target session state of the target user is a session under the condition that the target session identifier is the first identifier, wherein the determining comprises the following steps: and under the condition that 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, determining that the target session state of the target user is a session.
In an optional embodiment, the interrupting the current session of the target user in the case that the role matches the outage type includes: under the condition that the role is a calling party and the shutdown type is calling limitation or calling and called limitation, determining that the role is matched with the shutdown type and interrupting the current session of the target user; or, under the condition that the role is the called party and the halt type is the calling and called limitation, determining that the role is matched with the halt type, and interrupting the current session of the target user.
In an optional embodiment, the determining the role of the target user and the shutdown type corresponding to the target user includes: acquiring the session message of the current session, and determining the role of the target user according to the session message; and acquiring user data of the target user, and determining the shutdown type corresponding to the target user according to the user data.
In an optional embodiment, determining the role of the target user according to the session message includes: analyzing the session message, and determining a calling identification and a called identification carried by the session message; matching the calling identification and the called identification with participant identifications carried by the shutdown instruction respectively; under the condition that the calling identification is consistent with the participant identification, determining the role of the target user as a calling party; or, determining the role of the target user as the called party under the condition that the called identification is consistent with the participant identification.
In an optional embodiment, the determining, according to the user data, a shutdown type corresponding to the target user includes: analyzing the user data and determining shutdown parameters; and determining the shutdown type corresponding to the target user according to the shutdown parameters.
In an alternative embodiment, the shutdown parameter includes an outgoing call barring identity and an incoming call barring identity;
determining the shutdown type corresponding to the target user according to the shutdown parameter includes: determining a value of the outgoing call barring identity and a value of the incoming call barring identity; determining that the shutdown type corresponding to the target user is calling limitation under the condition that the value of the calling prohibition identifier is a third preset value and the value of the calling prohibition identifier is a fourth preset value; and under the condition that the value of the calling prohibition identifier and the value of the calling prohibition identifier are both the third preset values, determining that the shutdown type corresponding to the target user is the calling and called limitation.
In an optional embodiment, the acquiring user data of the target user includes: and acquiring the user data of the target user from a local storage unit or a Home Subscriber Server (HSS).
In a second aspect, an embodiment of the present invention further provides an apparatus for interrupting a user session, where the apparatus includes:
the query module is used for determining a target session state of a target user corresponding to a shutdown instruction according to a session state dynamically stored in a session index table under the condition that the shutdown instruction is received;
the determining module is used for determining the role of the target user and the shutdown type corresponding to the target user under the condition that the target session state is a session;
and the interruption module is used for interrupting the current session of the target user under the condition that the role is matched with the shutdown type.
In an optional embodiment, the apparatus further includes a creating module, configured to create the session index table, where the session index table includes a session identifier, and in a case that the session identifier is a first identifier, a session state indicated by the session identifier is a session;
the query module is further to: querying the session index table, and determining a target session identifier corresponding to the target user; and under the condition that the target session identifier is the first identifier, determining that the target session state of the target user is a session.
In an optional embodiment, the apparatus further includes an updating module, configured to set the target session identifier in the session index table as the first identifier when the current session establishment is detected.
In an optional embodiment, in a case that the session identifier is the second identifier, a session state indicated by the session identifier is a session end;
the update module is further to: and when the current session release is detected, setting the target session identifier in the session index table as the second identifier.
In an alternative embodiment, the session index table further includes a user identification;
the query module is further configured to: matching the participant identification carried by the halt instruction with the user identification in the session index table, and determining a target user identification matched with the participant identification; and determining a target session identifier corresponding to the target user according to the target user identifier.
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;
the update module is further to: when the current session is detected to be established, setting the values of the first target state identifier and the second target state identifier as a first preset value, and setting the value of the third target state identifier as a second preset value; when the current session release is detected, updating the value of the third target state identifier to the first preset value;
the query module is further configured to: and under the condition that 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, determining that the target session state of the target user is a session.
In an alternative embodiment, the roles include a calling party and a called party, and the outage type includes a calling limitation and a called limitation;
the interrupt module is further to: interrupting the current session of the target user under the condition that the role is a calling party and the shutdown type is calling limitation or calling and called limitation; or, under the condition that the role is the called party and the halt type is the calling and called limitation, interrupting the current session of the target user.
In an optional embodiment, the determining module is further configured to: acquiring the session message of the current session, and determining the role of the target user according to the session message; and acquiring user data of the target user, and determining the shutdown type corresponding to the target user according to the user data.
In an optional embodiment, the determining module is further configured to: analyzing the session message, and determining a calling identification and a called identification carried by the session message; matching the calling identification and the called identification with participant identifications carried by the shutdown instruction respectively; under the condition that the calling identification is consistent with the participant identification, determining the role of the target user as a calling party; or, determining the role of the target user as the called party under the condition that the called identification is consistent with the participant identification.
In an optional embodiment, the determining module is further configured to: analyzing the user data and determining shutdown parameters; and determining the shutdown type corresponding to the target user according to the shutdown parameters.
In an alternative embodiment, the shutdown parameter includes an outgoing call barring identity and an incoming call barring identity;
the determination module is further to: determining a value of the outgoing call barring identity and a value of the incoming call barring identity; under the condition that the value of the calling prohibition identifier is a third preset value and the value of the calling prohibition identifier is a fourth preset value, determining that the shutdown type corresponding to the target user is calling limitation; and under the condition that the value of the calling prohibition identifier and the value of the calling prohibition identifier are both the third preset values, determining that the shutdown type corresponding to the target user is the calling and called limitation.
In an optional embodiment, the obtaining module is further configured to: and acquiring the user data of the target user from a local storage unit or a Home Subscriber Server (HSS).
In a third aspect, an embodiment of the present invention further provides an electronic device, including: one or more processors; storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the method of interrupting a user session as described in the first aspect.
In a fourth aspect, the present invention further provides a computer-readable medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for interrupting a user session according to the first aspect.
One embodiment of the above invention has the following advantages or benefits:
according to the method for interrupting the user session, the session state is dynamically stored through the session index table, the session process does not need to be monitored in a full-scale mode, the memory is saved, and the processing mechanism is simplified; the method comprises the steps that under the condition that a halt instruction is received, the target session state of a target user corresponding to the halt instruction is determined according to the session state dynamically stored in a session index table, under the condition that the target session state is in a session, the role and the halt type of the target user are determined, and under the condition that the role of the target user is matched with the halt type, the current session of the target user is interrupted, so that the accurate session interruption is realized by combining the session state, the user role and the corresponding halt type under the condition that the halt instruction is received, the problem that the user in the session cannot be immediately interrupted when the halt instruction is issued by accounting in the related technology is solved, and the operator is prevented from being lost; the requirement that the call needs to be interrupted immediately under the anti-fraud scene is met, the loss of a user is avoided, the requirement that the call needs to be interrupted immediately under the emergency scene and the like is met, and the smoothness of emergency communication is guaranteed.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a flow diagram illustrating a method for interrupting a user session according to an embodiment of the present invention;
FIG. 2 is a flow diagram illustrating a method of interrupting a user session according to another embodiment of the invention;
FIG. 3 is a flow diagram illustrating a method of interrupting a user session according to yet another embodiment of the present invention;
FIG. 4 is a schematic block diagram of an apparatus for interrupting a user session according to an embodiment of the present invention;
fig. 5 schematically shows a structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
For convenience of understanding the method of the embodiment of the present invention, technical terms related to the embodiment of the present invention are described below.
MMTEL (Multi Media telecommunications) is an IMS-based multimedia Telephony service standard developed jointly by the standards bodies of ETSI/TISPAN and 3GPP, is a global standard specification that supports telecommunications operators to evolve traditional circuit-switched services into IP-based real-time multimedia Telephony services, including voice and video calls, messaging services, video image sharing, etc., while supporting fixed and mobile broadband access.
The AS (Application Server) refers to an Application Server.
An S-CSCF network element (Serving Call Session Control Function) is the core of the IMS network, is located in a home network, performs Session Control and registration requests for a User Equipment (UE), and processes a Session state in the network when the UE is in a Session.
The HSS (Home Subscriber Server) stores all information related to the Subscriber subscription for supporting the processing of calls and sessions by each network entity. It contains a user profile, performs authentication and authorization of the user, and may provide information about the physical location of the user. MMTELAS downloads user data through the SH interface with the HSS.
Fig. 1 schematically shows a flow chart of a method of interrupting a user session according to an embodiment of the present invention. As shown in fig. 1, the method includes:
step 101: and under the condition of receiving a halt instruction, determining the target session state of a target user corresponding to the halt instruction according to the session state dynamically stored in the session index table.
The stop command may be issued by the tent system. And the tent system issues a halt instruction when detecting that a certain user needs to be halted. For example, the accounting system issues a halt instruction when detecting that the post-paid user arrears to halt. Alternatively, in a fraud-proof scenario, the tent system needs to issue a halt instruction if it is detected that the user may be subjected to fraud and needs to immediately interrupt the call. Or, in an emergency communication scenario, a related department needs to contact a user in a call in an emergency, and needs to send a shutdown instruction to the tent system to immediately interrupt the current call, so as to quickly send emergency information to the user. The shutdown instruction may include a participant identifier, which is used to indicate the identity of the user and may be a unique identifier of the user. As an example, the participant identifier may be a Mobile phone number or an IMSI (International Mobile Subscriber Identity).
The session index table may be pre-created to dynamically store the session state of the user: ongoing and session ended. At session establishment (i.e., communication establishment), the session state may be stored as an ongoing session, and when the session is released (i.e., communication is over), the session state may be updated to session over. For example, at session setup, a record may be created in the session index table to record the session state being in the session, and when the session is released, the record may be modified to update the session state to the end of the session.
In an alternative embodiment, a user identification field is set in the session index table, and the field is used for indicating the identity of the user, and the unique identification of the user is recorded through the field. As an example, the subscriber identity may be a mobile phone number or an IMSI. In this step, the participant identifier in the shutdown instruction is matched with the user identifier in the session index table, and a target user identifier consistent with the participant identifier is determined, where the session state corresponding to the target user identifier is the target session state of the target user.
Step 102: and under the condition that the target session state is the ongoing session, determining the role of the target user and the shutdown type corresponding to the target user.
In the case that the session state is in the session, the participants participating in the session include a calling party of the session and a called party of the session. Thus, the roles in this embodiment include a calling party and a called party.
Both single and double shutdown are typically included in the outage management mechanism of a telecommunications carrier. Wherein, the single halt means calling limitation and called release. Double shutdown refers to caller restriction, callee restriction. Thus, the shutdown types in this embodiment include a calling shutdown and a calling and called shutdown. Wherein the calling shutdown corresponds to a single shutdown and the calling shutdown corresponds to a double shutdown.
Step 103: interrupting a current session of the target user if the role matches the outage type.
Wherein the condition that the role is matched with the shutdown type comprises the following conditions:
(1) The role is a calling party, and the shutdown type is calling shutdown;
(2) The role is a calling party, and the shutdown type is a calling and called shutdown;
(3) The role is called party, and the shutdown type is called party shutdown.
Therefore, under the condition that the role is a calling party and the halt type is calling limitation or calling and called limitation, the current session of the target user is interrupted; or, under the condition that the role is the called party and the halt type is the calling and called limitation, interrupting the current session of the target user. And under the condition that the role is the called party and the halt type is the calling halt, the current session of the target user is not processed.
According to the method for interrupting the user session, the session state is dynamically stored through the session index table, the session process does not need to be monitored in a full-scale mode, the memory is saved, and the processing mechanism is simplified; the method comprises the steps that under the condition that a halt instruction is received, the target session state of a target user corresponding to the halt instruction is determined according to the session state dynamically stored in a session index table, under the condition that the target session state is in a session, the role and the halt type of the target user are determined, and under the condition that the role of the target user is matched with the halt type, the current session of the target user is interrupted, so that the accurate session interruption is realized by combining the session state, the user role and the corresponding halt type under the condition that the halt instruction is received, the problem that the user in the session cannot be immediately interrupted when the halt instruction is issued by accounting in the related technology is solved, and the operator is prevented from being lost; the requirement that the call needs to be interrupted immediately under the anti-fraud scene is met, the loss of a user is avoided, the requirement that the call needs to be interrupted immediately under the emergency scene and the like is met, and the smoothness of emergency communication is guaranteed.
The method for interrupting the user session of the embodiment of the invention can be applied to a multimedia telephone application server (MMTEL AS) and is executed by taking the MMTEL AS AS an execution main body. Namely, the tent system issues a shutdown instruction to the MMTEL AS. And under the condition that the MMTEL AS receives the halt instruction, determining the target session state of the target user corresponding to the halt instruction according to the session state dynamically stored in the session index table. And the MMTEL AS determines the role of the target user and the shutdown type corresponding to the target user under the condition that the target session state is determined to be the session. In the event that the target user's role matches the outage type, the MMTEL AS interrupts the target user's current session.
Wherein, the step of interrupting the current session of the target user by the MMTEL AS comprises the following steps: and the MMTEL AS issues a shutdown instruction to a service call session control function (S-CSCF) network element so AS to interrupt the current session of the target user. In case the current session is established based on the SIP protocol, the shutdown instruction may be a BYE message based on the SIP protocol. In an alternative embodiment, in case the current session interruption is successful, the S-CSCF network element returns a BYE 200 message to the MMTEL AS to indicate that the current session interruption is successful.
In an optional embodiment, the session index table includes a session identifier, where the session identifier is used to record a session state, and in a case that the session identifier is the first identifier, the session state indicated by the session identifier is a session. The first identifier may be a preset numerical value, a character or a character string, and the like, and the present invention is not limited herein. The session index table further includes user identifiers, where the user identifiers correspond to the session identifiers one to one, and the user identifiers may be mobile phone numbers or IMSI. As an example, the session index table is shown in table 1 below:
table 1:
user identification Session identification
153*******1 First mark
189*******2 First mark
189*******8 First mark
In this embodiment, when it is detected that a certain session is established, a session identifier corresponding to a calling number and a called number may be set as the first identifier according to the calling number and the called number in the established session.
In case the session index table comprises a session identification, step 101 may comprise:
under the condition of receiving a shutdown instruction, querying the session index table and determining a target session identifier corresponding to the target user;
and under the condition that the target session identifier is the first identifier, determining that the target session state of the target user is a session.
The process of querying the session index table and determining the target session identifier corresponding to the target user may include: matching the participant identification in the shutdown instruction with the user identification in the session index table, determining a target user identification corresponding to the participant identification, and determining a target session identification corresponding to the target user according to the target user identification, namely determining the session identification corresponding to the target user identification in the session index table as the target session identification corresponding to the target user. The participant identifier and the user identifier are both used to indicate a user identity, which may be a mobile phone number or an IMSI, and are not limited herein.
In the embodiment of the present invention, when detecting 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.
In an alternative embodiment, the session identifier in the session index table may also be set as the second identifier. And in the case that the session identifier is the second identifier, the session state indicated by the session identifier is the session end. When a certain session release is detected, the session identifier corresponding to the session may be set as the second identifier. Therefore, the embodiment of the present invention further includes: and when detecting that the current session of the target user is released, setting the target session identifier in the session index table as the second identifier.
In an alternative 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 detecting that a session is established, the values of the first state identifier and the second state identifier may be set to a first preset value, and the value of the third state identifier may be set to a second preset value, so as to indicate that the session state is a session. When the session release is detected, the value of the third state identifier may be updated to the first preset value, and the values of the first state identifier and the second state identifier are not changed, so as to indicate that the session state is the session end. The first preset value and the second preset value can be any 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.
In an alternative embodiment, the Session may be established based on the SIP (Session initiation Protocol). The SIP protocol is a Client/Server (Client/Server) protocol, so that SIP messages are divided into two types: a request message and a response message. The request message is a message that the client sends to the server in order to activate a specific operation. The response message is a response of the server to the request message indicating the success or failure status of the call. Common SIP request messages include INVITE messages and BYE messages, where an INVITE message indicates that a calling user initiates a session request to INVITE other users to join a session. The BYE message indicates that an established call is terminated. A commonly used SIP response message includes a 200 (OK) indicating a successful response. Therefore, in the case of establishing a session based on the SIP protocol, the embodiment of the present invention may set the first status flag to the first preset value when detecting the INVITE message, set the second status flag to the second preset value when detecting 200 (OK), and set the third status flag to the second preset value to indicate that the session status is in a session. And when the BYE message is detected, updating the third state identifier to a first preset value, and keeping the values of the first state identifier and the second state identifier unchanged to indicate that the session state is the session end.
The embodiment of the invention creates a session index table for each user, dynamically stores three key node messages of NVITE, INVITE200 and BYE to dynamically store the session state of the user, judges whether the user is in a conversation through the session index table without monitoring the session process in the whole process, saves the memory and simplifies the processing mechanism.
As an example, as shown in table 2 below, the character strings INVITE may be used to represent a first status identifier, INVITE200 represents a second status identifier, and BYE represents a third status identifier. In table 2, the session state of user 153 × × 1 is in session, the session state of user 189 × 2 is session end, and the session state of user 189 × 8 is in session.
Table 2:
user identification INVITE INVITE 200 BYE
153*******1 1 1 0
189*******2 1 1 1
189*******8 1 1 0
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.
When detecting that the current session of the target user is established, setting the target session identifier corresponding to the target user as the first identifier, including: when the current session establishment of a target user is detected, setting the values of the first target state identifier and the second target state identifier as first preset values, and setting the value of the third target state identifier as a second preset value;
when the current session release is detected, setting the target session identifier as the second identifier, including: when the current session release is detected, updating the value of the third target state identifier to the first preset value;
determining that the target session state of the target user is a session under the condition that the target session identifier is the first identifier, wherein the determining comprises the following steps: and under the condition that 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, determining that the target session state of the target user is a session.
Fig. 2 schematically shows a flow chart of a method of interrupting a user session according to another embodiment of the present invention. As shown in fig. 2, the method includes:
step 201: under the condition of receiving a shutdown instruction, determining a target session state of a target user corresponding to the shutdown instruction according to a session state dynamically stored in a session index table;
step 202: acquiring the session message of the current session and the user data of the target user under the condition that the target session state is the current session;
step 203: determining the role of the target user according to the session message;
step 204: determining a shutdown type corresponding to the target user according to the user data;
step 205: interrupting a current session of the target user if the role matches the outage type.
The session message may include identification information of a calling party and identification information of a called party, such as a calling identity and a called identity, which may include, but are not limited to, a mobile phone number, an IMSI, and the like, for establishing a current session. And analyzing the session message to determine the calling identification and the called identification carried by the session message. After the calling identification and the called identification are obtained through analysis, the calling identification and the called identification can be respectively matched with participant identifications in the shutdown instruction; under the condition that the calling identification is consistent with the participant identification, determining the role of the target user as a calling party; or, under the condition that the called identification is consistent with the participant identification, determining the role of the target user as the called party. As an example, the session message may be a SIP message when a session is established based on the SIP protocol. The Request-URI in the INVITE message of the SIP message carries the called number, and the P-Asserted-Identity carries the calling number. The called number and the calling number are matched with the participant identification in the halt instruction, so that the role of the target user can be determined.
User Data (also referred to as static User Data or transparent Data) may include therein a shutdown parameter indicating a type of shutdown. The type of shutdown of the target user may be determined based on the shutdown parameters.
In alternative embodiments, the shutdown parameter may be a preset numerical value, a character or a character string, and the like, and the invention is not limited herein. As an example, in the case that the shutdown parameter is a first preset character, the shutdown type indicated by the shutdown parameter is the calling shutdown, and in the case that the shutdown parameter is a second preset character, the shutdown type indicated by the shutdown parameter is the calling shutdown.
In an alternative embodiment, the shutdown parameters may include an outgoing barring identity (OutgoringBarring) and an incoming barring identity (IncominingBarring). And under the condition that the value of the calling prohibition identifier is a third preset value and the value of the calling prohibition identifier is a fourth preset value, the shutdown type is calling limitation. And when the value of the calling-out prohibition identifier and the value of the calling-in prohibition identifier are both the third preset value, the shutdown type is calling and called limitation. The process of determining the shutdown type corresponding to the target user according to the shutdown parameters may include: determining a value of the outgoing call barring identity and a value of the incoming call barring identity; under the condition that the value of the calling prohibition identifier is a third preset value and the value of the calling prohibition identifier is a fourth preset value, determining that the shutdown type corresponding to the target user is calling limitation; and under the condition that the value of the calling prohibition identifier and the value of the calling prohibition identifier are both the third preset values, determining that the shutdown type corresponding to the target user is the calling and called limitation.
In an alternative embodiment, the User data may also include a User-Identity (User-Identity).
In an alternative embodiment, the user data is stored in the local storage unit, or may be stored in the home subscriber server HSS, and then in step 202, the user data may be obtained from the local storage unit, or may be obtained from the HSS.
AS shown above, the method for interrupting a user session according to the embodiment of the present invention may be applied to an MMTEL AS, and then user data may be stored in the MMTEL AS, so that the user data may be acquired from a local storage unit of the MMTEL AS. When user data is stored in the HSS, the MMTEL AS may send a Profile-Update-Request (PUR) message to the HSS over the SH interface to Request retrieval of the user data. The HSS sends a Push-Notification-Request (PNR) message over the SH interface to notify the MMTEL AS of User Data (User-Data) including the outage parameters OutgoingBarring, incomingbaring, and User identification User-Identity.
Fig. 3 schematically shows a schematic diagram of a method of interrupting a user session according to a further embodiment of the present invention. As shown in fig. 3, the method includes:
step 1: and the MMTEL AS receives a shutdown instruction issued by the tent system through the tent interface.
Step 2: the MMTEL AS sends a Profile-Update-Request (PUR) message to the HSS through the SH interface to acquire User-Data. The User-Data body includes User-Identity, outingBarring, and IncominingBarring.
And 3, step 3: the HSS informs the MMTEL AS to update the User-Data through an SH interface Push-Notification-Request (PNR) message.
And 4, step 4: the MMTEL AS generates a decision mechanism according to the received User-Identity, outgoingBarring and IncominingBarring parameters and in combination with the session state in the session index table, and judges whether the current session of the User needs to be interrupted immediately; if the session needs to be interrupted, a BYE message is issued through step 7-8.
And 5: the MMTEL AS returns a Push-Notifications-Answer (PNA) message to the HSS through the SH interface, and the message contains a notification update result.
And 6: HSS returns Profile-Update-Answer (PUA) message to MMTEL AS through SH interface, the message includes successful result of user data updating.
And 7: and the MMTEL AS sends a BYE message to the S-CSCF to interrupt the session.
And 8: and the S-CSCF returns a BYE 200 message to the MMTEL AS, and the session interruption is completed.
In the embodiment of the invention, an IMS core network MMTELAS establishes a session index table for each user and dynamically stores session states, such as dynamically storing three key node messages of INVITE, INVITE200 and BYE; if a shutdown command sent by the tent system is received, acquiring User-Identity, outgoingBarring and IncominingBarring through an SH interface, and comprehensively judging whether the User session needs to be immediately interrupted or not according to four factors of the User session state, outgoingBarring and IncominingBarring; if the session needs to be interrupted, the BYE message is issued to the S-CSCF through the MMTEL AS, and the purpose of immediately interrupting the call of the shutdown user is achieved.
By the method for interrupting the user session, the session of the postpaid user in the conversation under the states of single stop of accounting and arrearage and double stop of arrearage can be interrupted, the same function as a 2G mobile network is realized, the service consistency is realized, the user complaints and the operator loss are reduced, the real-time shutdown of the conversation states of the user in the single stop and double stop states can be met, the accurate service is provided for the operator, and the enterprise loss is reduced; the method can be expanded to apply the interruption of the call by the intervention of a third party in the call of the 4G, 5G and VOBB users, such as: the method has the advantages of interrupting fraudulent calls, reducing user loss scenes, and also being applied to scenes of interrupting user calls and ensuring smooth emergency information in emergency scenes.
Fig. 4 schematically shows a structural diagram of an apparatus 400 for interrupting a user session according to an embodiment of the present invention. As shown in fig. 4, the apparatus 400 includes:
the query module 401 is configured to, when a shutdown instruction is received, determine a target session state of a target user corresponding to the shutdown instruction according to a session state dynamically stored in a session index table;
a determining module 402, configured to determine, when the target session state is an ongoing session, a role of the target user and a shutdown type corresponding to the target user;
an interrupting module 403, configured to interrupt the current session of the target user if the role matches the outage type.
The device for interrupting the user session of the embodiment of the invention dynamically stores the session state through the session index table without fully monitoring the session process, thereby saving the memory and simplifying the processing mechanism; the method comprises the steps that under the condition that a halt instruction is received, the target session state of a target user corresponding to the halt instruction is determined according to the session state dynamically stored in a session index table, under the condition that the target session state is in a session, the role and the halt type of the target user are determined, and under the condition that the role of the target user is matched with the halt type, the current session of the target user is interrupted, so that the accurate session interruption is realized by combining the session state, the user role and the corresponding halt type under the condition that the halt instruction is received, the problem that the user in the session cannot be immediately interrupted when the halt instruction is issued by accounting in the related technology is solved, and the operator is prevented from being lost; the requirement that the call needs to be interrupted immediately in the anti-fraud scene is met, the loss of a user is avoided, the requirement that the call needs to be interrupted immediately in the emergency scene and the like is met, and the smoothness of emergency communication is guaranteed.
In an optional embodiment, the apparatus further includes a creating module, configured to create the session index table, where the session index table includes a session identifier, and in a case that the session identifier is the first identifier, a session state indicated by the session identifier is a session;
the query module is further to: inquiring the session index table, and determining a target session identifier corresponding to the target user; and under the condition that the target session identifier is the first identifier, determining that the target session state of the target user is a session.
In an optional embodiment, the apparatus further includes an updating module, configured to set the target session identifier in the session index table as the first identifier when the current session establishment is detected.
In an optional embodiment, in a case that the session identifier is the second identifier, a session state indicated by the session identifier is a session end;
the update module is further to: and when the current session release is detected, setting the target session identifier in the session index table as the second identifier.
In an alternative embodiment, the session index table further comprises a user identification;
the query module is further configured to: matching the participant identification carried by the halt instruction with the user identification in the session index table, and determining a target user identification matched with the participant identification; and determining a target session identifier corresponding to the target user according to the target user identifier.
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;
the update module is further to: when the current session is detected to be established, setting the values of the first target state identifier and the second target state identifier as a first preset value, and setting the value of the third target state identifier as a second preset value; when the current session release is detected, updating the value of the third target state identifier to the first preset value;
the query module is further configured to: and under the condition that 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, determining that the target session state of the target user is a session.
In an optional embodiment, the interrupt module is further configured to: under the condition that the role is a calling party and the shutdown type is calling limitation or calling and called limitation, determining that the role is matched with the shutdown type and interrupting the current session of the target user; or, under the condition that the role is the called party and the halt type is the calling and called limitation, determining that the role is matched with the halt type, and interrupting the current session of the target user.
In an optional embodiment, the determining module is further configured to: acquiring the session message of the current session, and determining the role of the target user according to the session message; and acquiring user data of the target user, and determining the shutdown type corresponding to the target user according to the user data.
In an optional embodiment, the determining module is further configured to: analyzing the session message, and determining a calling identification and a called identification carried by the session message; matching the calling identification and the called identification with participant identifications carried by the shutdown instruction respectively; under the condition that the calling identification is consistent with the participant identification, determining the role of the target user as a calling party; or, under the condition that the called identification is consistent with the participant identification, determining the role of the target user as the called party.
In an optional embodiment, the determining module is further configured to: analyzing the user data and determining shutdown parameters; and determining the shutdown type corresponding to the target user according to the shutdown parameters.
In an alternative embodiment, the shutdown parameter includes an outgoing call barring identity and an incoming call barring identity;
the determination module is further to: determining a value of the outgoing call barring identity and a value of the incoming call barring identity; determining that the shutdown type corresponding to the target user is calling limitation under the condition that the value of the calling prohibition identifier is a third preset value and the value of the calling prohibition identifier is a fourth preset value; and under the condition that the value of the calling-out prohibition identifier and the value of the calling-in prohibition identifier are both the third preset values, determining that the shutdown type corresponding to the target user is calling and called limitation.
In an optional embodiment, the obtaining module is further configured to: and acquiring the user data of the target user from a local storage unit or a Home Subscriber Server (HSS).
The device can execute the method provided by the embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiment of the present invention.
An embodiment of the present invention further provides an electronic device, as shown in fig. 5, which includes a processor 501, a communication interface 502, a memory 503 and a communication bus 504, where the processor 501, the communication interface 502 and the memory 503 complete mutual communication through the communication bus 504,
a memory 503 for storing a computer program;
the processor 501 is configured to implement the following steps when executing the program stored in the memory 503: under the condition of receiving a shutdown instruction, determining a target session state of a target user corresponding to the shutdown instruction according to a session state dynamically stored in a session index table; determining the role of the target user and the shutdown type corresponding to the target user under the condition that the target session state is a session; interrupting a current session of the target user if the role matches the outage type.
The communication bus 504 mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus 504 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface 502 is used for communication between the above-described terminal and other devices.
The Memory 503 may include a Random Access Memory (RAM), and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Alternatively, the memory may be at least one memory device located remotely from the processor 501.
The Processor 501 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In yet another embodiment of the present invention, a computer-readable medium is further provided, which has instructions stored therein, and when the computer-readable medium is run on a computer, the computer is caused to execute the method for interrupting a user session as described in any of the above embodiments.
In yet another embodiment provided by the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the method of interrupting a user session as described in any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). 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, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (15)

1. A method for interrupting a user session, comprising:
under the condition of receiving a shutdown instruction, determining a target session state of a target user corresponding to the shutdown instruction according to a session state dynamically stored in a session index table;
determining the role of the target user and the shutdown type corresponding to the target user under the condition that the target session state is a session;
interrupting a current session of the target user if the role matches the outage type.
2. The method according to claim 1, wherein the session index table includes a session identifier, and in the case that the session identifier is the first identifier, the session state indicated by the session identifier is a session;
the 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 includes:
inquiring the session index table, and determining a target session identifier corresponding to the target user;
and under the condition that the target session identifier is the first identifier, determining that the target session state of the target user is a session.
3. The method of claim 2, further comprising:
and when the current session is detected to be established, setting the target session identifier in the session index table as the first identifier.
4. The method according to claim 3, wherein in the case that the session identifier is the second identifier, the session state indicated by the session identifier is the end of the session;
the method further comprises the following steps: and when the current session release is detected, setting the target session identifier in the session index table as the second identifier.
5. The method of claim 2, wherein the session index table further comprises a user identification;
the querying the session index table to determine the target session identifier corresponding to the target user includes:
matching the participant identification carried by the halt instruction with the user identification in the session index table, and determining a target user identification matched with the participant identification;
and determining a target session identifier corresponding to the target user according to the target user identifier.
6. The method of claim 4, wherein the target session identifier comprises a first target state identifier, a second target state identifier, and a third target state identifier;
when the current session establishment is detected, setting the target session identifier as the first identifier, including: when the current session establishment is detected, setting the values of the first target state identifier and the second target state identifier as a first preset value, and setting the value of the third target state identifier as a second preset value;
when the current session release is detected, setting the target session identifier as the second identifier, including: when the current session release is detected, updating the value of the third target state identifier to the first preset value;
the determining that the target session state of the target user is a session under the condition that the target session identifier is the first identifier includes: and under the condition that 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, determining that the target session state of the target user is a session.
7. The method according to any of claims 1-6, wherein said interrupting a current session of said target user if said role matches said outage type comprises:
under the condition that the role is a calling party and the shutdown type is calling limitation or calling and called limitation, determining that the role is matched with the shutdown type and interrupting the current session of the target user;
or
And under the condition that the role is the called party and the halt type is the limitation of calling and called, determining that the role is matched with the halt type, and interrupting the current session of the target user.
8. The method of claim 7, wherein the determining the role of the target user and the type of outage corresponding to the target user comprises:
acquiring the session message of the current session, and determining the role of the target user according to the session message;
and acquiring user data of the target user, and determining the shutdown type corresponding to the target user according to the user data.
9. The method of claim 8, wherein determining the role of the target user based on the session message comprises:
analyzing the session message, and determining a calling identification and a called identification carried by the session message;
matching the calling identification and the called identification with participant identifications carried by the shutdown instruction respectively;
under the condition that the calling identification is consistent with the participant identification, determining the role of the target user as a calling party; or, determining the role of the target user as the called party under the condition that the called identification is consistent with the participant identification.
10. The method of claim 9, wherein the determining the shutdown type corresponding to the target user according to the user data comprises:
analyzing the user data and determining shutdown parameters;
and determining the shutdown type corresponding to the target user according to the shutdown parameters.
11. The method of claim 10, wherein the shutdown parameters include an outgoing call barring identity and an incoming call barring identity;
determining the shutdown type corresponding to the target user according to the shutdown parameter includes:
determining a value of the outgoing call barring identity and a value of the incoming call barring identity;
under the condition that the value of the calling prohibition identifier is a third preset value and the value of the calling prohibition identifier is a fourth preset value, determining that the shutdown type corresponding to the target user is calling limitation;
and under the condition that the value of the calling prohibition identifier and the value of the calling prohibition identifier are both the third preset values, determining that the shutdown type corresponding to the target user is the calling and called limitation.
12. The method of claim 8, wherein the obtaining user data of the target user comprises:
and acquiring the user data of the target user from a local storage unit or a Home Subscriber Server (HSS).
13. An apparatus for interrupting a user session, comprising:
the query module is used for determining a target session state of a target user corresponding to a shutdown instruction according to a session state dynamically stored in a session index table under the condition that the shutdown instruction is received;
the determining module is used for determining the role of the target user and the shutdown type corresponding to the target user under the condition that the target session state is a session;
and the interruption module is used for interrupting the current session of the target user under the condition that the role is matched with the shutdown type.
14. An electronic device, comprising:
one or more processors;
a storage device to store one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-12.
15. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-12.
CN202210800707.5A 2022-07-08 2022-07-08 Method, device, electronic equipment and medium for interrupting user session Pending CN115278937A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210800707.5A CN115278937A (en) 2022-07-08 2022-07-08 Method, device, electronic equipment and medium for interrupting user session

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210800707.5A CN115278937A (en) 2022-07-08 2022-07-08 Method, device, electronic equipment and medium for interrupting user session

Publications (1)

Publication Number Publication Date
CN115278937A true CN115278937A (en) 2022-11-01

Family

ID=83764380

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210800707.5A Pending CN115278937A (en) 2022-07-08 2022-07-08 Method, device, electronic equipment and medium for interrupting user session

Country Status (1)

Country Link
CN (1) CN115278937A (en)

Similar Documents

Publication Publication Date Title
US20060068816A1 (en) Network based contacts with optional DTMF exchange of the same
US20070195751A1 (en) Providing voicemail blocking in communication networks
TWI385969B (en) Method and system for lawful interception of the value-added service in ip multimedia subsystem
US9686326B2 (en) Method and apparatus for enabling registration of aggregate end point devices through provisioning
CN101217600A (en) A method and device of inquiring transferring operations
US20080310399A1 (en) Methods and systems for connecting phones to internet users
US10938865B2 (en) Management of subscriber identity in service provision
US9008287B2 (en) Data communication
CN108259433B (en) Call queuing distribution method, system and server
KR100415117B1 (en) Apparatus and method for called compulsive on multi call into internet protocol phone in an internet protocol telephony system
JP2010147645A (en) Method of controlling connection, and communication system
WO2020259791A1 (en) Apparatus, method, and computer program for updating user subscription profiles
CN115278937A (en) Method, device, electronic equipment and medium for interrupting user session
EP2767078A1 (en) Apparatus and method for conferencing
KR20120058203A (en) Multi-ring service providing system and method for plurality of receiving terminals
KR20180135756A (en) Server and method for processing conference call
EP3703351B1 (en) Exchange, communication system, registration method and computer program
WO2022011669A1 (en) Method and system for presenting multimedia information of calling party at called terminal
CN113014728A (en) Method, system and computer storage medium for implementing communication assistant service
US20140189795A1 (en) Method and Apparatus for Conducting Service by Service Delivery Platform
CN107317786B (en) Method, device and network element for forwarding session initiation protocol message
EP4231617A1 (en) Method for managing and/or signaling at least one voip call and a communication system
CN112187707B (en) Shutdown method and application server
US8270581B2 (en) System and method for displaying caller identification information via an instant messaging service
EP4342165A1 (en) System and method for providing an enhanced feature for a caller ring back tone

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination