CN114051047B - Session message backup method and device, network equipment and storage medium - Google Patents

Session message backup method and device, network equipment and storage medium Download PDF

Info

Publication number
CN114051047B
CN114051047B CN202111272142.XA CN202111272142A CN114051047B CN 114051047 B CN114051047 B CN 114051047B CN 202111272142 A CN202111272142 A CN 202111272142A CN 114051047 B CN114051047 B CN 114051047B
Authority
CN
China
Prior art keywords
session
key value
value pair
message
current
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.)
Active
Application number
CN202111272142.XA
Other languages
Chinese (zh)
Other versions
CN114051047A (en
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.)
Eversec Beijing Technology Co Ltd
Original Assignee
Eversec Beijing Technology Co 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 Eversec Beijing Technology Co Ltd filed Critical Eversec Beijing Technology Co Ltd
Priority to CN202111272142.XA priority Critical patent/CN114051047B/en
Publication of CN114051047A publication Critical patent/CN114051047A/en
Application granted granted Critical
Publication of CN114051047B publication Critical patent/CN114051047B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

The embodiment of the invention discloses a method and a device for backing up session messages, wherein the method comprises the following steps: the main user port functional module responds to the acquired session message based on the message forwarding control protocol, acquires a current session key value pair according to the current session message, and sends the current session key value pair to the backup service module; the backup service module adds the current session key value pair into the annular queue, and performs session integration on the session key value pair in the annular queue according to a preset trigger condition; and the standby user port functional module reads the key value of the session key value pair in the annular queue. According to the technical scheme provided by the embodiment of the invention, the data volume of the session messages to be backed up in the annular queue is greatly reduced, and meanwhile, after the starting delay or downtime restarting occurs, the standby user port functional module can rapidly read the session messages in the annular queue, so that the backup efficiency of the session messages is improved, and the occupation of access resources of the standby user port functional module is reduced.

Description

