Protocol stack state synchronization method and system, storage medium and network equipment

By synchronizing the protocol stack status information in the 5G core network signaling surface load balancing system, the business interruption problem caused by the failure of the protocol stack interactive unit is solved, and the system's high availability and business continuity are achieved.

CN119450541APending Publication Date: 2025-02-14CHINA TELECOM INTELLIGENT NETWORK TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411921392.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

In the 5G core network signaling load balancing system, if a certain protocol stack interaction unit fails, the process of re-establishing a connection with the communication partner takes a long time, resulting in service interruption.

Method used

By determining the protocol stack status information recorded by each protocol stack interaction unit in the core network element, and synchronizing the latest protocol stack status information to other protocol stack interaction units when the status information of the target protocol stack interaction unit changes, it realizes that the latest protocol stack status information is realized. Real-time sharing of status information.

Benefits of technology

Even when a single protocol stack interactive unit fails or is added, the continuity and consistency of the communication connection and session state of the entire system can be maintained, ensuring high availability of network services and business continuity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119450541A_ABST
    Figure CN119450541A_ABST
Patent Text Reader

Abstract

The invention discloses a protocol stack state synchronization method and system, a storage medium and network equipment. The method comprises the steps that protocol stack state information recorded by each protocol stack interaction unit in a core network element is determined, and the protocol stack state information at least comprises connection state information and session state information of each protocol layer when the core network element communicates with a communication opposite end; and under the condition that the protocol stack state information recorded by the target protocol stack interaction unit changes, synchronizing the latest protocol stack state information recorded by the target protocol stack interaction unit to other protocol stack interaction units in the core network element. According to the method and the device, the technical problem of service interruption easily caused by long time consumption in the process of re-establishing connection with the opposite communication terminal after interaction of a certain protocol stack of the network element of the core network has a fault is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network technology and security, and specifically, to a protocol stack state synchronization method and system, a storage medium, and a network device. Background Art

[0002] At present, the specific architecture of the load balancing system of the existing 5G core network signaling plane is as follows: Figure 1 When there is no abnormality in the signaling plane processing unit, the TOR (Top of Rack) switch is configured as an equal-cost router, and the ECMP (Equal-cost Multi-Path) strategy is adopted in a flow-by-flow manner to load the signaling traffic to Figure 1 There are three protocol stack interaction units (there may be multiple in actual deployment), and each protocol stack processing unit that receives a signaling request can independently maintain its own protocol stack state.

[0003] If a protocol stack interaction unit fails, the communication interactions originally carried by the protocol stack interaction unit will be reset, and it is necessary to wait for the communication peer to detect the session failure (for example, after the transmission control protocol is established, if the node in this segment fails, it is necessary to wait until the peer state machine times out and then re-initiate open) before re-initiating the session establishment to continue the service process. The process of re-establishing the connection will take a long time, which is likely to cause damage to the protocol service.

[0004] In addition, the 5G (5th Generation Mobile Communication Technology) related signaling protocols specified by 3GPP (3rd Generation Partnership Project) also have session states in addition to the protocol stack states. Therefore, when a processing node fails, the communication peer waits for the protocol state machine to time out before re-initiating the session establishment process, which may include not only the protocol stack state but also the session state, further amplifying the problem of the above-mentioned negotiation process taking a long time and causing damage to the service.

[0005] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0006] The embodiments of the present application provide a protocol stack status synchronization method and system, storage medium, and network device to at least solve the technical problem that the process of re-establishing a connection with a communication peer after a failure in a protocol stack interaction of a core network network element is time-consuming and easily leads to service interruption.

[0007] According to one aspect of an embodiment of the present application, a protocol stack status synchronization method is provided, comprising: determining the protocol stack status information recorded by each protocol stack interaction unit in a core network network element, wherein the protocol stack status information at least includes: connection status information and session status information of each protocol layer when the core network network element communicates with a communication counterpart; in the event that the protocol stack status information recorded by a target protocol stack interaction unit changes, synchronizing the latest protocol stack status information recorded by the target protocol stack interaction unit to other protocol stack interaction units in the core network network element.

[0008] Optionally, the types of protocols used by each protocol layer include: stateful protocols or stateless protocols, wherein the stateful protocols include at least one of the following: Transmission Control Protocol, Next Generation Application Protocol, File Transfer Protocol; the stateless protocols include at least one of the following: Hypertext Transfer Protocol, User Datagram Protocol.

