Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The flow diagrams depicted in the figures are merely illustrative and not necessarily all of the elements and operations/steps are included or performed in the order described. For example, some operations/steps may be further divided, combined, or partially combined, so that the order of actual execution may be changed according to actual situations.
It is to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
The embodiment of the invention provides a session management method, a session management device and a storage medium. The session management method can be applied to a session management device, the session management device can be arranged in user equipment, and the user equipment can be electronic equipment such as a mobile phone, a tablet personal computer, a notebook computer and the like.
Some embodiments of the present invention are described in detail below with reference to the accompanying drawings. The following embodiments and features of the embodiments may be combined with each other without conflict.
Referring to fig. 1, fig. 1 is a schematic flow chart of steps of a session management method according to an embodiment of the present invention.
As shown in fig. 1, the session management method may include steps S101 to S103.
Step S101, a protocol data unit PDU session establishment request initiated by an application program is obtained, and the number of established PDU sessions is obtained, so that the number of PDU sessions is obtained.
The PDU session is a protocol Data unit session (Protocol Data Unit session), which connects PDU Data between the user terminal and a Data Network (DN), i.e. a Data transmission channel between the user equipment and the Data Network. It should be noted that, the preset number of PDU sessions included in the ue is set according to the actual situation, and the embodiment of the present invention is not limited to this, for example, the ue uses a third generation partnership project (3rd Generation Partnership Project,3GPP) protocol, and the maximum number of PDU sessions that can be established by the ue is 8 or more; the number of the 8 PDU sessions to establish a plurality of network slices may be set according to practical situations, and in the embodiment of the present invention, the number is not specifically limited, for example, the 8 PDU sessions respectively establish 8 different network slices, and for example, the 8 PDU sessions respectively establish two network slices, i.e. one network slice establishes 4 PDU sessions, and another network slice establishes another 4 PDU sessions.
In an embodiment, when detecting that a certain application program on the user equipment starts, the application program initiates a PDU session establishment request, and the session management device obtains the application program to initiate the PDU session establishment request, and obtains the number of the current established PDU sessions, so as to obtain the number of PDU sessions. In an embodiment, one PDU session may correspond to one application identifier, i.e. one application uses one PDU session, i.e. the number of PDU sessions may be acknowledged according to the application identifier.
Step S102, when the number of PDU sessions reaches the preset number and the application program has the authority to use the PDU sessions, deactivating one PDU session in the established PDU sessions.
The preset number of PDU sessions is the number of PDU sessions that can be established by the ue, and the preset number may be set according to practical situations, which is not specifically limited in the embodiment of the present invention, for example, the ue uses a third generation partnership project (3rd Generation Partnership Project,3GPP) protocol, and the ue includes 8 PDU sessions, where the preset number is 8 or 10.
In one embodiment, the specific way to determine whether the application has permission to use the PDU session is: acquiring a permission list of the PDU session, wherein an application identifier of an application with permission to use the PDU session is stored in the permission list; an application identifier of the currently running application is obtained and it is determined whether the application identifier of the currently running application is located in the rights list. When the application identifier of the currently running application is determined to be positioned in the authority list, a user account for logging in the currently running application is obtained, and whether the user account is positioned in a white list of the currently running application is determined; when the user account is determined to be positioned in the white list of the currently running application program, determining that the currently running application program has the authority to use the PDU session; when the user account is determined not to be in the white list of the currently running application program or the application identifier of the currently running application program is determined not to be in the authority list, determining that the currently running application program does not have the authority to use the PDU session. The white list of the application program is a set of application program identifiers of authority application programs used by PDU session set by a user, the white list of the application program can be set according to actual conditions, and the embodiment of the invention is not particularly limited to the above; the user account may be selected according to the actual situation, which is not limited in the embodiment of the present invention, for example, the user account may be a mobile phone account of the user, and of course, may be any other suitable rights identity information.
The application program has the right to use the PDU session only when the development company of the application program purchases the network slice selection auxiliary information (network slice selection assistance information, NSSAI) of the network slice of the network operator and the user account of the application program is logged in to purchase the member of the development company of the application program. The network operator may be determined according to practical situations, and the embodiment of the present invention is not limited thereto, for example, the network operator may select an operator such as a mobile operator, a corporate operator, and a telecom operator.
For example, when a development company of an application purchases network slice selection auxiliary information of a network slice of a network operator, a user account logged in the application does not purchase a member of the development company of the application, and the application on the user device does not have the use authority of the PDU session.
In one embodiment, as shown in fig. 2, step S102 may include sub-steps S1021 through S1023.
Substep S1021, obtains the deactivation priority of each PDU session that has been established.
The deactivation priority is determined according to the time length of the established PDU session, the type of the PDU session and/or a preset application list set by a user, and the higher the deactivation priority of the established PDU session, the higher the probability of deactivation of the established PDU session, and the lower the deactivation priority of the established PDU session, the lower the probability of deactivation of the established PDU session.
In one embodiment, as shown in fig. 3, step S1021 may include sub-steps S1021a through S1021b.
Step S1021a, the established duration of each PDU session is acquired.
For example, there are 8 established PDU sessions, namely PDU session 1, PDU session 2, PDU session 3, PDU session 4, PDU session 5, PDU session 6, PDU session 7 and PDU session 8, respectively, and the establishment time length of PDU session 1 is 50 minutes, the establishment time length of PDU session 2 is 45 minutes, the establishment time length of PDU session 3 is 40 minutes, the establishment time length of PDU session 4 is 35 minutes, the establishment time length of PDU session 5 is 30 minutes, the establishment time length of PDU session 6 is 25 minutes, the establishment time length of PDU session 7 is 20 minutes, and the establishment time length of PDU session 8 is 15 minutes.
Substep S1021b determines the deactivation priority of each PDU session that has been established based on the duration of the established session of each PDU.
Ordering each PDU session according to the established establishment duration of each PDU session to obtain a PDU session queue, and determining the deactivation priority of each PDU session according to the order of each PDU session in the PDU session queue. Wherein the longer the PDU session is established, the higher the priority of deactivation of the PDU session. For example, the establishment duration of PDU session 1 is 50 minutes, the establishment duration of PDU session 2 is 45 minutes, the establishment duration of PDU session 3 is 40 minutes, the establishment duration of PDU session 4 is 35 minutes, the establishment duration of PDU session 5 is 30 minutes, the establishment duration of PDU session 6 is 25 minutes, the establishment duration of PDU session 7 is 20 minutes, the establishment duration of PDU session 8 is 15 minutes, and the 8 PDU sessions are ordered to obtain a PDU session queue, i.e. the priority order of PDU session 1, PDU session 2, PDU session 3, PDU session 4, PDU session 5, PDU session 6, PDU session 7 and PDU session 8 deactivation is sequentially from high priority to low priority, the priority of the PDU session 1 deactivation is the highest, and the priority of PDU session 8 deactivation is the lowest.
In one embodiment, as shown in fig. 4, step S1021 may include sub-steps S1021c through S1021d.
Step S1021c, the type of each PDU session established is acquired.
Types of PDU sessions may include enhanced mobile broadband (enhanced Mobile Broadband, eMMB) types, extremely reliable low-latency communication (Ultra Reliable Low Latency Communications, URLLC) types, large-scale internet of things types, and vehicular wireless communication technology (V2X) types, among others.
Substep S1021d, determining the deactivation priority of each established PDU session based on the type of each established PDU session.
And acquiring a mapping relation table between the type of the pre-stored PDU session and the deactivation priority, and determining the deactivation priority of each established PDU session according to the mapping relation table between the type of the PDU session and the deactivation priority and the type of each established PDU session. The mapping table between the type of the PDU session and the deactivation priority may be set according to practical situations, which is not limited in the embodiment of the present invention, for example, the type eMMB, the type URLLC, the type of large-scale internet of things, and the deactivation priority of the V2X type are sequentially from low to high.
For example, the deactivation priorities of eMMB type, URLLC type, large-scale internet of things type and V2X type are sequentially from low to high, the acquired types of established PDU session 1, PDU session 2, PDU session 3, PDU session 4 and PDU session 5 are eMMB type, the type of PDU session 6 is large-scale internet of things type, the type of PDU session 7 is V2X type and the type of PDU session 8 is URLLC type, and the deactivation priorities of PDU sessions are ordered from high to low as follows: PDU session 7, PDU session 6, PDU session 8, PDU session 1, PDU session 2, PDU session 3, PDU session 4 and PDU session 5, wherein the deactivation priorities of PDU session 1, PDU session 2, PDU session 3, PDU session 4 and PDU session 5 are the same, i.e. the deactivation priority of established PDU session 7 is highest and the deactivation priority of PDU session 1, PDU session 2, PDU session 3, PDU session 4 and PDU session 5 is lowest.
In one embodiment, as shown in fig. 5, step S1021 may include sub-steps S1021e through S1021f.
Step S1021e, obtains an identifier of an application using each PDU session that has been established.
The identifier of the application may be set according to the actual situation, which is not limited in the embodiment of the present invention, for example, the identifier of the application may be set to APP1, APP2, or the like.
Substep S1021f, determining the deactivation priority of each PDU session established based on the identifier of the application using each PDU session established and the list of preset applications.
Acquiring an identifier list of a preset application program, wherein the identifier list stores identifiers of the application programs with high deactivation priorities; and acquiring the identifier of the application program of each established PDU session, determining whether the identifier of the application program of each established PDU session is positioned in the identifier list of the preset application program, and when the identifier of the application program of each established PDU session is positioned in the identifier list of the preset application program, determining that the priority of the deactivation PDU session of the established PDU session corresponding to the identifier of the application program is highest. The identifier list of the preset application program may be set according to practical situations, which is not specifically limited in the embodiment of the present invention.
In one embodiment, a list of identifiers of preset application programs is obtained, wherein identifiers of application programs with low deactivation priority are stored in the list; and acquiring the identifier of the application program of each established PDU session, determining whether the identifier of the application program of each established PDU session is positioned in the identifier list of the preset application program, and when the identifier of the application program of each established PDU session is positioned in the identifier list of the preset application program, determining that the priority of the deactivation PDU session of the established PDU session corresponding to the identifier of the application program is lowest. The identifier list of the preset application program may be set according to practical situations, which is not specifically limited in the embodiment of the present invention.
In one embodiment, a list of identifiers of a preset application is obtained; and acquiring the identifier of the application program of each established PDU session, determining whether the identifier of the application program of each established PDU session is positioned in the identifier list of the preset application program, and when the identifier of the application program of each established PDU session is positioned in the identifier list of the preset application program, determining that the priority of the deactivation PDU session of the established PDU session corresponding to the identifier of the application program is highest. When it is determined that the identifier of the application program of each established PDU session is not located in the identifier list of the preset application program, ordering each PDU session according to the established duration of each established PDU session to obtain a PDU session queue, and determining the deactivation secondary priority of each established PDU session according to the order of each established PDU session in the PDU session queue. Wherein the longer the PDU session is established, the higher the priority of deactivation of the PDU session.
It should be noted that, the above ways of determining the deactivation priority of each PDU session that is established may be one way to determine the deactivation priority of each PDU session that is established, or may be a combination of ways to determine the deactivation priority of each PDU session that is established, and thus determine the deactivation priority of each PDU session that is established, which is not particularly limited in the embodiments of the present invention.
Substep S1022 determines the target PDU session to be deactivated based on the deactivation priority of each PDU session established.
The established PDU session with the highest deactivation priority is taken as a target PDU session to be deactivated, for example, PDU session 1 is established for 50 minutes, PDU session 2 is established for 45 minutes, PDU session 3 is established for 40 minutes, PDU session 4 is established for 35 minutes, PDU session 5 is established for 30 minutes, PDU session 6 is established for 25 minutes, PDU session 7 is established for 20 minutes, PDU session 8 is established for 15 minutes, the longest PDU session with the longest time length of establishing the PDU session is taken as the target PDU session to be deactivated, and then the established PDU session 1 is taken as the target PDU session to be deactivated.
Step S1023, the target PDU session is deactivated.
After the target PDU session is obtained, the application program corresponding to the target PDU session is established from the PDU session to the common session. By deactivating the target PDU session to blank one PDU session, the application initiating the PDU session establishment request is able to successfully establish the PDU session.
In one embodiment, a deactivation identifier of the target PDU session is obtained, and whether the deactivation identifier of the target PDU session is a first identifier or a second identifier is determined, and when the deactivation identifier is determined to be the first identifier, the target PDU is determined to be successfully deactivated; when it is determined that the deactivation identifier is a second identifier, it is determined that the target PDU fails to deactivate. The deactivation identifier is set according to practical situations, and the embodiment of the present invention is not limited to this, for example, the first identifier is 1, and the second identifier is 0. By acquiring the deactivation identifier of the target PDU session, whether the target PDU session is successfully deactivated or not is further determined, and the efficiency of session management is improved.
In one embodiment, when the number of PDU sessions reaches a preset number and the application program has the authority to use PDU sessions, displaying a PDU session selection page, and acquiring an identifier of the application program selected on the user equipment by deactivating the PDU session selection page; and obtaining the PDU session corresponding to the identifier according to the selected identifier and each established PDU session, namely obtaining the target PDU session to be deactivated, and performing deactivation processing on the target PDU session. The identifier of the application program selected by the user on the PDU (protocol data unit) session deactivation selection page is obtained, so that the target PDU session to be deactivated is obtained, and the target PDU session is deactivated, so that the flexibility of session management is improved, and the use experience of the user is improved.
Step S103, when it is determined that the deactivation of the established one PDU session is completed, the PDU session of the application program is established according to the PDU session establishment request.
When the acquired deactivation identifier of the target PDU session is the first identifier, determining that deactivation of the established PDU session is completed, obtaining an empty PDU session, and establishing the PDU session of the application program according to the PDU session establishment request. In one embodiment, after the target PDU session to be deactivated is deactivated, an application corresponding to the target PDU session is established to a normal session, so that the application can transmit information data.
According to the session management method provided by the embodiment, the number of established PDU sessions is obtained by acquiring a protocol data unit PDU session establishment request initiated by an application program; then when the number of PDU sessions is determined to reach the preset number and the application program has the authority of using the PDU sessions, deactivating one PDU session in the established PDU sessions; and after determining that the deactivation of the established one PDU session is completed, establishing the PDU session of the application program according to the PDU session establishment request. Due to the fact that the number of PDU (protocol data Unit) sessions of the user equipment is limited, according to the scheme, when the number of PDU sessions which are established reaches the limit when the PDU session establishment request is initiated by the application program with the authority of using the PDU sessions, deactivation processing can be conducted on one established PDU session, and after deactivation is completed, the PDU session of the application program is established, the intelligence of PDU session switching is greatly improved, and the use experience of a user is improved.
Referring to fig. 6, fig. 6 is a schematic block diagram illustrating a structure of a session management apparatus according to an embodiment of the present invention.
As shown in fig. 6, the session management device 200 may include a processor 201 and a memory 202, where the processor 201 and the memory 202 are connected by a bus 203, such as an I2C (Inter-INTEGRATED CIRCUIT) bus.
In particular, the processor 201 is configured to provide computing and control capabilities, supporting the operation of the overall session management apparatus. The Processor 201 may be a central processing unit (Central Processing Unit, CPU), and the Processor 201 may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL processors, DSPs), application SPECIFIC INTEGRATED Circuits (ASICs), field-Programmable gate arrays (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Specifically, the Memory 202 may be a Flash chip, a Read-Only Memory (ROM) disk, an optical disk, a U-disk, a removable hard disk, or the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 6 is merely a block diagram of a portion of the structure associated with the present invention and is not limiting of the session management apparatus to which the present invention is applied, and that a particular session management apparatus may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
The processor is configured to run a computer program stored in the memory, and implement any one of the session management methods provided by the embodiments of the present invention when the computer program is executed.
In an embodiment, the processor is configured to run a computer program stored in a memory and to implement the following steps when the computer program is executed:
Acquiring a protocol data unit PDU session establishment request initiated by an application program, and acquiring the number of established PDU sessions to obtain the number of PDU sessions;
when the number of PDU sessions is determined to reach the preset number and the application program has the authority of using the PDU sessions, performing deactivation processing on one established PDU session;
And after determining that one PDU session of the established PDU sessions is deactivated, establishing the PDU session of the application program according to the PDU session establishment request.
In an embodiment, the processor is configured, when implementing the deactivating one of the established PDU sessions, to implement:
acquiring deactivation priority of each established PDU session;
Determining a target PDU session to be deactivated according to the deactivation priority of each PDU session established;
And performing deactivation processing on the target PDU session.
In an embodiment, the processor, when implementing the acquiring the deactivation priority of each PDU session established, is configured to implement:
acquiring the established establishment time length of each PDU session;
Determining the deactivation priority of each established PDU session according to the established time length of each established PDU session.
In an embodiment, the processor, when implementing the acquiring the deactivation priority of each PDU session established, is configured to implement:
Acquiring the type of each established PDU session;
Determining the deactivation priority of each PDU session established according to the type of each PDU session established.
In an embodiment, the processor, when implementing the acquiring the deactivation priority of each PDU session established, is configured to implement:
acquiring an identifier of an application using each PDU session established;
The deactivation priority of each PDU session established is determined based on the identifier of the application using each PDU session established and a list of preset applications.
In an embodiment, after implementing the acquiring the protocol data unit PDU session establishment request initiated by the currently running application, and acquiring the number of established PDU sessions, the processor is further configured to implement:
when the number of PDU sessions is determined to reach the preset number and the application program has the authority of using PDU sessions, displaying a PDU session selection page;
The deactivation process is performed on one of the established PDU sessions, comprising the following steps:
Acquiring a PDU session identifier selected at the PDU session selection page;
Determining a target PDU session to be deactivated according to the PDU session identifier;
And performing deactivation processing on the target PDU session.
In an embodiment, the processor is configured, when implementing the determining the target PDU session to be deactivated according to the deactivation priority of each PDU session that is already established, to implement:
And taking the established PDU session with the highest deactivation priority as a target PDU session to be deactivated.
In an embodiment, the processor is further configured to implement:
Acquiring a deactivation identifier of the target PDU session;
when the deactivation identifier is determined to be a first identifier, determining that the target PDU session is successfully deactivated;
When it is determined that the deactivation identifier is a second identifier, it is determined that the target PDU session fails to deactivate.
It should be noted that, for convenience and brevity of description, a person skilled in the art may clearly understand that, for the specific working process of the session management apparatus described above, reference may be made to a corresponding process in the foregoing embodiment of the session management method, which is not described herein again.
Embodiments of the present invention also provide a storage medium for computer readable storage storing one or more programs executable by one or more processors to implement the steps of any of the methods of session management as provided in the present specification.
The storage medium may be an internal storage unit of the session management apparatus according to the foregoing embodiment, for example, a hard disk or a memory of the session management apparatus. The storage medium may be an external storage device of the session management apparatus, such as a plug-in hard disk, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD), or the like, which are provided in the session management apparatus.
Those of ordinary skill in the art will appreciate that all or some of the steps, systems, functional modules/units in the apparatus, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between the functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed cooperatively by several physical components. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media may include volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as known to those skilled in the art. Computer storage media may include, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and may include any information delivery media.
It should be understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations. It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system 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 system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments. While the invention has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.