Session message backup method and device, network equipment and storage medium
Technical Field
The embodiment of the invention relates to a network transmission technology, in particular to a method, a device, network equipment and a storage medium for backing up session messages.
Background
A packet forwarding control protocol (Packet Forwarding Control Protocol, PFCP) is a communication protocol used by the N4 interface between a session management function (Session Management Function, SMF) and a user port function (User Port Function, UPF) in a 4G core network or a 5G core network for control plane to user plane interactions.
In the prior art, the backup mode of session messages based on the PFCP is usually implemented by a main-standby database or a dual-machine hot standby system, but the backup mode is delayed once the standby machine is started or restarted after the standby machine is down, so that the standby machine needs to read a large number of session messages, and in the read large number of session messages, a plurality of multiple session operations aiming at the same session message exist, thereby greatly reducing the backup efficiency of the session messages based on the PFCP and occupying a large number of access resources of the standby machine.
Disclosure of Invention
The embodiment of the invention provides a session message backup method, a device, network equipment and a storage medium, so that a UPF network element realizes session message backup based on PFCP.
In a first aspect, an embodiment of the present invention provides a method for backing up a session message, including:
the main user port functional module responds to the acquired session message based on the message forwarding control protocol, acquires a current session key value pair according to the current session message, and sends the current session key value pair to the backup service module; wherein the key name of the current session key value pair comprises a session endpoint identification of the current session message;
the backup service module adds the current session key value pair into a ring queue, and performs session integration on the session key value pair in the ring queue according to a preset trigger condition; wherein, the session integration comprises session merging and/or session deletion;
and the standby user port functional module reads the key value of the session key value pair in the annular queue.
In a second aspect, an embodiment of the present invention provides a backup device for a session message, including:
the current session key value pair acquisition module is integrated with the main user port function module and is used for responding to the acquired session message based on the message forwarding control protocol, acquiring the current session key value pair according to the current session message and transmitting the current session key value pair to the backup service module; wherein the key name of the current session key value pair comprises a session endpoint identification of the current session message;
the session integration execution module is integrated with the backup service module and is used for adding the current session key value pair into a ring queue and performing session integration on the session key value pair in the ring queue according to a preset trigger condition; wherein, the session integration comprises session merging and/or session deletion;
and the key value reading module is integrated with the standby user port functional module and is used for reading the key value of the session key value pair in the annular queue by the standby user port functional module.
In a third aspect, an embodiment of the present invention further provides a network device, including:
one or more processors;
a storage means for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for backing up session messages according to any embodiment of the present invention.
In a fourth aspect, embodiments of the present invention further provide a storage medium containing computer-executable instructions that, when executed by a computer processor, implement a method for backing up session messages according to any embodiment of the present invention.
According to the technical scheme provided by the embodiment of the invention, the main user port functional module acquires the session key value pair according to the acquired session message based on the message forwarding control protocol and sends the session key value pair to the backup service module, the backup service module adds the session key value pair into the annular queue and integrates the session key value pair in the annular queue according to the preset triggering condition, so that the data volume of the session message to be backed up in the annular queue is greatly reduced, and meanwhile, the standby user port functional module can quickly read the session message in the annular queue after the starting delay or the downtime restarting occurs, thereby improving the backup efficiency of the session message and reducing the occupation of access resources of the standby user port functional module.
Drawings
Fig. 1A is a schematic structural diagram of a UPF network element provided in the present invention;
FIG. 1B is a flowchart of a method for backing up session messages according to an embodiment of the present invention;
FIG. 1C is a schematic diagram of a backup service module according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for backing up session messages according to a second embodiment of the present invention;
fig. 3 is a flowchart of a method for backing up session messages according to a third embodiment of the present invention;
fig. 4 is a block diagram of a backup device for session messages according to a fourth embodiment of the present invention;
fig. 5 is a block diagram of a network device according to a fifth embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
The backup method of the session message provided by the invention can be applied to an application scene shown in fig. 1A, and is realized by a UPF network element in fig. 1A, wherein the UPF network element provides unique IP (Internet Protocol ) addresses and ports for the outside, and comprises a main UPF module, a backup UPF module and a backup service module; the main UPF module is used for executing the main function of the UPF network element, namely receiving and processing the session code stream based on the PFCP sent by the SMF network element through the N4 interface; the backup UPF module is used for replacing the main UPF module when the main UPF module is abnormal, becoming a new main UPF module and executing the main functions so as to ensure the high availability of UPF network elements; the backup service module is used for backing up the session message so as to ensure the integrity of the session message in the UPF module; after the main UPF module is started, a TCP (Transmission Control Protocol ) connection based on Socket is established with the backup service module so as to ensure the transmission of session messages; after the UPF module is started, the TCP connection based on Socket is established with the backup service module.
Example 1
Fig. 1B is a flowchart of a session message backup method provided in the first embodiment of the present invention, where the embodiment is applicable to a case where a UPF network element backs up session messages based on PFCP, where the method may be performed by a session message backup device in the embodiment of the present invention, where the device may be implemented by software and/or hardware and integrated on a UPF network element, where the UPF network element may be integrated in a network device such as a server, a switch, or a router, and the method specifically includes the following steps:
s110, the main user port functional module responds to the acquired session information based on the message forwarding control protocol, acquires a current session key value pair according to the current session information, and sends the current session key value pair to the backup service module; wherein the key name of the current session key value pair includes a session endpoint identification of the current session message.
The SMF network element and the UPF network element transmit data streams through session code streams based on PFCP; the session code stream based on the PFCP specifically comprises MAC (Media Access Control) address, IP address, UDP (User Datagram Protocol ) message and PFCP message; the master UPF module creates a local PFCP session message structure according to the acquired session code stream based on the PFCP, and saves the session message acquired by analyzing the session code stream in the local PFCP session message structure.
After the current session message is acquired, the main UPF module takes the session endpoint identifier of the current session message as the key name of the current session key value pair; wherein, the session endpoint identifier (Session Endpoint Identifier, SEID) is data information stored in the SEID field in the session message based on the PFCP; the PFCP endpoint (i.e. the SMF network element in the embodiment of the present invention) needs to use the locally allocated SEID value when sending the session message to the opposite PFCP endpoint (i.e. the UDF network element in the embodiment of the present invention), and adds the SEID value into the session message to be used as the identification information of the session message, and different PFCP session messages can be distinguished through the session endpoint identification; meanwhile, after the current session message is acquired, the master UPF module may use the current session message itself as a key value of the current session key value pair.
Optionally, in an embodiment of the present invention, the obtaining, by the main user port function module, a current session key value pair according to a current session message includes: the main user port function module obtains the session type of the current session message according to the message type identification of the current session message; if the session type is session creation, the main user port function module takes the current session message as a key value of a current session key value pair; if the session type is session modification, the main user port function module obtains a matched historical session message according to the session endpoint identification of the current session message, and obtains a key value of a current session key value pair according to the historical session message and the current session message; and if the session type is session deletion, the main user port function module sets the key value of the current session key value pair to be null.
Specifically, the Type identifier is data information stored in a Message Type field in the session Message based on the PFCP, and reflects the session Type of the session Message, for example, when the Type identifier is "1", "2" and "3", the session Type is session creation, session modification and session deletion respectively; session creation, i.e. creating a new session message; session modification, namely modifying the existing session message; deleting the session, namely deleting the existing session message; if the session type is session creation, it indicates that the history information of the current session message does not exist in the local session message, so that the session message itself is directly used as the key value of the current session key value pair; if the session type is session modification, it indicates that the history information of the current session message already exists in the local session message, and because the session modification is performed on the history information, the current session message may not include the complete session content itself, but only includes the session content of the portion to be modified, for example, the session message is "create character string ABCDEFG" when created, and the current session message is "replace initial to M", thereby, according to the session endpoint identifier, acquiring the history session message matched with the current session message, and according to the history session message and the current session message, acquiring the modified complete session content together, and using the modified session content as the key value of the current session key value pair to ensure the integrity of the session content in the key value of each session key value pair; if the session type is session deletion, the key value of the current session key value pair is set to be null so as to reduce the data transmission quantity between the main UPF module and the backup service module.
S120, the backup service module adds the current session key value pair into a ring queue, and performs session integration on the session key value pair in the ring queue according to a preset trigger condition; wherein the session integration includes session merging and/or session deletion.
The annular queue is an ordered list based on an array, and follows the principle of first-in first-out, namely, firstly stored data are firstly taken out and then taken out after the stored data, and each message is stored with an offset; the main UPF module stores each session key value pair in a sequential writing mode, and the standby UPF module also takes out each session key value pair in a sequential reading mode. When the backup service module integrates the session key value pairs in the annular queue, if the main UPF module does not acquire the session type, the acquired session message is directly used as a key value, the backup service module needs to determine an execution result of the key value according to the key values of all the session key value pairs under the key name, takes the execution result as the key value of the target session key value pair with the time closest to the current moment under the key name, sets an invalid mark for other session key value pairs under the key name, so that the standby UPF module is started in a delayed mode or is restarted after downtime, the session key value pair with the invalid mark is not read when the session message is read, namely, the standby UPF module only reads the key value of the target session key value pair under the key name, the reading efficiency of the Gao Bei UPF module is improved, and the occupation of the access resources of the standby UPF module is reduced.
For example, one key name includes 3 session key value pairs sequentially stored, wherein the key values are sequentially "create a string ABCDEFG", "modify initial letter into M", "modify tail letter into N", obviously, the execution result of the key values is "acquire string MBCDEFN", set "acquire string MBCDEFN" as the key value of the 3 rd session key value pair, and set invalid marks for the 1 st session key value pair and the 2 nd session key value pair, and the standby UPF module does not read the 1 st session key value pair and the 2 nd session key value pair when reading the session key value pair, but the session key value pair with the invalid marks still occupies the original memory space; if the key name also comprises a 4 th conversation key value pair which is stored in sequence, and the key value is null, an invalid mark is set for the 1 st conversation key value pair, the 2 nd conversation key value pair and the 3 rd conversation key value pair, and when the conversation is deleted, the 4 th conversation key value pair with the null key value, the 1 st conversation key value pair with the invalid mark, the 2 nd conversation key value pair and the 3 rd conversation key value pair are deleted, and the deleted conversation key value pair does not occupy the memory space any more.
In particular, as described in the above technical solution, if the master UPF module has obtained the key value in different manners according to the difference of the session types, that is, according to the difference of the session types, the current session message is taken as the key value, or the current session key value pair is obtained according to the history session message and the current session message, or the key value is set to be null, it is obvious that the key value obtained in the above manner already includes the complete session content, so that the key value of the session key value pair with the time closest to the current moment is added under the same key name, that is, the session result under the key name; for example, one key name includes 3 session key value pairs sequentially stored, where the key values are "create string ABCDEFG", "acquire string MBCDEFG", and "acquire string MBCDEFN", and when the session key value pairs are combined, an invalid flag is set for each of the 1 st session key value pair and the 2 nd session key value pair, and the standby UPF module reads only the key value of the 3 rd session key value pair; and if the key name also comprises a 4 th conversation key value pair which is sequentially stored and has a null key value, setting invalid marks for the 1 st conversation key value pair, the 2 nd conversation key value pair and the 3 rd conversation key value pair, and deleting the 4 th conversation key value pair with the null key value, the 1 st conversation key value pair with invalid marks, the 2 nd conversation key value pair and the 3 rd conversation key value pair when the conversation is deleted.
Optionally, in an embodiment of the present invention, the method further includes: the method further comprises the steps of: the backup service module obtains a dominant backup service unit in a plurality of backup service units through a zookeeper management unit; the backup service module adds the current session key value pair into a ring queue, and specifically comprises the following steps: and the backup service module adds the current session key value pair into the annular queue of the dominant backup service unit, and synchronizes the current session key value pair to other backup service units through the dominant backup service unit.
Specifically, the Zookeeper is a distributed application coordination service of distributed open source codes, and provides consistency service for distributed applications; the backup service module interacts the election message of each backup service unit through a Zookeeper management unit, in the Zookeeper management unit, the backup service unit which is successfully created by the node is used as a leading backup service unit (i.e. a Leader), other backup service units are used as auxiliary backup service units (i.e. a Follower), and the IP address and the port of the Leader are recorded through the Zookeeper management unit; when the Leader is down, based on an election mechanism among all the fouows, electing a new Leader and creating a node of the new Leader on a Zookeeper management unit; the Leader is mainly used for backing up session messages based on PFCP sent by UPF, and the Follower is used for ensuring high availability of backup service. After the session key value pair sent by the main UPF module is obtained, the backup service module adds the session key value pair into a ring queue of the Leader, and then synchronizes the session key value pair to the Follower in a real-time sending manner through the Leader, or synchronizes the session key value pair to the Follower in a batch sending manner, so that the performance loss of the backup service module is reduced; in fig. 1C, the backup service module includes three backup service units as an example.
Optionally, in an embodiment of the present invention, the session integration is performed on the session key value pair in the ring queue by the backup service module according to a preset trigger condition, including: according to preset merging conditions, carrying out session merging on session key value pairs in the annular queue; the preset merging conditions comprise a preset merging period and/or a preset merging threshold value; and/or according to a preset deleting condition, performing session deletion on session key value pairs in the annular queue; the preset deleting conditions comprise a preset deleting period and/or a preset deleting threshold value.
The backup service module can execute session integration operation according to a preset period, namely, each interval is of fixed duration, and can integrate session key value pairs in the annular queue, or can integrate session key value pairs in the annular queue according to a preset threshold, namely, each time a session key value pair with a preset threshold is added in the annular queue; wherein, merging, namely, the process of replacing the previously stored session key value pair by the later stored session key value pair, wherein the replaced session key value pair is provided with an invalid mark, and the subsequent consumer (namely, the standby UPF module) cannot read the session key value pair with the invalid mark; deleting, namely, the process of later storing the conversation key value pair to cover the conversation key value pair stored first, deleting the covered current conversation key value pair from the annular queue, and then deleting the conversation key value pair stored since the key value is empty from the annular queue; particularly, in the embodiment of the invention, the preset deletion period is greater than the preset merge period, and the preset deletion threshold is greater than the preset merge threshold.
Optionally, in an embodiment of the present invention, the session integration is performed on session key value pairs in the ring queue, and the method further includes: and according to the joining time of the session key value pairs in the annular queue, performing session integration on the non-active session key value pairs in the annular queue. The inactive session key value pair refers to a session key value pair with a joining time distance from the current moment being greater than a preset time threshold, and the active session key value pair refers to a session key value pair with a joining time distance from the current moment being less than or equal to the preset time threshold, that is, the inactive session key value pair has been substantially joined to the ring queue for a long time, and generally all related session operations have been completed, and the active session key value pair may have subsequent session operations due to a late joining time, so that session integration is performed only for the inactive session key value pair, so as to reduce the number of session key value pairs to be processed, and improve the integration efficiency of the session key value pair in the ring queue.
S130, the standby user port function module reads the key value of the session key value pair in the annular queue.
According to the technical scheme provided by the embodiment of the invention, the main user port functional module acquires the session key value pair according to the acquired session message based on the message forwarding control protocol and sends the session key value pair to the backup service module, the backup service module adds the session key value pair into the annular queue and integrates the session key value pair in the annular queue according to the preset triggering condition, so that the data volume of the session message to be backed up in the annular queue is greatly reduced, and meanwhile, the standby user port functional module can quickly read the session message in the annular queue after the starting delay or the downtime restarting occurs, thereby improving the backup efficiency of the session message and reducing the occupation of access resources of the standby user port functional module.
Example two
Fig. 2 is a flowchart of a session message backup method provided in a second embodiment of the present invention, where the embodiment of the present invention is embodied on the basis of the foregoing technical solution, and specifically the method includes the following steps:
s210, the backup service module judges whether to combine the session of the session key value pair in the annular queue according to the preset combining condition; if yes, executing S220; if not, S230 is performed.
S220, according to the joining time of the session key value pairs in the annular queue, carrying out session merging on the non-active session key value pairs in the annular queue; s230 is performed.
And merging the session key value pairs with the same key name, only reserving the newly added session key value pair, throwing the merged data into a memory, and setting an invalid mark.
S230, the backup service module judges whether to perform session deletion on session key value pairs in the annular queue according to a preset deletion condition; if yes, executing S240; if not, S210 is performed.
S240, according to the joining time of the session key value pairs in the annular queue, performing session deletion on the non-active session key value pairs in the annular queue; s210 is performed.
And deleting the session key value with the invalid mark and the session key value pair with the empty key value, and merging the empty memories formed by the annular queues after deletion.
According to the technical scheme provided by the embodiment of the invention, the backup service module performs session merging on the session key value pairs in the annular queue according to the preset merging condition, performs session deletion on the session key value pairs in the annular queue according to the preset deleting condition, reduces the data volume of the session key value pairs in the annular queue, further reduces the backup data volume read by the backup UPF module, and simultaneously, further reduces the number of the session key value pairs to be processed and improves the integration efficiency of the session key value pairs in the annular queue through the integration processing of the inactive session key value pairs.
Example III
Fig. 3 is a flowchart of a session message backup method provided in a third embodiment of the present invention, where the embodiment of the present invention is embodied based on the above technical solution, and specifically includes the following steps:
as shown in fig. 3, after the primary UPF module and the backup UPF module are synchronously started, the SMF network element sends a session code stream based on PFCP to the primary UPF module; the master UPF module acquires a session message according to the acquired session code stream; the main UPF module acquires a current session key value pair according to the current session message and sends the current session key value pair to the standby service module; the standby service module adds the current session key value pair into the annular queue; because the main UPF module and the standby UPF module are synchronously started, hot data, namely active session key value pairs, are arranged between the main UPF module and the standby UPF module, and the session key value pairs read by the standby UPF module are not integrated through the session of the standby service module;
when the standby UPF module is in downtime restart or communication delay, the standby UPF module needs to re-read the session key value pair in the standby service module, and at this time, because the reading progress of the standby UPF module lags the writing progress of the main UPF module, the standby service module may have the inactive session key value pair, and the standby service module has integrated the inactive session key value pair in the ring queue, and the standby UPF module reads the inactive session key value pair and the inactive session key value pair.
According to the technical scheme provided by the embodiment of the invention, the main user port functional module acquires the session key value pair according to the acquired session message based on the message forwarding control protocol, and sends the session key value pair to the backup service module, the backup service module adds the session key value pair into the annular queue, and integrates the session key value pair in the annular queue according to the preset trigger condition, so that the data volume of the session message to be backed up in the annular queue is greatly reduced, and meanwhile, the standby user port functional module can quickly read the session message in the annular queue after the starting delay or the downtime restarting occurs, thereby improving the backup efficiency of the session message and reducing the occupation of access resources of the standby user port functional module.
Example IV
Fig. 4 is a block diagram of a session message backup device according to a fourth embodiment of the present invention, where the device specifically includes: a current session key pair acquisition module 410, a session integration execution module 420, and a key reading module 430.
The current session key value pair obtaining module 410 is integrated with the main user port function module, and is configured to obtain a current session key value pair according to a current session message in response to obtaining a session message based on a message forwarding control protocol, and send the current session key value pair to the backup service module; wherein the key name of the current session key value pair comprises a session endpoint identification of the current session message;
the session integration execution module 420 is integrated with the backup service module, and is configured to add the current session key value pair to a ring queue, and perform session integration on the session key value pair in the ring queue according to a preset trigger condition; wherein, the session integration comprises session merging and/or session deletion;
the key value reading module 430 is integrated with the spare user port functional module, and is configured to read the key value of the session key value pair in the ring queue by the spare user port functional module.
According to the technical scheme provided by the embodiment of the invention, the main user port functional module acquires the session key value pair according to the acquired session message based on the message forwarding control protocol and sends the session key value pair to the backup service module, the backup service module adds the session key value pair into the annular queue and integrates the session key value pair in the annular queue according to the preset triggering condition, so that the data volume of the session message to be backed up in the annular queue is greatly reduced, and meanwhile, the standby user port functional module can quickly read the session message in the annular queue after the starting delay or the downtime restarting occurs, thereby improving the backup efficiency of the session message and reducing the occupation of access resources of the standby user port functional module.
Optionally, based on the above technical solution, the current session key value pair obtaining module 410 includes:
a session type obtaining unit, configured to obtain a session type of a current session message according to a message type identifier of the current session message;
and the key value acquisition unit is used for taking the current session message as the key value of the current session key value pair if the session type is session creation.
Optionally, on the basis of the above technical solution, the key value obtaining unit is further configured to obtain a matched historical session message according to the session endpoint identifier of the current session message if the session type is session modification, and obtain a key value of the current session key value pair according to the historical session message and the current session message.
Optionally, on the basis of the above technical solution, the key value obtaining unit is further configured to set a key value of a current session key value pair to be null if the session type is session deletion.
Optionally, based on the above technical solution, the backup device for session messages further includes:
and the dominant backup service unit acquisition module is integrated with the backup service module and is used for acquiring the dominant backup service unit in the plurality of backup service units through the zookeeper management unit.
Optionally, based on the above technical solution, the session integration execution module 420 is specifically configured to add the current session key pair to the ring queue of the master backup service unit, and synchronize the current session key pair to other backup service units through the master backup service unit.
Optionally, based on the above technical solution, the session integration execution module 420 is specifically configured to perform session merging on the session key value pairs in the ring queue according to a preset merging condition; the preset merging conditions comprise a preset merging period and/or a preset merging threshold value; and/or according to a preset deleting condition, performing session deletion on session key value pairs in the annular queue; the preset deleting conditions comprise a preset deleting period and/or a preset deleting threshold value.
Optionally, based on the above technical solution, the session integration execution module 420 is specifically further configured to perform session integration on the inactive session key value pair in the ring queue according to the joining time of the session key value pair in the ring queue.
The device can execute the session message backup method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. Technical details which are not described in detail in this embodiment can be referred to the method for backing up session messages provided in any embodiment of the present invention.
Example five
Fig. 5 is a schematic structural diagram of a network device according to a fifth embodiment of the present invention. Fig. 5 illustrates a block diagram of an exemplary network device 12 suitable for use in implementing embodiments of the present invention. The network device 12 shown in fig. 5 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 5, the network device 12 is in the form of a general purpose computer device. The components of network device 12 may include, but are not limited to: one or more processors or processing units 16, a memory 28, and a bus 18 that connects the various system components, including the memory 28 and the processing unit 16.
Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, and a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Network device 12 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by network device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and/or cache memory 32. Network device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, commonly referred to as a "hard disk drive"). Although not shown in fig. 5, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 18 through one or more data medium interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored in, for example, memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
Network device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with network device 12, and/or any devices (e.g., network card, modem, etc.) that enable network device 12 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 22. Also, network device 12 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, via network adapter 20. As shown, network adapter 20 communicates with other modules of network device 12 over bus 18. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with network device 12, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processing unit 16 executes various functional applications and data processing by running programs stored in the memory 28, for example, implementing the backup method of session messages provided by the embodiment of the present invention. Namely: the main user port functional module responds to the acquired session message based on the message forwarding control protocol, acquires a current session key value pair according to the current session message, and sends the current session key value pair to the backup service module; wherein the key name of the current session key value pair comprises a session endpoint identification of the current session message; the backup service module adds the current session key value pair into a ring queue, and performs session integration on the session key value pair in the ring queue according to a preset trigger condition; wherein, the session integration comprises session merging and/or session deletion; and the standby user port functional module reads the key value of the session key value pair in the annular queue.
Example six
The sixth embodiment of the present invention further provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method for backing up session messages according to any embodiment of the present invention; the method comprises the following steps:
the main user port functional module responds to the acquired session message based on the message forwarding control protocol, acquires a current session key value pair according to the current session message, and sends the current session key value pair to the backup service module; wherein the key name of the current session key value pair comprises a session endpoint identification of the current session message;
the backup service module adds the current session key value pair into a ring queue, and performs session integration on the session key value pair in the ring queue according to a preset trigger condition; wherein, the session integration comprises session merging and/or session deletion;
and the standby user port functional module reads the key value of the session key value pair in the annular queue.
The computer storage media of embodiments of the invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (10)