[0009] Optionally, determining the protocol stack status information recorded by each protocol stack interaction unit in the core network network element includes: obtaining signaling traffic when the core network network element communicates with a communication counterpart using a stateful protocol, wherein the core network network element includes at least one protocol stack interaction unit; using an equal-cost routing strategy to load the signaling traffic to each protocol stack interaction unit in the core network network element, and each protocol stack interaction unit updates its own recorded protocol stack status information based on the received signaling traffic.

[0010] Optionally, the latest protocol stack status information recorded by the target protocol stack interaction unit is synchronized to other protocol stack interaction units in the core network network element, including: encapsulating the latest protocol stack status information recorded by the target protocol stack interaction unit into a status update message, and broadcasting the message to other protocol stack interaction units in the core network network element.

[0011] Optionally, the latest protocol stack status information recorded by the target protocol stack interaction unit is synchronized to other protocol stack interaction units in the core network network element, including: writing the latest protocol stack status information recorded by the target protocol stack interaction unit into a preset central database, wherein other protocol stack interaction units in the core network network element obtain the latest protocol stack status information recorded by the target protocol stack interaction unit through the central database.

[0012] Optionally, the method includes: when a new protocol stack interaction unit is added in a core network element, synchronizing protocol stack state information recorded by all protocol stack interaction units in the core network element to the new protocol stack interaction unit.

[0013] Optionally, the method further includes: when the faulty protocol stack interaction unit in the core network element returns to normal, synchronizing the protocol stack status information recorded by all protocol stack interaction units in the core network element to the restored protocol stack interaction unit.

[0014] According to another aspect of an embodiment of the present application, a protocol stack status synchronization device is also provided, including: a determination module, used to determine the protocol stack status information recorded by each protocol stack interaction unit in a core network network element, wherein the protocol stack status information at least includes: connection status information and session status information of each protocol layer when the core network network element communicates with a communication counterpart; a synchronization module, used to synchronize the latest protocol stack status information recorded by the target protocol stack interaction unit to other protocol stack interaction units in the core network network element when the protocol stack status information recorded by the target protocol stack interaction unit changes.

[0015] According to another aspect of an embodiment of the present application, a non-volatile storage medium is provided, in which a computer program is stored, wherein a device where the non-volatile storage medium is located executes the above-mentioned protocol stack state synchronization method by running the computer program.

[0016] According to another aspect of an embodiment of the present application, a network device is further provided, comprising: a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the above-mentioned protocol stack state synchronization method through the computer program.

[0017] In the embodiment of the present application, a protocol stack status information synchronization mechanism is adopted to achieve the technical effect of real-time sharing of status information between all protocol stack interaction units in the core network network element, so that even when a single protocol stack interaction unit fails or a new protocol stack interaction unit is added, the continuity and consistency of the communication connection and session status of the entire system can be maintained, thereby ensuring the purpose of high availability and business continuity of network services, thereby solving the technical problem that the process of re-establishing a connection with the communication counterpart due to a failure of a protocol stack interaction unit of a certain network element in the signaling plane load balancing system takes a long time, which may easily lead to damage to the protocol service, and thus solving the technical problem that the process of re-establishing a connection with the communication counterpart due to a failure of a certain protocol stack interaction of the core network network element takes a long time, which may easily lead to business interruption. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0019] Figure 1Related Art An optional 5GC signaling plane load balancing system architecture diagram;

[0020] Figure 2 It is a flowchart of an optional protocol stack state synchronization method according to an embodiment of the present application;

[0021] Figure 3 This is an interactive schematic diagram of an optional 5GC signaling plane load balancing system according to an embodiment of the present application;

[0022] Figure 4 is a schematic structural diagram of an optional protocol stack state synchronization device according to an embodiment of the present application;

[0023] Figure 5 It is a schematic diagram of the structure of an optional network device according to an embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0025] It should be noted that the terms "first", "second", etc. in the specification, claims and drawings of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0026] In order to better understand the embodiments of the present application, some nouns or terms that appear in the description of the embodiments of the present application are first translated and explained as follows:

[0027] 5G Core Network (5GC): It is the core part of the fifth generation mobile communication technology (5G) network architecture responsible for controlling and managing user data transmission, network connection, mobility management, authentication, authorization and network policy implementation. It adopts service-oriented interface and network function virtualization technology, allowing network functions to be dynamically deployed and managed in the form of services, thereby achieving higher flexibility, scalability and efficiency.

