CN114051047A - Backup method and device of session message, network equipment and storage medium - Google Patents

Backup method and device of session message, network equipment and storage medium Download PDF

Info

Publication number
CN114051047A
CN114051047A CN202111272142.XA CN202111272142A CN114051047A CN 114051047 A CN114051047 A CN 114051047A CN 202111272142 A CN202111272142 A CN 202111272142A CN 114051047 A CN114051047 A CN 114051047A
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.)
Granted
Application number
CN202111272142.XA
Other languages
Chinese (zh)
Other versions
CN114051047B (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 backup method and a device of session messages, wherein the method comprises the following steps: the master user port functional module responds to the 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 conversation key value pair into the annular queue and carries out conversation integration on the conversation key value pair in the annular queue according to a preset trigger condition; and the standby user port function module reads the key value of the session key value pair in the annular queue. The technical scheme provided by the embodiment of the invention greatly reduces the data volume of the session messages to be backed up in the circular queue, and simultaneously, the standby user port functional module can quickly read the session messages in the circular queue after the startup delay or downtime restart, thereby improving the backup efficiency of the session messages and reducing the occupation of the access resources of the standby user port functional module.

Description

Backup method and device of session message, network equipment and storage medium
Technical Field
The present invention relates to network transmission technologies, and in particular, to a method and an apparatus for backing up a session message, a network device, and a storage medium.
Background
A Packet Forwarding Control Protocol (PFCP) is a communication Protocol used by an N4 interface between a Session Management Function (SMF) and a User Port Function (UPF) in a 4G core network or a 5G core network, and is used for interaction between a Control plane and a User plane.
In the prior art, a PFCP-based session message backup method usually completes backup of session messages between a primary machine and a secondary machine through a primary database or a secondary hot-standby system, but in such a backup method, once a delay occurs when the secondary machine is started or the secondary machine is restarted after shutdown, the secondary machine needs to read a large amount of session messages, and multiple session operations for the same session message often exist in the read large amount of session messages, so that the PFCP-based session message backup efficiency is greatly reduced, and a large amount of access resources of the secondary machine are occupied.
Disclosure of Invention
The embodiment of the invention provides a method, a device, network equipment and a storage medium for backing up a session message, 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 master user port functional module responds to the 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 identifier of the current session message;
the backup service module adds the current session key value pair into an annular queue and carries out session integration on the session key value pair in the annular queue according to a preset trigger condition; wherein the session integration comprises session merging and/or session deletion;
and the standby user port function 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 device for backing up a session message, including:
the current session key value pair acquisition module is integrated in the master user port functional module and used for responding to the acquisition of the session message based on the message forwarding control protocol, acquiring the current session key value pair according to the current session message and sending 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 identifier of the current session message;
the session integration execution module is integrated in the backup service module and used for adding the current session key value pair into an annular queue and carrying out session integration on the session key value pair in the annular 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 function module and is used for reading the key value of the session key value pair in the annular queue by the standby user port function module.
In a third aspect, an embodiment of the present invention further provides a network device, where the network device includes:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a method for backing up session messages as described in any embodiment of the invention.
In a fourth aspect, the embodiments of the present invention further provide a storage medium containing computer-executable instructions, which when executed by a computer processor implement the 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 carries out session integration on 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, meanwhile, the standby user port functional module can quickly read the session message in the annular queue after the startup delay or downtime restart occurs, the backup efficiency of the session message is improved, and the occupation of access resources of the standby user port functional module is also reduced.
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 a session message according to an embodiment of the present invention;
fig. 1C is a schematic structural 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 present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
The backup method of the session message provided by the invention can be applied to the application scene shown in fig. 1A, and is realized by the UPF network element in fig. 1A, wherein the UPF network element provides a unique IP (Internet Protocol) address and port to the outside, and the UPF network element comprises a main UPF module, a standby 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 a session code stream based on PFCP sent by the SMF network element through an N4 interface; the backup UPF module is used for replacing the main UPF module to become a new main UPF module when the main UPF module is abnormal and executing the main function so as to ensure the high availability of the UPF network element; the backup service module is used for backing up the session message so as to ensure the integrity of the session message in the backup UPF module; after the main UPF module is started, establishing TCP (Transmission Control Protocol) connection based on Socket with the backup service module to ensure the Transmission of session messages; after the backup UPF module is started, the TCP connection based on Socket is established with the backup service module.
Example one
Fig. 1B is a flowchart of a method for backing up a session message according to an embodiment of the present invention, where this embodiment is applicable to a case where a UPF network element backs up a session message based on a PFCP, and the method may be executed by a device for backing up a session message according to an embodiment of the present invention, where the device may be implemented by software and/or hardware and integrated on a UPF network element, and 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 master user port function module responds to the session message based on the message forwarding control protocol, obtains 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 identifier of the current session message.
Between SMF network element and UPF network element, transmitting data stream through session code stream based on PFCP; the PFCP-based session code stream specifically includes an mac (media Access control) address, an IP address, a UDP (User Datagram Protocol) message, and a PFCP message; and the main UPF module creates a local PFCP session message structure according to the obtained session code stream based on the PFCP, and saves the session message obtained by analyzing the session code stream in the local PFCP session message structure.
After acquiring the current session message, 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; when a PFCP endpoint (i.e. an SMF network element in the embodiment of the present invention) sends a session message to an opposite PFCP endpoint (i.e. a UDF network element in the embodiment of the present invention), a locally-allocated SEID value needs to be used, and the SEID value is added to the session message to serve as identification information of the session message, and different PFCP session messages can be distinguished through session endpoint identification; meanwhile, after acquiring the current session message, the primary UPF module may use the current session message itself as the key value of the current session key value pair.
Optionally, in this embodiment of the present invention, the acquiring, by the master user port functional module, the current session key value pair according to the current session message includes: the master user port functional module acquires the session type of the current session message according to the message type identifier of the current session message; if the session type is session creation, the master user port functional 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 master user port functional module acquires a matched historical session message according to the session endpoint identifier 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; and if the session type is session deletion, the master user port functional 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 a session Message based on the PFCP, and reflects a 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; creating a session, namely 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 there is no history information of the current session message 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, which indicates that the history information of the current session message exists in the local session message, because the session modification is the modification performed on the history information, the current session message may not include the complete session content itself, but only include the session content of the part to be modified, for example, the session message is "create a character string ABCDEFG" when being created, and the current session message is "replace the initial letter with M", thereby obtaining the history session message matched with the current session message according to the session endpoint identifier, obtaining the modified complete session content together according to the history session message and the current session message, and using the modified session content as the key value of the current session key value pair to ensure the completeness of the session content in the key value of each session key value pair; and if the session type is session deletion, setting the key value of the current session key value pair to be null so as to reduce the data transmission quantity between the primary 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 comprises session merging and/or session deletion.
The ring queue is an ordered list based on an array, and follows the principle of first-in first-out, namely, firstly stored data is taken out firstly, then stored data is taken out later, and an offset is added when each message is stored; the main UPF module stores each session key value pair in a sequential writing mode, and the standby UPF module 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 ring-shaped queue, if the primary UPF module does not acquire the session type, the primary UPF module directly takes the acquired session message as a key value, the backup service module needs to determine the 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 key name added time closest to the current moment, and sets an invalid mark for other session key value pairs under the key name, so that the backup UPF module is started in a delayed manner, or after the backup UPF module is restarted, the session key value pair with the invalid mark cannot be read when the session message is read, that is, the backup UPF module only reads the key value of the target session key value pair under the key name, the reading efficiency of the backup UPF module is improved, and the occupation of access resources of the backup UPF module is reduced.
For example, a key name includes 3 session key value pairs stored in sequence, the key values of the 3 session key value pairs are "create a character string ABCDEFG", "modify an initial letter to M", and modify a tail letter to N ", obviously, the execution result of the key values is" acquire a character string mbcdeffn ", the" acquire character string mbcdeffn "is set as the key value of the 3 rd session key value pair, and invalid marks are set for both the 1 st session key value pair and the 2 nd session key value pair, when the UPF module performs session key value pair reading, the 1 st session key value pair and the 2 nd session key value pair will not be read, 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, invalid marks are set for the 1 st conversation key value pair, the 2 nd conversation key value pair and the 3 rd conversation key value pair, 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 marks, 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.
Particularly, as described in the above technical solution, if the primary UPF module has obtained the key values in different manners according to different session types, that is, according to different session types, the current session message is used as the key value, or the current session key value pair is obtained according to the historical session message and the current session message, or the key value is set to null, it is obvious that the key values obtained in the above manner already include complete session content, and therefore, the key value of the session key value pair whose adding time is closest to the current time under the same key name is the session result under the key name; for example, a key name includes 3 session key value pairs stored in sequence, the key values of the 3 session key value pairs are "create string ABCDEFG", "acquire string MBCDEFG" and "acquire string MBCDEFN" in sequence, when the session key value pairs are merged, an invalid flag is set for both the 1 st session key value pair and the 2 nd session key value pair, and the UPF module only reads the key value of the 3 rd session key value pair; if the key name also comprises a 4 th conversation key value pair stored in sequence, and the key value is null, invalid marks are 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 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 are deleted.
Optionally, in an embodiment of the present invention, the method further includes: the method further comprises the following steps: the backup service module acquires a leading backup service unit in a plurality of backup service units through a zookeeper management unit; the adding, by the backup service module, the current session key-value pair to a ring queue specifically includes: and the backup service module adds the current session key value pair into the annular queue of the leading backup service unit and synchronizes the current session key value pair to other backup service units through the leading backup service unit.
Specifically, the Zookeeper is a distributed application program coordination service of a distributed open source code, and provides a consistency service for distributed application; the backup service module interacts election messages of each backup service unit through a Zookeeper management unit, in the Zookeeper management unit, a backup service unit successfully created by a node is used as a leading backup service unit (namely, Leader), other backup service units are used as auxiliary backup service units (namely, follow), and the IP address and the port of the Leader are recorded through the Zookeeper management unit; when the Leader is down, selecting a new Leader based on an election mechanism among all Followers, and creating a node of the new Leader on the Zookeeper management unit; the Leader is mainly used for backing up the PFCP-based session messages sent by the UPF, and the follow is used for ensuring high availability of the backup service. After acquiring the session key value pair sent by the main UPF module, the backup service module adds the session key value pair to a ring queue of a Leader, and then synchronizes the session key value pair to a Follower in a real-time sending mode through the Leader, or synchronizes the session key value pair to the Follower in a batch sending mode so as to reduce the performance loss of the backup service module; in fig. 1C, the backup service module includes three backup service units as an example.
Optionally, in this embodiment of the present invention, the performing, by the backup service module, session integration on the session key value pair in the ring queue according to a preset trigger condition includes: according to preset merging conditions, carrying out session merging on the session key value pairs in the annular queue; the preset merging condition comprises a preset merging period and/or a preset merging threshold; and/or according to a preset deleting condition, deleting the session key value pair in the annular queue; the preset deleting condition comprises a preset deleting period and/or a preset deleting threshold.
The backup service module can execute session integration operation according to a preset period, namely, the session key value pairs in the annular queue are integrated at intervals of fixed time length, and can also integrate the session key value pairs in the annular queue according to a preset threshold value, namely, after the session key value pairs of the preset threshold value are added in the annular queue; the method comprises the steps of merging, namely replacing a session key value pair stored firstly with a session key value pair stored later, setting an invalid mark for the replaced session key value pair, and enabling subsequent consumers (namely UPF modules) not to read the session key value pair with the invalid mark; deleting, namely, storing the conversation key value pair later to cover the process of the conversation key value pair stored firstly, deleting the covered current conversation key value pair from the annular queue, and deleting the conversation key value pair stored later from the annular queue because the key value is empty; particularly, in the embodiment of the present 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 this embodiment of the present invention, the performing session integration on the session key-value pairs in the ring queue further includes: and according to the adding time of the conversation key value pair in the annular queue, carrying out conversation integration on the inactive conversation key value pair in the annular queue. The inactive session key-value pair refers to a session key-value pair with a joining time greater than a preset time threshold from the current time, and the active session key-value pair refers to a session key-value pair with a joining time less than or equal to the preset time threshold from the current time, that is, the inactive session key-value pair has been substantially joined to the ring queue for a long time, and usually the session operations related thereto have been completed, while the active session key-value pair may have subsequent session operations due to the late joining time, so that session integration is performed only on the inactive session key-value pair to reduce the number of session key-value pairs to be processed, and improve the integration efficiency of the session key-value pairs 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 carries out session integration on 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, meanwhile, the standby user port functional module can quickly read the session message in the annular queue after the startup delay or downtime restart occurs, the backup efficiency of the session message is improved, and the occupation of access resources of the standby user port functional module is also reduced.
Example two
Fig. 2 is a flowchart of a backup method for a session message according to a second embodiment of the present invention, which 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 perform session merging on the session key value pairs in the annular queue according to preset merging conditions; if yes, go to S220; if not, go to S230.
S220, according to the adding time of the conversation key value pairs in the annular queue, conversation merging is carried out on the inactive conversation key value pairs in the annular queue; s230 is performed.
And merging the session key value pairs with the same key name, only keeping the newly added session key value pair, keeping the merged data in a memory, and setting an invalid mark.
S230, the backup service module judges whether to delete the session of the session key value pair in the annular queue according to a preset deletion condition; if yes, go to S240; if not, go to S210.
S240, according to the adding time of the conversation key value pair in the annular queue, carrying out conversation deletion on the inactive conversation key value pair in the annular queue; s210 is performed.
And deleting the session key value pair with the invalid mark and the session key value pair with the empty key value pair, and merging the empty memories formed by the deleted annular queue.
According to the technical scheme provided by the embodiment of the invention, the backup service module carries out session merging on the session key value pairs in the annular queue according to the preset merging condition, and carries out session deletion on the session key value pairs in the annular queue according to the preset deleting condition, so that the data volume of the session key value pairs in the annular queue is reduced, the backup data volume read by the UPF module is further reduced, meanwhile, the number of the session key value pairs to be processed is further reduced through the integration processing on the inactive session key value pairs, and the integration efficiency of the session key value pairs in the annular queue is improved.
EXAMPLE III
Fig. 3 is a flowchart of a backup method for a session message according to a third embodiment of the present invention, which is embodied on the basis of the foregoing technical solution, and specifically follows:
as shown in fig. 3, after the main UPF module and the backup UPF module are synchronously started, the SMF network element sends a session code stream based on the PFCP to the main UPF module; the main UPF module acquires a session message according to the acquired session code stream; the main UPF module acquires the 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 a ring queue; because the main UPF module and the backup UPF module are started synchronously, hot data, namely active session key value pairs, are arranged between the main UPF module and the backup UPF module, and the session key value pairs read by the backup UPF module are not subjected to session integration of the backup service module;
when the backup UPF module is down and restarted or communication is delayed, the backup UPF module needs to read the session key value pair in the backup service module again, at this time, the reading progress of the backup UPF module lags behind the writing progress of the main UPF module, so that an inactive session key value pair may exist in the backup service module, the backup service module integrates the inactive session key value pair in the ring queue, and the backup 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 carries out session integration on 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 startup delay or downtime restart occurs, so that the backup efficiency of the session message is improved, and the occupation of access resources of the standby user port functional module is also reduced.
Example four
Fig. 4 is a block diagram of a backup apparatus for session messages according to a fourth embodiment of the present invention, where the apparatus specifically includes: a current session key-value pair obtaining module 410, a session integration executing module 420 and a key-value reading module 430.
A current session key-value pair obtaining module 410, integrated in the master user port function module, configured to, in response to obtaining a session message based on a packet forwarding control protocol, obtain a current session key-value pair according to the current session message, 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 identifier of the current session message;
a session integration execution module 420, integrated in the backup service module, configured to add the current session key-value pair into 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;
a key value reading module 430, integrated with the standby user port function module, configured to read the key value of the session key value pair in the circular queue by the standby user port function 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 carries out session integration on 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, meanwhile, the standby user port functional module can quickly read the session message in the annular queue after the startup delay or downtime restart occurs, the backup efficiency of the session message is improved, and the occupation of access resources of the standby user port functional module is also reduced.
Optionally, on the basis of the foregoing 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, if the session type is session modification, obtain a matched historical session message according to the session endpoint identifier of the current session message, and obtain the 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 the key value of the current session key value pair to null if the session type is session deletion.
Optionally, on the basis of the above technical solution, the backup device for the session message further includes:
and the leading backup service unit acquisition module is integrated in the backup service module and used for acquiring the leading backup service unit in the plurality of backup service units through the zookeeper management unit.
Optionally, on the basis of the foregoing technical solution, the session integration execution module 420 is specifically configured to add the current session key value pair to the ring queue of the leading backup service unit, and synchronize the current session key value pair to other backup service units through the leading backup service unit.
Optionally, on the basis of 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 condition comprises a preset merging period and/or a preset merging threshold; and/or according to a preset deleting condition, deleting the session key value pair in the annular queue; the preset deleting condition comprises a preset deleting period and/or a preset deleting threshold.
Optionally, on the basis of the above technical solution, the session integration execution module 420 is further specifically configured to perform session integration on the inactive session key value pairs in the ring queue according to the joining time of the session key value pairs in the ring queue.
The device can execute the backup method of the session message provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. For details of the technology not described in detail in this embodiment, reference may be made to a backup method of a session message 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 only an example and should not bring any limitations to the functionality and scope of use of the 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 couples various system components including the memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, 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 may be any available media that is accessible by network device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The 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 and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, and commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are 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, for example, in 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 of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Network device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with the network device 12, and/or with any devices (e.g., network card, modem, etc.) that enable the network device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, network device 12 may communicate with one or more networks (e.g., 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, the network adapter 20 communicates with the other modules of the network device 12 via the bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with network device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing by executing programs stored in the memory 28, for example, implementing a backup method of a conversation message provided by an embodiment of the present invention. Namely: the master user port functional module responds to the 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 identifier of the current session message; the backup service module adds the current session key value pair into an annular queue and carries out session integration on the session key value pair in the annular queue according to a preset trigger condition; wherein the session integration comprises session merging and/or session deletion; and the standby user port function 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, on which a computer program is stored, where the computer program, when executed by a processor, implements a method for backing up a session message according to any embodiment of the present invention; the method comprises the following steps:
the master user port functional module responds to the 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 identifier of the current session message;
the backup service module adds the current session key value pair into an annular queue and carries out session integration on the session key value pair in the annular queue according to a preset trigger condition; wherein the session integration comprises session merging and/or session deletion;
and the standby user port function module reads the key value of the session key value pair in the annular queue.
Computer storage media for embodiments of the invention may employ 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. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination 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 the context of 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.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. 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 for aspects 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 + + or the like 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 type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. 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, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A backup method of session messages is applied to a user port function network element, and comprises the following steps:
the master user port functional module responds to the 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 identifier of the current session message;
the backup service module adds the current session key value pair into an annular queue and carries out session integration on the session key value pair in the annular queue according to a preset trigger condition; wherein the session integration comprises session merging and/or session deletion;
and the standby user port function module reads the key value of the session key value pair in the annular queue.
2. The method according to claim 1, wherein the obtaining, by the master user port functional module, a current session key-value pair according to a current session message comprises:
the master user port functional module acquires the session type of the current session message according to the message type identifier of the current session message;
and if the session type is session creation, the master user port functional module takes the current session message as a key value of the current session key value pair.
3. The method according to claim 2, wherein after the master user port functional module obtains the session type of the current session message according to the message type identifier of the current session message, the method further comprises:
if the session type is session modification, the master user port functional module acquires the matched historical session message according to the session endpoint identifier of the current session message, and acquires the key value of the current session key value pair according to the historical session message and the current session message.
4. The method according to claim 2, wherein after the master user port functional module obtains the session type of the current session message according to the message type identifier of the current session message, the method further comprises:
and if the session type is session deletion, the master user port functional module sets the key value of the current session key value pair to be null.
5. The method of claim 1, further comprising:
the backup service module acquires a leading backup service unit in a plurality of backup service units through a zookeeper management unit;
the adding, by the backup service module, the current session key-value pair to a ring queue specifically includes:
and the backup service module adds the current session key value pair into the annular queue of the leading backup service unit and synchronizes the current session key value pair to other backup service units through the leading backup service unit.
6. The method of claim 1, wherein the backup service module performs session integration on the session key-value pairs in the ring queue according to a preset trigger condition, and the method comprises:
according to preset merging conditions, carrying out session merging on the session key value pairs in the annular queue; the preset merging condition comprises a preset merging period and/or a preset merging threshold;
and/or according to a preset deleting condition, deleting the session key value pair in the annular queue; the preset deleting condition comprises a preset deleting period and/or a preset deleting threshold.
7. The method according to claim 1 or 6, wherein the performing session integration on the session key-value pairs in the ring queue further comprises:
and according to the adding time of the conversation key value pair in the annular queue, carrying out conversation integration on the inactive conversation key value pair in the annular queue.
8. A device for backing up session messages, which is applied to a network element with a user port function, comprising:
the current session key value pair acquisition module is integrated in the master user port functional module and used for responding to the acquisition of the session message based on the message forwarding control protocol, acquiring the current session key value pair according to the current session message and sending 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 identifier of the current session message;
the session integration execution module is integrated in the backup service module and used for adding the current session key value pair into an annular queue and carrying out session integration on the session key value pair in the annular 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 function module and is used for reading the key value of the session key value pair in the annular queue by the standby user port function module.
9. A network device, characterized in that the network device comprises:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method for backup of conversation messages in accordance with any one of claims 1 to 7.
10. A storage medium containing computer-executable instructions for performing the method of backing up a conversation message as claimed in any one of claims 1 to 7 when executed by a computer processor.
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 true CN114051047A (en) 2022-02-15
CN114051047B 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 (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140304409A1 (en) * 2013-04-06 2014-10-09 Citrix Systems, Inc. Systems and methods for maintaining session persistence in a cluster system
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
US20200260457A1 (en) * 2017-10-30 2020-08-13 Huawei Technologies Co., Ltd. Method for Improving Service Reliability, Device, and System
US20210105196A1 (en) * 2019-10-04 2021-04-08 Huawei Technologies Co., Ltd. Support group communications with shared downlink data
US20210194709A1 (en) * 2019-12-20 2021-06-24 Cisco Technology, Inc. Achieving seamless service during unreachability of charging function entity
CN113316269A (en) * 2021-04-28 2021-08-27 武汉虹旭信息技术有限责任公司 Session management method and device

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140304409A1 (en) * 2013-04-06 2014-10-09 Citrix Systems, Inc. Systems and methods for maintaining session persistence in a cluster system
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
US20200260457A1 (en) * 2017-10-30 2020-08-13 Huawei Technologies Co., Ltd. Method for Improving Service Reliability, Device, and System
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
US20210105196A1 (en) * 2019-10-04 2021-04-08 Huawei Technologies Co., Ltd. Support group communications with shared downlink data
US20210194709A1 (en) * 2019-12-20 2021-06-24 Cisco Technology, Inc. Achieving seamless service during unreachability of charging function 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
XIAOSU YI等: ""Design and analysis of SpaceWire hot backup redundant network: Session networks and protocols, short paper"", 《2016 INTERNATIONAL SPACEWIRE CONFERENCE (SPACEWIRE)》 *
刘一鸿;孙建伟;杨海波;林镜华;: "IMS中核心控制网元S-CSCF可靠性方案", 计算机系统应用, no. 04 *
梁辉;韩潇;李福昌;: "5G URLLC端到端关键技术分析", 移动通信, no. 08 *

Also Published As

Publication number Publication date
CN114051047B (en) 2023-06-09

Similar Documents

Publication Publication Date Title
WO2021121370A1 (en) Message loss detection method and apparatus for message queue
CN108712332B (en) Communication method, system and device
CN112738791B (en) User information correlation backfill method, device, equipment and medium based on 5G core network
CN109361525B (en) Method, device, control terminal and medium for restarting distributed deployment of multiple services
CN112583931A (en) Message processing method, message middleware, electronic device and storage medium
CN113268308B (en) Information processing method, device and storage medium
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
CN116820527B (en) Program upgrading method, device, computer equipment and storage medium
CN113259408A (en) Data transmission method and system
CN110445874B (en) Session processing method, device, equipment and storage medium
CN109445966B (en) Event processing method, device, medium and computing equipment
CN111596864A (en) Method, device, server and storage medium for data delayed deletion
CN111274047A (en) Information processing method, terminal, system, computer device and storage medium
CN108363629B (en) Method, medium, apparatus and computing device for instant messaging
CN114051047B (en) Session message backup method and device, network equipment and storage medium
US11386043B2 (en) Method, device, and computer program product for managing snapshot in application environment
CN115454666A (en) Data synchronization method and device among message queue clusters
CN110085237B (en) Recovery method, device and equipment of interactive process
CN109309583B (en) Information acquisition method and device based on distributed system, electronic equipment and medium
CN115328693A (en) Method, device, equipment and storage medium for recovering service in service process
CN111638980A (en) Message processing method, device and system based on memory mapping and storage medium
US20050281258A1 (en) Address translation program, program utilizing method, information processing device and readable-by-computer medium
CN116820430B (en) Asynchronous read-write method, device, computer equipment 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