1. The backup method of the session message is characterized by being applied to a user port function network element and comprising the following steps:
the main user port functional module responds to the acquired session message based on the message forwarding control protocol, acquires a current session key value pair according to the current session message, and sends the current session key value pair to the backup service module; wherein the key name of the current session key value pair comprises a session endpoint identification of the current session message;
the backup service module adds the current session key value pair into a ring queue, and performs session integration on the session key value pair in the ring queue according to a preset trigger condition; wherein, the session integration comprises session merging and/or session deletion;
and the standby user port functional module reads the key value of the session key value pair in the annular queue.
2. The method of claim 1, wherein the master user port function module obtains a current session key value pair from a current session message, comprising:
the main user port function module obtains the session type of the current session message according to the message type identification of the current session message;
and if the session type is session creation, the main user port function module takes the current session message as a key value of a current session key value pair.
3. The method of claim 2, wherein after the primary user port function module obtains the session type of the current session message according to the message type identification of the current session message, further comprising:
and if the session type is session modification, the main user port function module acquires a matched historical session message according to the session endpoint identification of the current session message, and acquires a key value of a current session key value pair according to the historical session message and the current session message.
4. The method of claim 2, wherein after the primary user port function module obtains the session type of the current session message according to the message type identification of the current session message, further comprising:
and if the session type is session deletion, the main user port function module sets the key value of the current session key value pair to be null.
5. The method according to claim 1, wherein the method further comprises:
the backup service module obtains a dominant backup service unit in a plurality of backup service units through a zookeeper management unit;
the backup service module adds the current session key value pair into a ring queue, and specifically comprises the following steps:
and the backup service module adds the current session key value pair into the annular queue of the dominant backup service unit, and synchronizes the current session key value pair to other backup service units through the dominant backup service unit.
6. The method of claim 1, wherein the backup service module performs session integration on session key pairs in the ring queue according to a preset trigger condition, including:
according to preset merging conditions, carrying out session merging on session key value pairs in the annular queue; the preset merging conditions comprise a preset merging period and/or a preset merging threshold value;
and/or according to a preset deleting condition, performing session deletion on session key value pairs in the annular queue; the preset deleting conditions comprise a preset deleting period and/or a preset deleting threshold value.
7. The method of claim 1 or 6, wherein said session integration of session key value pairs in said ring queue further comprises:
and according to the joining time of the session key value pairs in the annular queue, performing session integration on the non-active session key value pairs in the annular queue.
8. A device for backing up session messages, applied to a user port function network element, comprising:
the current session key value pair acquisition module is integrated with the main user port function module and is used for responding to the acquired session message based on the message forwarding control protocol, acquiring the current session key value pair according to the current session message and transmitting the current session key value pair to the backup service module; wherein the key name of the current session key value pair comprises a session endpoint identification of the current session message;
the session integration execution module is integrated with the backup service module and is used for adding the current session key value pair into a ring queue and performing session integration on the session key value pair in the ring queue according to a preset trigger condition; wherein, the session integration comprises session merging and/or session deletion;
and the key value reading module is integrated with the standby user port functional module and is used for reading the key value of the session key value pair in the annular queue by the standby user port functional module.
9. A network device, the network device comprising:
one or more processors;
a storage means for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method of backing up session messages as recited in any of claims 1-7.
10. A storage medium containing computer executable instructions which, when executed by a computer processor, are for performing the method of backing up session messages as claimed in any one of claims 1 to 7.
CN202111272142.XA 2021-10-29 2021-10-29 Session message backup method and device, network equipment and storage medium Active CN114051047B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111272142.XA CN114051047B (en) 2021-10-29 2021-10-29 Session message backup method and device, network equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111272142.XA CN114051047B (en) 2021-10-29 2021-10-29 Session message backup method and device, network equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114051047A CN114051047A (en) 2022-02-15
CN114051047B true CN114051047B (en) 2023-06-09