[0028] Protocol Stack: It is a communication protocol organized in a hierarchical structure, used for data transmission and interaction between network devices. The protocol stack decomposes the communication process into multiple layers with different functions. Each layer is responsible for a specific task, and completes the encapsulation, transmission and parsing of data packets through the collaborative work between the layers. The protocol stack is usually divided into multiple layers according to different standard models. Common protocol layers include: physical layer (responsible for the management of the physical medium for bit transmission data), data link layer (the main function is to transmit data from one node to another), network layer (the main function is to define the network route, handle the calculation of the network route and the transmission of data), transport layer (mainly to provide end-to-end data transmission), session layer (the main function is to establish and maintain network sessions), presentation layer (the main function is to encode and decode data), application layer (the main function is to support the interaction of applications).

[0029] TCP (Transmission Control Protocol): is a connection-oriented, reliable, byte-stream-based transport layer communication standard protocol. It is designed to adapt to the layered protocol hierarchy that supports multiple network applications. Paired application processes in an interconnected computer communication network can rely on TCP to provide reliable communication services to transmit byte streams.

[0030] UDP (User Datagram Protocol) is a protocol that works at the transport layer in the OSI (Open Systems Interconnection) model. It uses IP as the underlying protocol and provides a protocol for applications to send messages to other programs with a minimum of protocol mechanisms.

[0031] NGAP (Next Generation Application Protocol) is a control plane communication protocol used between the 5G core network and the 5G radio access network (5G-RAN). Therefore, its role is to manage and control the signaling interaction in the 5G network to support various operations between user equipment and the network.

[0032] FTP (File Transfer Protocol): is a standard protocol for transferring files on the Internet, mainly used to transfer files between computers.

[0033] SSH (Secure Shell, network protocol): used for secure remote login and remote command execution on an insecure network. SSH provides strong security, protecting the transmitted data through encryption technology, and preventing eavesdropping, tampering and replay attacks during data transmission.

[0034] HTTP (Hyper Text Transfer Protocol) is a transmission protocol used to transfer hypertext from a Web server to a local browser. It is mainly used for data exchange between a client and a server, especially for requesting and responding to web page data between a browser and a Web server.

[0035] Example 1

[0036] According to an embodiment of the present application, a protocol stack state synchronization method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0037] Figure 2 is a flow chart of a protocol stack state synchronization method provided according to an embodiment of the present application, such as Figure 2 As shown, the method comprises the following steps:

[0038] Step S202: determine the protocol stack status information recorded by each protocol stack interaction unit in the core network element.

[0039] In the technical solution provided in the above step S202, the above core network network elements are 5GC signaling plane network elements in the existing load balancing mode, such as AMF (Access and Mobility Management Function) network elements, SMF (Session Management Function) network elements, PCF (Policy Control Function) network elements, UDM (Unified Data Management) network elements, NRF (Network Repository Function) network elements, NSSF (Network Slice Selection Function) network elements, NEF (Network Exposure Function) network elements, etc.

[0040] In addition, since the protocol stack in each core network element includes multiple protocol layers, and each protocol layer has its specific functions, they work together to achieve signaling transmission and network service provision. Generally, in the architecture of the 5G core network (5GC), the internal design of AMF network elements, SMF network elements, UPF network elements, etc. usually follows the TCP / IP model or a similar layered protocol model, including the following protocol layers:

[0041] Physical Layer: handles the actual bit stream transmission and interacts with the transmission medium (such as optical fiber, copper wire, or wireless signal).

[0042] Data Link Layer: Provides data link control between nodes, handles error detection, retransmission requests, and physical addressing (such as MAC addresses).

[0043] Network Layer: Responsible for logical addressing (such as IP address), routing and packet switching.

[0044] Transport Layer: Provides end-to-end data transmission services, including TCP (Transmission Control Protocol) and UDP (User Datagram Protocol), and is responsible for reliable data transmission, flow control, and congestion control.

[0045] Session Layer: manages the establishment and termination of sessions and controls the session connections of communication devices.

[0046] Presentation Layer: deals with data representation and encoding, such as data format conversion, encryption and compression.

[0047] Application Layer: Supports specific application services, such as HTTP, FTP, SMTP, etc., and handles application-related communications.

