Network communication session release method and device, and storage medium
By acquiring the release data stream and parsing the status notification node in the 5G network, the problem of the core network being unable to effectively release user PDU sessions was solved, ensuring the integrity of communication data processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DAWNING NETWORK TECH CO LTD
- Filing Date
- 2025-12-18
- Publication Date
- 2026-04-21
AI Technical Summary
Existing technologies cannot effectively manage the core network side's proactive release of user PDU sessions in 5G networks, resulting in omissions in communication data processing procedures and loss of data integrity.
By acquiring the release data stream in the core network, the session flow type is determined, the status notification node is located and associated with the session node, and the resource status field is parsed to release the session.
This enables the core network end to promptly delete associated session nodes when actively releasing a session, ensuring the integrity of the communication data processing flow.
Smart Images

Figure CN121908405A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network communication, and in particular to a method, device and storage medium for releasing a network communication session. Background Technology
[0002] The N11 interface in the 5G core network is a crucial core interface, and its signaling traffic carries information such as the creation, modification, and release of user PDU sessions. With the widespread use of 5G networks in daily life, the demand for network security backtracking analysis is increasingly strong. Therefore, it is necessary to parse and manage various signaling processes of the N11 interface, among which the identification and management of the creation and release processes of user PDU sessions is the most important.
[0003] Existing technologies for PDU session management on the N11 interface typically involve parsing the HTTP / 2 protocol, determining whether it is an N11 interface based on the target address field in the HTTP / 2 header, parsing the "smContextRef" field in the target address, and using "smContextRef" and network element IP as keys to create a hash table to associate and manage the context information of the user's PDU session.
[0004] This method only addresses the release of sessions when the user end disconnects from the core network end. If the core network end needs to actively release the session with the user end, this method cannot effectively associate the PDU session information, causing the PDU session that should have been released to not be released normally, resulting in omissions in the communication data processing flow and loss of data integrity. Summary of the Invention
[0005] This invention provides a method, device, and storage medium for releasing network communication sessions to solve the above-mentioned problems.
[0006] In a first aspect, embodiments of the present invention provide a method for releasing a network communication session, comprising: obtaining a release data stream of the current session in the core network; determining the current session flow type based on the release data stream; when the current session flow type is a session change flow, locating the status notification node and the session node associated with the status notification node; extracting and parsing the resource status field of the release data stream in the session change flow; and deleting the corresponding session node when the parsing result of the resource status field is a session release, thereby releasing the current session.
[0007] The network communication session release method provided in this embodiment of the invention can find the associated session node through the status notification node when the core network actively releases the session, and determine whether the core network needs to release the session. When the session needs to be released, the corresponding session node is deleted in time to release the session, so that the core network can release the session normally and ensure the integrity of the communication data processing flow.
[0008] Optionally, the status notification node is associated with the session node through the following steps: obtaining the initial data stream when the user terminal and the core network terminal establish a session, wherein the initial data stream includes a first-stream data frame and a first data frame; when the first-stream data frame of the current session in the core network is a corresponding network protocol message, obtaining the destination address field of the first-stream data frame; when the destination address field conforms to the corresponding interface standard format, obtaining the key-value pair information of the first data frame in the current session; establishing a session node based on the key-value pair information, and obtaining the corresponding session status identifier field; establishing a status notification node based on the session status identifier field, and associating the status notification node with the session node.
[0009] Optionally, the step of obtaining the key-value pair information of the first data frame in the current session includes: when the target address field conforms to the corresponding interface standard format, obtaining the service request type corresponding to the target address field; based on the service request type, determining whether a session node needs to be established, and when a session node needs to be established, obtaining the key-value pair information of the first data frame in the current session.
[0010] Optionally, the steps of establishing a status notification node based on the session status identifier field and associating the status notification node with the session node include: obtaining the status identifier address and the corresponding path field based on the session status identifier field; calculating the identifier hash value of the path field; using the status identifier address and the identifier hash value as keys to establish a status notification node; and establishing a mapping relationship between the status notification node and the session node, so that the status notification node is associated with the session node.
[0011] Optionally, the release data stream includes a second stream data frame, which includes a header data frame. Based on the release data stream, the current session flow type is determined. When the current session flow type is a session change flow, the steps for locating the status notification node and the session node associated with the status notification node include: obtaining the header data frame in the release data stream; parsing the header data frame to obtain the target address field in the header data frame; obtaining the address field hash value in the target address field and the destination address in the release data stream, and determining the current session flow type; using the address field hash value and the destination address as keys to search for the status notification node; and when the status notification node is found and the current session flow type is a session change flow, locating the session node associated with it through the status notification node.
[0012] Optionally, the steps for determining the current session flow type include: determining whether the data format of the target address field is a general type of the corresponding interface; if it is not a general type of the corresponding interface, then determining whether the data format of the target address field is the data format of the session change process of the corresponding interface; if the data format of the target address field is the data format of the session change process of the corresponding interface, then the current session flow type is a session change type.
[0013] Optionally, the release data stream includes a second stream data frame and a second data frame. The steps of extracting and parsing the resource status field of the release data stream in the session change process, and deleting the corresponding session node to release the current session when the parsing result of the resource status field is "release session", include: obtaining key-value pair information of the second data frame in the session change process of the current session; obtaining the resource status field based on the key-value pair information; obtaining the current notification status of the current session based on the resource status field; and deleting the session node corresponding to the current session to release the current session if the current notification status is "release session".
[0014] Optionally, the steps of obtaining the current notification status of the current session based on the resource status field, and deleting the session node corresponding to the current session to release the current session if the current notification status is session release, include: extracting and decrypting the resource status field to obtain the current notification status of the current session; if the current notification status is session release, obtaining the response information of the second stream data frame; obtaining the corresponding session release instruction based on the response information; and deleting the session node corresponding to the current session in response to the session release instruction to release the current session.
[0015] In a second aspect, embodiments of the present invention provide a network communication device, comprising: a processor and a memory, wherein the memory stores instructions; the processor invokes the instructions in the memory to cause the processor to execute the network communication session release method of any of the foregoing embodiments of the first aspect of the present invention.
[0016] The processor of the network communication device provided in this embodiment of the invention executes the network communication session release method of any of the foregoing embodiments of the first aspect of the invention by calling instructions in the memory. When the core network actively releases the session, it can find the associated session node through the status notification node and determine whether the core network needs to release the session. When the session needs to be released, the corresponding session node is deleted in time to release the session, so that the core network can release the session normally and ensure the integrity of the communication data processing flow.
[0017] Thirdly, embodiments of the present invention provide a computer-readable storage medium storing instructions that, when executed by a processor, implement the network communication session release method of any of the foregoing embodiments of the first aspect of the present invention.
[0018] The instructions stored in the computer-readable storage medium provided in the embodiments of the present invention can be called by a processor and executed by the network communication session release method of any of the foregoing embodiments of the first aspect of the present invention. When the core network actively releases a session, it finds the associated session node through the status notification node, determines whether the core network needs to release the session, and deletes the corresponding session node in a timely manner when the session needs to be released, so as to release the session and enable the core network to release the session normally, ensuring the integrity of the communication data processing flow. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.
[0020] Figure 1 This is a flowchart of an embodiment of the network communication session release method of the present invention; Figure 2 A flowchart illustrating the associated status notification node and session node in one embodiment of the network communication session release method of the present invention; Figure 3 This is a flowchart of step S102 in one embodiment of the network communication session release method of the present invention; Figure 4 This is a flowchart of step S104 in one embodiment of the network communication session release method of the present invention; Figure 5 This is a flowchart of step S105 in one embodiment of the network communication session release method of the present invention; Figure 6 This is a flowchart illustrating the associated status notification node and session node in one embodiment of the network communication session release method of the present invention. Figure 7 This is a flowchart of step S120 in one embodiment of the network communication session release method of the present invention; Figure 8 This is a flowchart of step S123 in one embodiment of the network communication session release method of the present invention; Figure 9 This is a flowchart of step S130 in one embodiment of the network communication session release method of the present invention; Figure 10 This is a flowchart of step S133 in one embodiment of the network communication session release method of the present invention; Figure 11This is a flowchart illustrating the release of the current session in one embodiment of the network communication session release method of the present invention. Figure 12 This is a block diagram illustrating the communication structure between the user terminal and the core network terminal in one embodiment of the network communication device of the present invention. Figure 13 This is a structural block diagram of one embodiment of the network communication device of the present invention.
[0021] Explanation of icon numbers: 210 - User terminal; 220 - Core network terminal; 300 - Network communication equipment; 301 - Processor; 302 - Memory; 303 - Communication interface; 304 - Bus. Detailed Implementation
[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0023] It should be noted that all directional indications in the embodiments of the present invention, such as up, down, left, right, front, back, etc., are only used to explain the relative positional relationship and movement of the components in a specific posture as shown in the attached figure. If the specific posture changes, the directional indication will also change accordingly.
[0024] Furthermore, the use of terms such as "first" and "second" in this invention is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature. Additionally, the technical solutions of the various embodiments can be combined with each other, but only on the basis of being achievable by those skilled in the art. When the combination of technical solutions is contradictory or impossible to implement, such a combination of technical solutions should be considered non-existent and not within the scope of protection claimed by this invention.
[0025] For ease of understanding, the network communication session release method of this invention embodiment is described below, such as... Figure 1 As shown, the network communication session release method in this embodiment of the invention includes steps S110 to S130.
[0026] In step S110, the release data stream of the current session in the core network is obtained.
[0027] After the user end and the core network end establish a communication connection, the user end usually actively ends the session and closes the session node. If the user end has ended the session but the session node between the user end and the core network end is still retained, such an extra session node will occupy the communication channel resources of the core network end.
[0028] In existing technologies, only the standard Release SM Context serviceoperation procedure is supported for session release between the user terminal and the core network terminal, such as releasing the session using the smContextRef field. However, in the SMContextStatusNotify procedure, the core network terminal is actively triggered to release the session. In this case, the target address field in the header data frame contains the content of the session status identification information exchanged between the two parties in the previous communication, and does not contain the smContextRef field, so the session cannot be released correctly.
[0029] In this embodiment, the smContextStatusUri field used by the core network in the initial data stream when the user terminal and the core network terminal establish a session is obtained. The smContextStatusUri status notification field is used to replace the smContextRef field as an association table entry between processes such as binding the session establishment process and the session release process. This allows the core network terminal to actively release the corresponding session when it receives the release data stream of the current session. The specific steps are as follows.
[0030] like Figure 2 As shown in this embodiment, before step S110, it is necessary to locate and associate the current session's status notification node with the session node. The location and association of the status notification node with the session node are achieved through the following steps: Step S101: Obtain the initial data stream when the user terminal and the core network terminal establish a session, wherein the initial data stream includes a first stream data frame and a first data frame.
[0031] Step S102: When the first flow data frame of the current session in the core network is the corresponding network protocol message, obtain the destination address field of the first flow data frame.
[0032] Step S103: When the target address field conforms to the corresponding interface standard format, obtain the key-value pair information of the first data frame in the current session.
[0033] Step S104: Based on the key-value pair information, establish a session node and obtain the corresponding session state identifier field.
[0034] Step S105: Based on the session state identifier field, establish a state notification node and associate the state notification node with the session node.
[0035] In this embodiment, the stream data frame is a stream frame, and the data frame is a DATA frame. The initial data stream is the network protocol data packet transmitted between the received user terminal and the core network terminal. For example, the initial data stream can be a network data packet transmitted using the HTTP / 2 network protocol. By reassembling and restoring the network data packets in the initial data stream, it is determined whether the header message type, length, etc. of the stream frame in the initial data stream meet the HTTP / 2 protocol specification. If they do, it proves that the initial data stream is an HTTP / 2 protocol message, and subsequent parsing of the initial data stream is performed. If they do not meet the specification, the packet reception is terminated. The steps for subsequent parsing of the initial data stream are as follows.
[0036] like Figure 3 As shown, further, in step S102, whether the first stream data frame is a corresponding network protocol message is determined based on the following steps: Step S1021: Obtain the header data frame and length information of the first stream data frame.
[0037] Step S1022: Verify whether the header data frame and length information conform to the network protocol of the corresponding interface. If they conform to the network protocol of the corresponding interface, confirm that the first-stream data frame is the corresponding network protocol message.
[0038] Furthermore, step S102 also includes steps S1023 to S1024.
[0039] In step S1023, if the target address field conforms to the corresponding interface standard format, the service request type corresponding to the target address field is obtained.
[0040] In step S1024, based on the service request type, it is determined whether a session node needs to be established, and if a session node needs to be established, the key-value pair information of the first data frame in the current session is obtained.
[0041] like Figure 4 As shown, step S104 further includes steps S1041 to S1042.
[0042] In step S1041, user information and session code for the current session are obtained based on key-value pair information. Specifically, the corresponding session state identifier field is also obtained based on the key-value pair information.
[0043] In step S1042, a session node is established based on user information and session code.
[0044] like Figure 5 As shown, step S105 further includes steps S1051 to S1054.
[0045] In step S1051, the status identifier address and the corresponding path field are obtained based on the session status identifier field.
[0046] In step S1052, the identifier hash value of the path field is calculated.
[0047] In step S1053, the status identifier address and identifier hash value are used as keys to establish a status notification node.
[0048] In step S1054, a mapping relationship between the status notification node and the session node is established, so that the status notification node and the session node are associated.
[0049] Specifically, in this application embodiment, the corresponding interface can be the N11 interface, the session node is the PDU session node, the corresponding session code is the PDU session ID, the service request type can be the service request URI format standard, the key-value pair information of the first data frame is JSON format information, and the header data frame is the Header frame of the corresponding stream frame.
[0050] The session creation process is the CreateSMContext process, the session status identifier field is the smContextStatusUri field, and the status identifier address and the corresponding path field are the IP address and Uri field in the smContextStatusUri field, respectively.
[0051] like Figure 6 As shown, in this embodiment, the HTTP2 traffic of the initial data stream is first parsed, and the corresponding format is parsed according to the message type of the first stream data frame to obtain the parsing context of the first stream data frame.
[0052] By using the parsing context corresponding to the header data frame in the first-stream data frame, and in accordance with the 3GPP specification, the target address field is used to determine whether it meets the service request URI format standard of the N11 interface. If it does, it is confirmed to be N11 interface traffic.
[0053] After confirming that it is N11 interface traffic, the system uses the confirmed N11 interface service request URI format standard to determine whether a session creation process is required in the initial data stream. If so, the system parses the JSON information in the first data frame of the N11 interface traffic to obtain the user information and PDU session code, and establishes a PDU session node.
[0054] The session status identifier field is parsed from the JSON information in the first data frame of the session creation process. The status identifier address and path fields in the session status identifier field are obtained, the identifier hash value of the path field is calculated, and the status identifier address and identifier hash value are used as key values to establish a status notification node.
[0055] Finally, a mapping relationship is established between the status notification node and the PDU session node, so that the status notification node and the PDU session node are associated.
[0056] In step S120, based on the release of the data stream, the current session flow type is determined. If the current session flow type is a session change flow, the status notification node is located and the session node associated with the status notification node is searched.
[0057] like Figure 7 As shown, in this embodiment, releasing the data stream includes a second stream data frame, which includes a header data frame.
[0058] Further, step S120 includes steps S121 to S125.
[0059] In step S121, the header data frame in the release data stream is obtained.
[0060] In step S122, the header data frame is parsed to obtain the target address field in the header data frame.
[0061] In step S123, the hash value of the address field in the target address field and the destination address in the released data stream are obtained, and the current session flow type is determined.
[0062] In step S124, the address field hash value and the destination address are used as keys to find the status notification node.
[0063] In step S125, when a status notification node is found and the current session flow type is a session change type, the session node associated with it is located through the status notification node.
[0064] Specifically, such as Figure 8 As shown, the steps to determine the current session flow type include: Step S1231: Determine whether the data format of the target address field is the general type of the corresponding interface.
[0065] Step S1232: If it is not the general type of the corresponding interface, then determine whether the data format of the target address field is the data format of the session change process of the corresponding interface. If the data format of the target address field is the data format of the session change process of the corresponding interface, then the current session process type is the session change type.
[0066] like Figure 11 As shown, in this embodiment, the HTTP2 traffic of the released data stream is first parsed, and the corresponding format is parsed according to the message type of the second stream data frame to obtain the parsing context of the second stream data frame.
[0067] By parsing the header data frame in the second stream data frame, the target address field is obtained. According to the 3GPP specification, it is determined whether the release data stream in the current session process is a general process type of the N11 interface. If not, it is further determined whether it is a session change process.
[0068] Calculate the hash value of the address field in the target address field and its corresponding destination address, where the destination address can be the IP address of the destination. Use the address field hash value and the destination address as keys to find the status notification node. If the status notification node can be found, it indicates that the current process is a session change process, and the PDU session node associated with the status notification node is located and obtained. If the status notification node does not exist, the process exits.
[0069] The session change process is the SMContextStatusNotify process, the corresponding interface can be the N11 interface, the session node is the PDU session node, the corresponding session code is the PDU session code, the service request type can be the service request URI format standard, the key-value pair information of the second data frame is JSON format information, and the header data frame is the Header frame of the corresponding stream frame.
[0070] In step S130, the resource status field of the release data stream in the session change process is extracted and parsed. When the parsing result of the resource status field is to release the session, the corresponding session node is deleted to release the current session.
[0071] In this embodiment, releasing the data stream includes a second stream data frame and a second data frame.
[0072] like Figure 9 As shown, step S130 further includes steps S131 to S133.
[0073] In step S131, the key-value pair information of the second data frame in the session change process of the current session is obtained.
[0074] In step S132, the resource status field is obtained based on the key-value pair information.
[0075] In step S133, the current notification status of the current session is obtained based on the resource status field. If the current notification status is "release session", the session node corresponding to the current session is deleted to release the current session.
[0076] Specifically, such as Figure 10 As shown, step S133 includes steps S1331 to S1333.
[0077] In step S1331, the resource status field is extracted and decrypted to obtain the current notification status of the current session. If the current notification status is session release, the response information of the second stream data frame is obtained.
[0078] In step S1332, the corresponding session release instruction is obtained based on the response information.
[0079] In step S1333, in response to the session release command, the session node corresponding to the current session is deleted to release the current session.
[0080] In this embodiment, as Figure 11 As shown, the resource status field is parsed from the JSON information of the DATA frame in the current session change process to determine whether the current notification status is a session release status. If it is a session release status, it means that the session change process is notifying the release of PDU session nodes, and the associated PDU session nodes are marked for deletion; otherwise, the process exits.
[0081] Before deleting a PDU session node, the system determines whether the session is confirmed based on the response code in the response packet of the current second stream data frame. If the parsing result of the response code is a confirmation of release (for example, the response code is usually set to 204; if the parsed response code is 204, it proves that the session has been confirmed to be released), the corresponding PDU session node is deleted; otherwise, the process exits directly.
[0082] The resource status field is the resourceStatus field. By parsing the resource status field, if the resource status field contains the RELEASED field, it proves that the current notification status is the release session status; otherwise, it is not.
[0083] The network communication session release method provided in this embodiment of the invention includes: obtaining the release data stream of the current session in the core network; determining the current session flow type based on the release data stream; when the current session flow type is a session change flow, locating the status notification node and the session node associated with the status notification node; extracting and parsing the resource status field of the release data stream in the session change flow; when the parsing result of the resource status field is a session release, deleting the corresponding session node to release the current session.
[0084] The network communication session release method provided in this embodiment of the invention can find the associated session node through the status notification node when the core network actively releases the session, and determine whether the core network needs to release the session. When the session needs to be released, the corresponding session node is deleted in time to release the session, so that the core network can release the session normally and ensure the integrity of the communication data processing flow.
[0085] In addition to the above method embodiments, the present invention also provides, for example, Figure 12 and Figure 13 A network communication device 300 is shown, including a processor 301 and a memory 302. The memory 302 stores instructions. The processor 301 calls the instructions in the memory 302 to execute the network communication session release method of any of the foregoing embodiments of the present invention.
[0086] In this embodiment, when the user terminal 210 and the core network terminal 220 establish a session, the network communication device 300 acquires the initial data stream, establishes a session node and a status notification node based on the initial data stream, and associates the status notification node with the session node. When the core network terminal 220 wants to actively close the session between the user terminal 210 and the core network terminal 220, the network communication device 300 locates the session node corresponding to the current session through the status notification node based on the received release data stream and deletes the session node, thereby realizing the core network terminal's active release of the session.
[0087] The network communication session release method provided in the above embodiments of the present invention includes: obtaining the release data stream of the current session in the core network; determining the current session flow type based on the release data stream; when the current session flow type is a session change flow, locating the status notification node and the session node associated with the status notification node; extracting and parsing the resource status field of the release data stream in the session change flow; when the parsing result of the resource status field is a session release, deleting the corresponding session node to release the current session.
[0088] The network communication device 300 provided in this embodiment of the invention, by implementing the above method, can find the associated session node through the status notification node when the core network actively releases the session, and determine whether the core network needs to release the session. When the session needs to be released, the corresponding session node is deleted in a timely manner to release the session, so that the core network can release the session normally and ensure the integrity of the communication data processing flow.
[0089] Furthermore, the network communication device 300 provided in this embodiment of the invention may also include a communication interface 303 and a bus 304, with the processor 301, memory 302 and communication interface 303 electrically connected via the bus 304.
[0090] The memory 302 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 303 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc. The bus 304 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 13 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0091] Processor 301 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 301 or by instructions in software form. Processor 301 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 302. The processor 301 reads the information in memory 302 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.
[0092] This invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of the above-described network communication session release method.
[0093] The computer-readable storage medium provided in this embodiment of the invention stores data and computer-executable instructions for the network communication session release method described above. The network communication session release method of the above embodiment includes: obtaining the release data stream of the current session in the core network; determining the current session flow type based on the release data stream; when the current session flow type is a session change flow, locating the status notification node and the session node associated with the status notification node; extracting and parsing the resource status field of the release data stream in the session change flow; when the parsing result of the resource status field is a session release, deleting the corresponding session node to release the current session.
[0094] The computer-readable storage medium provided in this embodiment of the invention, by implementing the above method, can find the associated session node through the status notification node when the core network actively releases the session, and determine whether the core network needs to release the session. When the session needs to be released, the corresponding session node is deleted in a timely manner to release the session, so that the core network can release the session normally and ensure the integrity of the communication data processing flow.
[0095] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the following method steps: Step S110: Obtain the release data stream of the current session in the core network.
[0096] Step S120: Based on the release of the data stream, determine the current session flow type. If the current session flow type is a session change flow, locate the status notification node and the session node associated with the status notification node.
[0097] Step S130: Extract and parse the resource status field of the release data stream in the session change process. When the parsing result of the resource status field is "release session", delete the corresponding session node to release the current session.
[0098] The computer program product provided in this embodiment of the invention, by implementing the above method, can find the associated session node through the status notification node when the core network actively releases the session, and determine whether the core network needs to release the session. When the session needs to be released, the corresponding session node is deleted in a timely manner to release the session, so that the core network can release the session normally and ensure the integrity of the communication data processing flow.
[0099] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0100] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0101] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for releasing a network communication session, characterized in that, include: Obtain the release data stream of the current session in the core network; Based on the released data stream, determine the current session flow type. If the current session flow type is a session change flow, locate the status notification node and the session node associated with the status notification node. Extract and parse the resource status field of the released data stream in the session change process. When the parsing result of the resource status field is "release session", delete the corresponding session node to release the current session.
2. The network communication session release method according to claim 1, characterized in that, The status notification node is associated with the session node through the following steps: The initial data stream is obtained when the user terminal and the core network terminal establish a session, wherein the initial data stream includes a first stream data frame and a first data frame; When the first stream data frame of the current session in the core network is a corresponding network protocol message, the destination address field of the first stream data frame is obtained; When the target address field conforms to the corresponding interface standard format, the key-value pair information of the first data frame in the current session is obtained; Based on the key-value pair information, a session node is established, and the corresponding session status identifier field is obtained; Based on the session status identifier field, a status notification node is established, and the status notification node is associated with the session node.
3. The network communication session release method according to claim 2, characterized in that, The steps for obtaining the key-value pair information of the first data frame in the current session include: When the target address field conforms to the corresponding interface standard format, obtain the service request type corresponding to the target address field; Based on the service request type, determine whether it is necessary to establish the session node, and if it is necessary to establish the session node, obtain the key-value pair information of the first data frame in the current session.
4. The network communication session release method according to claim 2, characterized in that, The step of establishing a status notification node based on the session status identifier field and associating the status notification node with the session node includes: Based on the session status identifier field, obtain the status identifier address and the corresponding path field; Calculate the identifier hash value of the path field; The status notification node is established using the status identifier address and the identifier hash value as keys. Establish a mapping relationship between the status notification node and the session node, so that the status notification node is associated with the session node.
5. The network communication session release method according to claim 1, characterized in that, The released data stream includes a second stream data frame, the second stream data frame includes a header data frame, and the step of determining the current session flow type based on the released data stream, and when the current session flow type is a session change flow, locating the status notification node and the session node associated with the status notification node includes: Obtain the header data frame from the released data stream; Parse the header data frame to obtain the target address field in the header data frame; Obtain the hash value of the address field in the target address field and the destination address in the released data stream, and determine the current session flow type; Use the hash value of the address field and the destination address as keys to find the status notification node; When the status notification node is found and the current session flow type is session change type, the session node associated with it is located through the status notification node.
6. The network communication session release method according to claim 5, characterized in that, The steps to determine the current session flow type include: Determine whether the data format of the target address field is a general type of the corresponding interface; If the target address field is not a general type of the corresponding interface, then it is determined whether the data format of the target address field is the data format of the session change process of the corresponding interface. If the data format of the target address field is the data format of the session change process of the corresponding interface, then the current session process type is a session change type.
7. The network communication session release method according to claim 1, characterized in that, The release data stream includes a second stream data frame and a second data frame. The step of extracting and parsing the resource status field of the release data stream in the session change process, and deleting the corresponding session node to release the current session when the parsing result of the resource status field is "release session", includes: Obtain the key-value pair information of the second data frame in the session change process of the current session; Based on the key-value pair information, the resource status field is obtained; Based on the resource status field, the current notification status of the current session is obtained. If the current notification status is "session release", the session node corresponding to the current session is deleted to release the current session.
8. The network communication session release method according to claim 7, characterized in that, The step of obtaining the current notification status of the current session based on the resource status field, and deleting the session node corresponding to the current session to release the current session if the current notification status is "session released" includes: Extract and decode the resource status field to obtain the current notification status of the current session. If the current notification status is session release, obtain the response information of the second stream data frame. Based on the response information, obtain the corresponding session release command; In response to the session release command, the session node corresponding to the current session is deleted to release the current session.
9. A network communication device, characterized in that, The network communication device includes: a processor and a memory, wherein the memory stores instructions; The processor invokes the instructions in the memory to cause the network communication device to implement the network communication session release method as described in any one of claims 1 to 8.
10. A computer-readable storage medium storing instructions thereon, characterized in that, When the instruction is executed by the processor, it implements the network communication session release method as described in any one of claims 1 to 8.