Family

ID=80206533

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111272142.XA Active CN114051047B (en) 2021-10-29 2021-10-29 Session message backup method and device, network equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114051047B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105591810A (en) * 2015-10-22 2016-05-18 杭州华三通信技术有限公司 Backup information sending method and device
WO2019047855A1 (en) * 2017-09-06 2019-03-14 新华三技术有限公司 Backup method and apparatus for bras having separated forwarding plane and control plane
CN110535676A (en) * 2018-05-25 2019-12-03 中兴通讯股份有限公司 Implementation method, device, equipment and the storage medium of SMF dynamic disaster recovery
CN110958718A (en) * 2018-09-27 2020-04-03 中兴通讯股份有限公司 PDU session reconstruction method, device, system and storage medium
CN111225401A (en) * 2018-11-23 2020-06-02 中兴通讯股份有限公司 Method and related equipment for realizing disaster tolerance
CN111436161A (en) * 2019-01-11 2020-07-21 电信科学技术研究院有限公司 Session management method and SMF entity
CN113316269A (en) * 2021-04-28 2021-08-27 武汉虹旭信息技术有限责任公司 Session management method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9888068B2 (en) * 2013-04-06 2018-02-06 Citrix Systems, Inc. Systems and methods for maintaining session persistence in a cluster system
WO2019084725A1 (en) * 2017-10-30 2019-05-09 华为技术有限公司 Service reliability improving method, device, and system
US20210105196A1 (en) * 2019-10-04 2021-04-08 Huawei Technologies Co., Ltd. Support group communications with shared downlink data
US11336471B2 (en) * 2019-12-20 2022-05-17 Cisco Technology, Inc. Achieving seamless service during unreachability of charging function entity

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105591810A (en) * 2015-10-22 2016-05-18 杭州华三通信技术有限公司 Backup information sending method and device
WO2019047855A1 (en) * 2017-09-06 2019-03-14 新华三技术有限公司 Backup method and apparatus for bras having separated forwarding plane and control plane
CN110535676A (en) * 2018-05-25 2019-12-03 中兴通讯股份有限公司 Implementation method, device, equipment and the storage medium of SMF dynamic disaster recovery
CN110958718A (en) * 2018-09-27 2020-04-03 中兴通讯股份有限公司 PDU session reconstruction method, device, system and storage medium
CN111225401A (en) * 2018-11-23 2020-06-02 中兴通讯股份有限公司 Method and related equipment for realizing disaster tolerance
CN111436161A (en) * 2019-01-11 2020-07-21 电信科学技术研究院有限公司 Session management method and SMF entity
CN113316269A (en) * 2021-04-28 2021-08-27 武汉虹旭信息技术有限责任公司 Session management method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
"Design and analysis of SpaceWire hot backup redundant network: Session networks and protocols, short paper";XiaoSu Yi等;《2016 International SpaceWire Conference (SpaceWire)》;全文 *
5G URLLC端到端关键技术分析;梁辉;韩潇;李福昌;;移动通信(第08期);全文 *
IMS中核心控制网元S-CSCF可靠性方案;刘一鸿;孙建伟;杨海波;林镜华;;计算机系统应用(第04期);全文 *