[0048] Therefore, the protocol stack state information recorded by each protocol stack interaction unit in the core network network element at least includes: connection state information and session state information of each protocol layer when the core network network element communicates with the communication peer, wherein:

[0049] Connection status information refers to the connection status maintained by the network communication layer (such as the transport layer) in the OSI model or the TCP / IP model. For example, the connection status of the TCP protocol may include: Listen (listening to connection requests from a remote TCP port), Syn-Sent (waiting for a matching connection request after the client sends a connection request), Syn-Recevied (waiting for the other party to confirm the connection request after receiving and sending a connection request), Established (representing an open connection), Close-Wait (waiting for a connection interruption request from a local user), Last-ACK (waiting for confirmation of the original connection interruption request sent to the remote TCP), Closed (no connection status), etc.

[0050] Session state information refers to the protocol stack state information maintained for a specific communication or transaction at a certain protocol or application level. For the 5G core network, especially network elements such as AMF and UPF, the session state may include: NGAP session state (including session establishment, modification and release states, as well as context information associated with the session, such as the ID of the user equipment UE, the protocol data unit session ID, security parameters, etc.), session life cycle information (including the start time, duration, IP address and port number of the peer node, etc. of the session), and configuration of session-related parameters (such as quality of service QoS parameters, routing selection policies, billing information, etc.).

[0051] In addition, the protocol stack status information also includes: sequence number and confirmation number, window size information for flow control, ID used to uniquely identify a session or connection (such as TCP's four-tuple: source IP, source port, destination IP, destination port, NGAP's session ID, etc.), error status (such as timeout, too many retransmissions, etc.), etc.

[0052] The above-mentioned protocol stack states can reflect the establishment, maintenance and termination process of the communication connection, as well as the details of the data transmission and interaction during the connection. It should be noted that the protocol stack state information recorded by each protocol stack interaction unit in the core network element is the updated protocol stack state information to ensure that the latest protocol stack state information is obtained each time.

[0053] Step S204: when the protocol stack state information recorded by the target protocol stack interaction unit changes, the latest protocol stack state information recorded by the target protocol stack interaction unit is synchronized to other protocol stack interaction units in the core network element.

[0054] In the technical solution provided in the above step S204, when the target protocol stack interaction unit detects a change in state (including but not limited to the connection state and session information of protocols such as TCP and NGAP), the changed state will be immediately captured and converted into a synchronizable state update message, and synchronized to all other protocol stack interaction units in the core network element in an efficient and reliable manner to ensure the consistency of the state, so as to enhance the disaster recovery capability of the core network element. Therefore, the latest protocol stack state information recorded by the above target protocol stack interaction unit may include but is not limited to: modifying the state identifier of the protocol stack or session; updating state-related parameters such as sequence number, confirmation number, window size, etc.; storing any other information related to the state change, such as the detailed content of the session modification, timestamp, etc.

[0055] Based on the scheme defined by the above steps S202 to S204, it can be known that, in the embodiment, a protocol stack status information synchronization mechanism is adopted to achieve the technical effect of real-time sharing of status information between all protocol stack interaction units in the core network network elements, so that even when a single protocol stack interaction unit fails or a new protocol stack interaction unit is added, the continuity and consistency of the communication connection and session status of the entire system can be maintained, thereby ensuring the purpose of high availability and business continuity of network services, and further solving the technical problem that the process of re-establishing a connection with the communication counterpart due to a failure of a protocol stack interaction unit of a network element in the signaling plane load balancing system is time-consuming and easily leads to damage to the protocol service.

[0056] The following describes each step of the protocol stack state synchronization method in conjunction with a specific implementation process.

[0057] In a typical network communication model, such as the OSI (Open System Interconnection) seven-layer model or the TCP / IP model, the protocols used in each protocol layer are usually defined at the beginning of the design and architecture, and remain unchanged throughout the communication process. The protocols of each layer are designed to perform specific functions and are ordered in the hierarchy, with the upper layers relying on the services provided by the lower layers. For example, in the TCP / IP model, the transport layer mainly uses TCP or UDP protocols, while the network layer uses IP protocols. Therefore, the protocols in each protocol layer of the core network element are basically fixed, and the choice of protocols can be adjusted according to the actual network environment.

[0058] Specifically, the types of protocols used by each protocol layer can be divided into: stateful protocols (StatefulProtocols) and stateless protocols (Stateless Protocols), among which:

[0059] Stateful protocols need to maintain protocol stack status information about the communicating parties or multiple nodes during the communication process. This means that the protocol will track the history of a specific session or connection, including but not limited to the connection establishment status, data transmission status, sequence number, confirmation number, window size, etc. These protocol stack status information are critical to ensuring the reliability and order of communication. Stateful protocols maintain "memory" between each communication event (such as the sending and receiving of data packets), allowing the protocol to detect and correct errors and resend data packets when necessary to ensure data integrity and correct order. Stateful protocols include but are not limited to: Transmission Control Protocol TCP, Next Generation Application Protocol NAGP, File Transfer Protocol FTP, Hypertext Transfer Protocol HTTP (when using persistent connections), etc.

[0060] Stateless protocols do not save any information about the communication history when processing communications. Each communication (such as the sending of a data packet) is independent and self-contained. When a unit in the protocol stack receives a request, it does not rely on the previous protocol stack state information to process the current request or data packet. The design of stateless protocols simplifies the communication process, reduces the complexity of state maintenance and resource consumption, but it also means that they do not provide reliability guarantees for data transmission. Stateless protocols include but are not limited to: Hypertext Transfer Protocol HTTP (when using non-persistent connections), User Datagram Protocol UDP, etc.

[0061] Therefore, when performing protocol stack state synchronization, the embodiment of the present application only synchronizes the state data corresponding to the stateful protocol, and there is no need to synchronize the state data corresponding to the stateless protocol. This is because the design of the stateless protocol does not rely on the maintenance of the session state, and each datagram is processed independently, so there is no state continuity problem.

[0062] As an optional implementation, in the technical solution provided by the above step S202, the method includes the following steps: first, obtaining the signaling traffic when the core network element communicates with the communication counterpart using a stateful protocol, wherein the core network element includes at least one protocol stack interaction unit; then using an equal-cost routing strategy to load the signaling traffic to each protocol stack interaction unit in the core network element, and each protocol stack interaction unit updates its own recorded protocol stack status information based on the received signaling traffic.

[0063] The above scheme can be understood as follows: by using a traffic detection mechanism to monitor signaling traffic at the entrance of the core network element or the network processing layer, the signaling traffic that uses a stateful protocol for communication is identified; the monitored signaling traffic is loaded to each protocol stack interaction unit in the core network element through the equal-cost routing strategy (ECMP), and each protocol stack interaction unit will update the state according to the received signaling message and the rules of the internal state machine. For example, when a SYN message is received from the other end, the TCP protocol stack will enter the SYN_SEND state and wait for the confirmation of the other end. As the signaling is processed, the state will be gradually updated until the connection is established.

[0064] The above-mentioned equal-cost routing strategy means that when there are multiple paths with the same cost (or equivalent) to reach the same destination, the traffic will be dispersed to these paths. Therefore, the equal-cost routing strategy treats multiple physical links as one logical link, and aggregates bandwidth by dispersing traffic to these links to improve the total throughput of the network. This ensures that even if a path fails, data can still reach the destination through other equal-cost paths, improving the reliability and disaster recovery capabilities of the network and avoiding the impact of single-point failures on the network.

[0065] In addition, refer to Figure 3The load balancing system of the signaling plane of the 5G core network shown in the figure, wherein each 5GC network element (such as AMF) can be regarded as composed of three types of components, namely, a protocol stack interaction unit, a signaling processing unit, and a data storage unit, and each type of component can have multiple. The protocol stack processing unit is responsible for establishing and maintaining signaling-related protocol sessions with the opposite end (such as a base station) (such as TCP protocol connection state establishment and management, or NGAP protocol connection and state management); after parsing the received signaling message, the protocol stack processing unit delivers the parsed signaling content to the signaling processing unit for related business processing; user-related information contained in the signaling traffic, such as user context data, will be uniformly stored and managed by the data storage unit for use by the signaling processing unit; at this time, for some stateless protocol interactions (such as some interactions based on the UDP protocol), related data synchronization, such as user information, is managed by the data storage unit, so for multiple signaling processing units, it can ensure that the user data they obtain is synchronized.