Also Published As

Publication number Publication date
CN114051047A (en) 2022-02-15

Similar Documents

Publication Publication Date Title
WO2021121370A1 (en) Message loss detection method and apparatus for message queue
CN108647104B (en) Request processing method, server and computer readable storage medium
CN107666493B (en) Database configuration method and equipment thereof
US9342409B2 (en) Recording medium storing transaction resuming program, information processing apparatus and transaction resuming method
CN111737022A (en) Interface calling method, system, equipment and medium based on micro-service
CN110740145A (en) Message consumption method, device, storage medium and electronic equipment
CN112995261A (en) Configuration method and device of service table, network equipment and storage medium
CN114500633B (en) Data forwarding method, related device, program product and data transmission system
CN112769876B (en) Method, device, equipment and medium for acquiring equipment channel information
CN116820527B (en) Program upgrading method, device, computer equipment and storage medium
CN114697391A (en) Data processing method, device, equipment and storage medium
CN113259408B (en) Data transmission method and system
CN112395242B (en) Multi-chip control method, device, electronic equipment and computer readable storage medium
JP2010044553A (en) Data processing method, cluster system, and data processing program
CN111176855A (en) Establishing queues between threads in user space
CN114051047B (en) Session message backup method and device, network equipment and storage medium
CN108363629B (en) Method, medium, apparatus and computing device for instant messaging
WO2020108292A1 (en) Virtual private cloud communication system, system configuration method and controller
CN111596864A (en) Method, device, server and storage medium for data delayed deletion
CN115866035A (en) Multithreading data high-speed pushing method, system, controller and storage medium
JP4415391B2 (en) Method and apparatus for transmitting data to a network and method and apparatus for receiving data from a network
CN113452948B (en) Conference terminal control method, device, equipment and storage medium
CN110445874B (en) Session processing method, device, equipment and storage medium
CN112615916A (en) File deployment method and device, electronic equipment and storage medium
CN111638980A (en) Message processing method, device and system based on memory mapping and storage medium

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
GR01 Patent grant
GR01 Patent grant