[0066] Furthermore, when the protocol stack state information recorded by the target protocol stack interaction unit changes, that is, when the target protocol stack interaction unit processes a signaling message or a data packet, it will detect whether the connection state information and / or session state information of the protocol layer has changed according to the protocol rules. For example, in the TCP protocol, if an ACK message is received, indicating that the data segment has been confirmed, this will trigger a state machine update, which may be updated from the ACK_SENT state to the ESTABLISHED state; in the NGAP session, after receiving a session modification request, the system state will be updated from SESSION_ESTABLISHED to SESSION_MODIFYING.

[0067] Once a change in the protocol stack state information is detected, the target protocol stack interaction unit will immediately update its internal state record. In order to ensure that all protocol stack interaction units have the latest protocol stack state information, a state synchronization strategy needs to be implemented. Specifically, in the embodiments of the present application, a state synchronization strategy such as a message queue mechanism, a central state database mechanism, or a state synchronization mechanism based on a consensus algorithm can be adopted, where:

[0068] If the message queue mechanism is used for state synchronization, then when the protocol stack state information recorded by the target protocol stack interaction unit changes, it can use the changed protocol stack state information as an event message, and the message format and content design follow standardized conventions to ensure the integrity and consistency of the information. Then, the generated event message is sent to a pre-configured message queue system, such as RabbitMQ, Kafka, etc. These systems are responsible for reliably distributing messages to all other protocol stack interaction units in the core network element. Other protocol stack interaction units subscribe to message queues, receive and process state update messages, and apply the latest received protocol stack state information to their own state records, so as to synchronize the protocol connection information with the target protocol stack interaction unit.

[0069] If a central database mechanism is used for state synchronization, a centralized state database can be maintained in advance inside the core network element, which stores the connection status and session information of all protocol stack interaction units. Once the protocol stack state information recorded by the target protocol stack interaction unit changes, the protocol stack state information of the corresponding entry in the central state database is directly updated instead of being directly notified to other protocol stack interaction units. Other protocol stack interaction units can read the latest protocol stack state information of the target protocol stack interaction unit from the central state database regularly or when necessary to keep their own state consistent with the protocol stack state information stored in the central database.

[0070] If the state synchronization mechanism based on the consensus algorithm is used for state synchronization, once the protocol stack state information recorded by the target protocol stack interaction unit changes, it can directly encapsulate the latest protocol stack state information recorded by the target protocol stack interaction unit into a state update message, and broadcast it to other protocol stack interaction units in the core network element through the message, where the final confirmation and application of the information depends on a certain consensus algorithm (such as Raft, Paxos, etc.). Through the consensus algorithm, all protocol stack interaction units reach a consensus on the state change, ensuring that the state update is applied atomically on all nodes to avoid the problem of inconsistent state. Once consensus is reached, each protocol stack interaction unit will synchronously apply the state change and update their respective protocol connection information records.

[0071] In addition to the several implementation schemes listed above, based on the broad applicability and flexibility of the basic concept of the present invention, those skilled in the art may also implement protocol stack state information state synchronization through other technical schemes. For example, those skilled in the art may make changes to the above implementation schemes, which should also be within the protection scope of the present invention.

[0072] Optionally, when a new protocol stack interaction unit is added in a core network element, protocol stack state information recorded by all protocol stack interaction units in the core network element is synchronized to the new protocol stack interaction unit.

[0073] That is to say, when a new protocol stack interaction unit is added to a core network element, it first needs a process of initializing the protocol stack state information. This usually means that the new protocol stack interaction unit needs to start from scratch and obtain the protocol stack state and session protocol stack state information stored in all existing protocol stack interaction network elements by adopting the state synchronization mechanism provided by this application, so as to be able to take over the functions of other protocol stack interaction units.

[0074] Optionally, when a faulty protocol stack interaction unit in a core network element recovers to normal, protocol stack status information recorded by all protocol stack interaction units in the core network element is synchronized to the protocol stack interaction unit that recovers from the fault.

[0075] That is to say, in the core network element, when a protocol stack interaction unit fails, it can be isolated from the cluster participating in state synchronization and business processing through the detection mechanism. Before the protocol stack interaction unit fails, the protocol stack interaction unit in the core network element may have implemented a backup mechanism for state information, such as by regularly writing state information to a central database, or retaining a copy of state information on other units. This backup ensures that even if a unit fails, its state information will not be completely lost. Therefore, when the failed protocol stack interaction unit returns to normal, it first needs to notify other protocol stack interaction units or state managers in the cluster of its recovery state. This notification may be achieved through a specific recovery completion message or through a heartbeat mechanism participating in state synchronization. After receiving the recovery notification of the fault recovery unit, the protocol stack state and session protocol stack state information stored in all existing protocol stack interaction network elements are obtained by adopting the state synchronization mechanism provided by the present application, so as to copy the latest state information to the restored protocol stack interaction unit, thereby ensuring that it can seamlessly rejoin the network communication and maintain the high availability and disaster recovery capability of the system. This mechanism is critical to ensuring that core network elements can maintain business continuity in the face of single point failures, especially in network environments with high complexity and high reliability requirements such as the 5G core network (5GC).

[0076] It should be noted that when synchronizing the state information, it is necessary to ensure the integrity of the state, that is, the protocol stack state information received by the new protocol stack interaction unit / fault recovery unit is complete and up-to-date. This can be achieved by including a version number or timestamp in the protocol stack state information to ensure that the new protocol stack interaction unit / fault recovery unit can identify and apply the latest state information. In addition, in order to ensure the correctness of the state information synchronization, the new protocol stack interaction unit / fault recovery unit may need to send a state synchronization confirmation to other protocol stack interaction units or state managers in the system after receiving and applying the state information. This can be a simple heartbeat mechanism, indicating that the new protocol stack interaction unit / fault recovery unit is ready and has all the necessary state information.

[0077] Considering that protocol stack status information is crucial to the reliability, efficiency and security of network communications, the above-mentioned protocol stack status synchronization mechanism can ensure that all protocol stack interaction units within the core network element have complete protocol stack status information. The core network element is allowed to ensure that the built-in protocol and session status of each protocol stack interaction unit within the core network element are correct in scenarios such as fault recovery, load balancing and disaster recovery switching, so that it can correctly process the received signaling messages. In this way, session renegotiation is avoided when a protocol stack interaction unit fails and when recovery causes signaling traffic switching, avoiding unnecessary renegotiation or interruption, thereby ensuring business continuity and user experience.

[0078] Example 2

[0079] According to an embodiment of the present application, a protocol stack state synchronization device for implementing the protocol stack state synchronization method in embodiment 1 is also provided. Figure 4 As shown, the protocol stack state synchronization device at least includes: a determination module 41 and a synchronization module 42, wherein:

[0080] The determination module 41 is used to determine the protocol stack state information recorded by each protocol stack interaction unit in the core network element, wherein the protocol stack state information at least includes: connection state information and session state information of each protocol layer when the core network element communicates with the communication peer;

[0081] The synchronization module 42 is used to synchronize the latest protocol stack state information recorded by the target protocol stack interaction unit to other protocol stack interaction units in the core network element when the protocol stack state information recorded by the target protocol stack interaction unit changes.

[0082] It should be noted that each module in the protocol stack state synchronization device in the embodiment of the present application corresponds one by one to each implementation step of the protocol stack state synchronization method in Example 1. Since a detailed description has been given in Example 1, some details not reflected in this embodiment can be referred to Example 1 and will not be repeated here.

[0083] Example 3

[0084] According to an embodiment of the present application, a computer program product is further provided. The computer program product includes a computer program. When the computer program is executed by a processor, the protocol stack state synchronization method in Embodiment 1 is implemented.

[0085] According to an embodiment of the present application, a non-volatile storage medium is also provided, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the protocol stack state synchronization method in Example 1 by running the computer program.

[0086] According to an embodiment of the present application, a processor is further provided, which is used to run a computer program, wherein the protocol stack state synchronization method in Example 1 is executed when the computer program is running.

[0087] According to an embodiment of the present application, an electronic device is also provided. The network device includes: a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the protocol stack state synchronization method in Example 1 through the computer program.

[0088] Specifically, the computer program executes the following steps when it is running: determining the protocol stack status information recorded by each protocol stack interaction unit in the core network network element, wherein the protocol stack status information at least includes: connection status information and session status information of each protocol layer when the core network network element communicates with the communication counterpart; when the protocol stack status information recorded by the target protocol stack interaction unit changes, synchronizing the latest protocol stack status information recorded by the target protocol stack interaction unit to other protocol stack interaction units in the core network network element.

[0089] As an optional implementation, the above network device may exist in the form of a mobile terminal, a computer terminal or a similar computing device. Figure 5 FIG. 1 shows a hardware structure block diagram of a network device for implementing a protocol stack state synchronization method. Figure 5As shown, the network device 50 may include one or more (502a, 502b, ..., 502n are used to illustrate) processors 502 (the processor 502 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 504 for storing data, and a transmission device 506 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 5 The structure shown is only for illustration and does not limit the structure of the above network device. Figure 5 More or fewer components as shown, or with Figure 5 Different configurations are shown.

[0090] It should be noted that the one or more processors 502 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the network device 50. As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0091] The memory 504 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the protocol stack state synchronization method in the embodiment of the present application. The processor 502 executes various functional applications and data processing by running the software programs and modules stored in the memory 504, that is, realizing the vulnerability detection method of the above-mentioned application. The memory 504 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 504 may further include a memory remotely arranged relative to the processor 502, and these remote memories may be connected to the network device 50 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0092] The transmission device 506 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the network device 50. In one example, the transmission device 506 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 506 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0093] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the network device 50 .

[0094] The serial numbers of the above embodiments are only for description and do not represent the advantages or disadvantages of the embodiments.

[0095] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0096] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0097] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0098] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0099] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.

[0100] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A protocol stack state synchronization method, characterized in that: include: Determine the protocol stack status information recorded by each protocol stack interaction unit in the core network element, wherein the protocol stack status information at least includes: connection status information and session status information of each protocol layer when the core network element communicates with the communication peer; When the protocol stack state information recorded by the target protocol stack interaction unit changes, the latest protocol stack state information recorded by the target protocol stack interaction unit is synchronized to other protocol stack interaction units in the core network element.

2. The method according to claim 1, characterized in that The types of protocols used by each of the protocol layers include: stateful protocols or stateless protocols, wherein the stateful protocols include at least one of the following: Transmission Control Protocol, Next Generation Application Protocol, File Transfer Protocol; the stateless protocols include at least one of the following: Hypertext Transfer Protocol, User Datagram Protocol.

3. The method according to claim 1, characterized in that Determine the protocol stack status information recorded by each protocol stack interaction unit in the core network element, including: Acquire signaling traffic when the core network element communicates with the communication peer using a stateful protocol, wherein the core network element includes at least one protocol stack interaction unit; The signaling traffic is loaded to each protocol stack interaction unit in the core network element by adopting an equal-cost routing strategy, and each protocol stack interaction unit updates its recorded protocol stack state information respectively according to the received signaling traffic.

4. The method according to claim 1, characterized in that Synchronizing the latest protocol stack state information recorded by the target protocol stack interaction unit to other protocol stack interaction units in the core network element, including: The latest protocol stack status information recorded by the target protocol stack interaction unit is encapsulated into a status update message, and the message is broadcast to other protocol stack interaction units in the core network element.

5. The method according to claim 1, characterized in that Synchronizing the latest protocol stack state information recorded by the target protocol stack interaction unit to other protocol stack interaction units in the core network element, including: The latest protocol stack status information recorded by the target protocol stack interaction unit is written into a preset central database, wherein other protocol stack interaction units in the core network element obtain the latest protocol stack status information recorded by the target protocol stack interaction unit through the central database.

6. The method according to claim 1, characterized in that The method further comprises: When a new protocol stack interaction unit is added in the core network element, the protocol stack state information recorded by all the protocol stack interaction units in the core network element is synchronized to the new protocol stack interaction unit.

7. The method according to claim 1, characterized in that The method further comprises: When the faulty protocol stack interaction unit in the core network element returns to normal, the protocol stack status information recorded by all the protocol stack interaction units in the core network element is synchronized to the protocol stack interaction unit that has recovered from the fault.

8. A protocol stack state synchronization system, characterized in that: include: A determination module, used to determine the protocol stack state information recorded by each protocol stack interaction unit in the core network network element, wherein the protocol stack state information at least includes: connection state information and session state information of each protocol layer when the core network network element communicates with the communication peer; The synchronization module is used to synchronize the latest protocol stack state information recorded by the target protocol stack interaction unit to other protocol stack interaction units in the core network element when the protocol stack state information recorded by the target protocol stack interaction unit changes.

9. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a computer program, wherein the device where the non-volatile storage medium is located executes the protocol stack state synchronization method according to any one of claims 1 to 7 by running the computer program.

10. A network device, characterized in that: include: A memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the protocol stack state synchronization method according to any one of claims 1 to 7 through the computer program.