Network resource pool session synchronization method and device, electronic equipment and storage medium

By encapsulating TCP packets into multicast or broadcast packets and forwarding them in real time, the problem of insufficient efficiency and accuracy of existing session synchronization methods is solved, and fast and accurate session synchronization between devices in the resource pool is achieved, thereby improving network performance.

CN119449820APending Publication Date: 2025-02-14YUDEAR TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411453171.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The existing session synchronization methods have insufficient efficiency and accuracy, especially when there are many devices and large network loads, which may lead to session loss or interruption and affect user experience.

Method used

The TCP packets obtained by the first device are encapsulated to form multicast messages or broadcast messages, and sent to other devices in the network resource pool through preset synchronization lines to realize real-time session synchronization.

Benefits of technology

It realizes fast and accurate synchronization of session information between BRAS devices in the resource pool, ensures consistency of session status, and improves the session management capabilities and overall network performance of the network resource pool.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119449820A_ABST
    Figure CN119449820A_ABST
Patent Text Reader

Abstract

The invention relates to a network resource pool session synchronization method and device, electronic equipment and a storage medium, and belongs to the technical field of communication, and the method comprises the following steps: packaging an obtained TCP message to obtain a packaged message; the TCP message comprises a handshake message or a waving message; the packaging message comprises a multicast message or a broadcast message; sending the packaging message to a second device in the network resource pool through a preset synchronization line; the packaging message is used for the second equipment to perform session synchronization. According to the network resource pool session synchronization method provided by the invention, the handshake message or the hand waving message is forwarded in real time, so that the session information among the BRAS devices in the resource pool is quickly and accurately synchronized, and the session management capability and the overall network performance of the network resource pool are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a network resource pool session synchronization method, device, electronic device and storage medium. Background Art

[0002] With the rapid development of network technology, network resource pools have become an important means to improve network service quality and efficiency. In a network resource pool, multiple Broadband Remote Access Servers / virtual Broadband Remote Access Servers (BRAS / vBRAS) devices work together to provide users with stable network services. These devices are usually deployed at the edge of the network and are responsible for processing user access requests and data forwarding.

[0003] In a network resource pool environment, it is critical to ensure session synchronization between devices. Because users may roam in different locations in the network, or because of load balancing and failover requirements, user sessions may migrate between different BRAS / vBRAS devices. If session synchronization is not achieved between devices, user sessions may be lost or interrupted, seriously affecting user experience.

[0004] Existing session synchronization methods mainly rely on periodic state exchange between devices or centralized session management servers. These synchronization methods have certain limitations in scalability, real-time, and fault tolerance. For example, periodic state exchange may generate a lot of network overhead, and when there are a large number of devices, the efficiency and accuracy of synchronization will be affected. The centralized session management server may become a single point of failure. Once the server fails, the session synchronization of the entire resource pool will be affected. Summary of the invention

[0005] In view of this, it is necessary to provide a network resource pool session synchronization method, device, electronic device and storage medium to solve the problems of low efficiency and accuracy of existing session synchronization methods.

[0006] In order to solve the above problem, the present invention provides a network resource pool session synchronization method, which is applied to a first device and includes: Encapsulating the acquired TCP message to obtain an encapsulated message; the TCP message includes a handshake message or a wave message; the encapsulated message includes a multicast message or a broadcast message; The encapsulated message is sent to a second device in a network resource pool via a preset synchronization line; the encapsulated message is used by the second device to perform session synchronization.

[0007] In a possible implementation, encapsulating the acquired TCP message to obtain an encapsulated message includes: A synchronization mark and a timestamp are added to the TCP message to obtain the encapsulated message.

[0008] In a possible implementation, the method further includes: When receiving traffic of an unsynchronized session, generating a hash value according to a target feature of the traffic; Sending a query message to the second device in a multicast manner; the query message includes the hash value; receiving a response message sent by the second device; the response message is sent by the second device when determining that a session matching the hash value exists in the session hash table; The session synchronization is performed based on the response message.

[0009] In a possible implementation, the target features include: Protocol type, source IP address, destination IP address, source port, and destination port.

[0010] The present invention also provides a network resource pool session synchronization method, which is applied to a second device and includes: Receiving an encapsulated message through a preset synchronization line; the encapsulated message is obtained by the first device encapsulating the acquired TCP message; the TCP message includes a handshake message or a wave message; the encapsulated message includes a multicast message or a broadcast message; Session synchronization is performed based on the encapsulated message.

[0011] In a possible implementation, the method further includes: Receiving a query message sent by the first device; the query message includes a hash value; the hash value is generated based on a target feature of traffic of an unsynchronized session; When it is determined that there is a session matching the hash value in the session hash table, a response message is sent to the first device; the response message is used by the first device to perform session synchronization.

[0012] The present invention also provides a network resource pool session synchronization device, comprising: An encapsulation module, used for encapsulating the acquired TCP message to obtain an encapsulated message; the TCP message includes a handshake message or a wave message; the encapsulated message includes a multicast message or a broadcast message; The sending module is used to send the encapsulated message to the second device in the network resource pool through a preset synchronization line; the encapsulated message is used for the second device to perform session synchronization.

[0013] The present invention also provides a network resource pool session synchronization device, comprising: A receiving module, configured to receive an encapsulated message through a preset synchronization line; the encapsulated message is obtained by encapsulating the acquired TCP message by the first device; the TCP message includes a handshake message or a wave message; the encapsulated message includes a multicast message or a broadcast message; A synchronization module is used to perform session synchronization based on the encapsulated message.

[0014] On the other hand, the present invention also provides an electronic device, including a memory and a processor, wherein: The memory is used to store programs; The processor is coupled to the memory and is used to execute the program stored in the memory to implement the network resource pool session synchronization method described in any of the above implementations.

[0015] On the other hand, the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the network resource pool session synchronization method described in any of the above implementations is implemented.

[0016] The beneficial effects of the present invention are as follows: the network resource pool session synchronization method, device, electronic device and storage medium provided by the present invention immediately encapsulate the TCP message into a multicast message or a broadcast message when the TCP message is obtained by the first device, and forward it to all other second devices in the network resource pool through a preset synchronization line, so that the second device can synchronously update its own TCP session table according to the received multicast message or broadcast message, so as to ensure that the devices in the network resource pool can establish and maintain TCP sessions in real time according to the handshake message or the wave message, thereby performing session synchronization and ensuring the consistency of the session state. By forwarding the handshake message or the wave message in real time, the session information between the BRAS devices in the resource pool is quickly and accurately synchronized, which effectively improves the session management capability and overall network performance of the network resource pool. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0018] Figure 1 One of the method flow charts of an embodiment of the network resource pool session synchronization method provided by the present invention; Figure 2 A second method flow chart of an embodiment of the network resource pool session synchronization method provided by the present invention; Figure 3A method flow chart 3 of an embodiment of the network resource pool session synchronization method provided by the present invention; Figure 4 One of the structural schematic diagrams of an embodiment of the network resource pool session synchronization device provided by the present invention; Figure 5 A second structural diagram of an embodiment of the network resource pool session synchronization device provided by the present invention; Figure 6 A schematic structural diagram of an embodiment of an electronic device provided by the present invention. DETAILED DESCRIPTION

[0019] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0020] In the description of the embodiments of the present invention, unless otherwise specified, "multiple" means two or more than two. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" may mean: A exists alone, A and B exist at the same time, and B exists alone.

[0021] The descriptions of "first", "second", etc. involved in the embodiments of the present invention are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the technical features defined as "first" or "second" may explicitly or implicitly include at least one of the features.

[0022] Figure 1 One of the method flow charts of an embodiment of the network resource pool session synchronization method provided by the present invention is as follows Figure 1 As shown, the network resource pool session synchronization method includes: S101, encapsulating the acquired TCP message to obtain an encapsulated message; the TCP message includes a handshake message or a wave message; the encapsulated message includes a multicast message or a broadcast message; S102. Send the encapsulated message to a second device in a network resource pool through a preset synchronization line; the encapsulated message is used for the second device to perform session synchronization.

[0023] The execution subject of the network resource pool session synchronization method provided by the present invention can be a first device, and the network resource pool includes multiple BRAS / vBRAS devices, wherein the first device can be any BRAS / vBRAS device in the network resource pool, and the second device can be a BRAS / vBRAS device in the network resource pool except the first device.

[0024] It should be noted that TCP messages include handshake messages or wave messages, and TCP messages can be used to establish or terminate TCP connections. Handshake messages can be SYN, SYN-ACK, or ACK, and wave messages can be FIN, FIN-ACK, etc.

[0025] In S101, the acquired TCP message is encapsulated to obtain an encapsulated message; the TCP message includes a handshake message or a wave message; the encapsulated message includes a multicast message or a broadcast message.

[0026] The first device may capture a TCP message from a network layer or an application layer, and after obtaining the TCP message, immediately encapsulate the TCP message and convert it into a format suitable for transmission in a specific network environment, such as a multicast message or a broadcast message.

[0027] In S102, the encapsulated message is sent to a second device in a network resource pool through a preset synchronization line; the encapsulated message is used for the second device to perform session synchronization.

[0028] The preset synchronization line is a high-bandwidth, low-latency communication link that can ensure the reliability and stability of messages during transmission, reduce the possibility of data loss or errors, and is specifically used for session synchronization information transmission between BRAS devices in the network resource pool.

[0029] The first device sends the encapsulated message to all the second devices in the network resource pool through a preset synchronization line, so that the second devices can receive and parse the encapsulated message, thereby achieving synchronization of the session state.

[0030] Exemplarily, when any BRAS device in the resource pool receives a TCP handshake message, the handshake message is encapsulated as a multicast message or a broadcast message, and forwarded to all other BRAS devices in the resource pool through a synchronous dedicated line to ensure that all devices can establish a TCP session based on the TCP handshake message.

[0031] When any BRAS device in the resource pool receives a TCP wave message, it also encapsulates the wave message into a multicast message or a broadcast message and forwards it through a synchronous dedicated line to notify other devices in the resource pool to release the corresponding TCP session and achieve synchronous termination of the session.

[0032] Compared with the prior art, the network resource pool session synchronization method provided in the embodiment of the present invention immediately encapsulates the TCP message into a multicast message or a broadcast message when the first device obtains the TCP message, and forwards it to all other second devices in the network resource pool through a preset synchronization line, so that the second device can synchronously update its own TCP session table according to the received multicast message or broadcast message, so as to ensure that the devices in the network resource pool can establish and maintain TCP sessions in real time according to the handshake message or the wave message, thereby performing session synchronization and ensuring the consistency of the session state. By forwarding the handshake message or the wave message in real time, the session information between the BRAS devices in the resource pool is quickly and accurately synchronized, which effectively improves the session management capability of the network resource pool and the overall network performance.

[0033] In some embodiments of the present invention, encapsulating the acquired TCP message to obtain an encapsulated message includes: A synchronization mark and a timestamp are added to the TCP message to obtain the encapsulated message.

[0034] The process of encapsulating the message may include: adding a synchronization identifier and a timestamp on the basis of retaining the key information of the TCP handshake / wave message to ensure the validity and freshness of the message.

[0035] In some embodiments of the present invention, it further comprises: When receiving traffic of an unsynchronized session, generating a hash value according to a target feature of the traffic; Sending a query message to the second device in a multicast manner; the query message includes the hash value; receiving a response message sent by the second device; the response message is sent by the second device when determining that a session matching the hash value exists in the session hash table; The session synchronization is performed based on the response message.

[0036] When the first device fails to synchronize to certain sessions due to a newly added device or a device failure, and the unsynchronized sessions generate traffic, the first device may generate a unique hash value according to target features of the traffic.

[0037] The first device initiates a query to all second devices in the resource pool in a multicast manner, requesting to confirm whether there is a session corresponding to the hash value, that is, sending a query message to all second devices, the query message including the generated hash value.

[0038] After receiving the inquiry message, the second device searches its own session hash table to determine whether there is a session matching the hash value.

[0039] The session hash table is used to store session information of all devices in the resource pool so as to query and respond when receiving inquiries.

[0040] If there is a session matching the hash value, a response message is sent to the first device, where the response message includes the duration of the session and other relevant information.

[0041] After receiving the response message, the first device establishes and maintains the corresponding TCP session according to the information contained in the response message, thereby achieving rapid synchronous recovery of the session.

[0042] Exemplarily, after receiving the response message, the first device may establish a new session entry according to the information contained in the response message, and simulate the TCP handshake process to ensure that subsequent data packets can be processed correctly.

[0043] If multiple second devices all send response messages, the first device may decide how to establish and maintain the new session according to a preset policy (for example, selecting the session with the longest duration).

[0044] The network resource pool session synchronization method provided in the embodiment of the present invention realizes fast session synchronization between devices by forwarding TCP handshake / wave messages in real time and handling the situation of unsynchronized sessions, ensures session continuity when users seamlessly switch devices in the network resource pool, and improves the efficiency and stability of session synchronization.

[0045] In some embodiments of the present invention, the target features include: Protocol type, source IP address, destination IP address, source port, and destination port.

[0046] A preset hash algorithm can be used to generate a unique hash value based on the target characteristics of the traffic. The target characteristics include protocol type, source IP address, destination IP address, source port and destination port. The hash value can be used to uniquely identify this specific session, thereby ensuring the accuracy of the query.

[0047] Figure 2 A second method flow chart of an embodiment of the network resource pool session synchronization method provided by the present invention is as follows: Figure 2 As shown, the network resource pool session synchronization method includes: S201, receiving an encapsulated message through a preset synchronization line; the encapsulated message is obtained by the first device encapsulating the acquired TCP message; the TCP message includes a handshake message or a wave message; the encapsulated message includes a multicast message or a broadcast message; S202: Perform session synchronization based on the encapsulated message.

[0048] The execution subject of the network resource pool session synchronization method provided by the present invention can be a second device. The network resource pool includes multiple BRAS / vBRAS devices, wherein the first device can be any BRAS / vBRAS device in the network resource pool, and the second device can be a BRAS / vBRAS device in the network resource pool except the first device.

[0049] The first device may capture a TCP message from a network layer or an application layer, and after obtaining the TCP message, immediately encapsulate the TCP message and convert it into a format suitable for transmission in a specific network environment, such as a multicast message or a broadcast message.

[0050] The preset synchronization line is a high-bandwidth, low-latency communication link that can ensure the reliability and stability of messages during transmission, reduce the possibility of data loss or errors, and is specifically used for session synchronization information transmission between BRAS devices in the network resource pool.

[0051] The first device sends the encapsulated message to all the second devices in the network resource pool through a preset synchronization line, so that the second devices can receive and parse the encapsulated message, thereby achieving synchronization of the session state.

[0052] The network resource pool session synchronization method provided in the embodiment of the present invention immediately encapsulates the TCP message into a multicast message or a broadcast message when the first device obtains the TCP message, and forwards it to all other second devices in the network resource pool through a preset synchronization line, so that the second device can synchronously update its own TCP session table according to the received multicast message or broadcast message, so as to ensure that the devices in the network resource pool can establish and maintain TCP sessions according to the handshake message or the wave message in real time, thereby performing session synchronization and ensuring the consistency of the session state. By forwarding the handshake message or the wave message in real time, the session information between the BRAS devices in the resource pool is quickly and accurately synchronized, which effectively improves the session management capability of the network resource pool and the overall network performance.

[0053] In some embodiments of the present invention, it further includes: Receiving a query message sent by the first device; the query message includes a hash value; the hash value is generated based on a target feature of traffic of an unsynchronized session; When it is determined that there is a session matching the hash value in the session hash table, a response message is sent to the first device; the response message is used by the first device to perform session synchronization.

[0054] When the first device fails to synchronize to certain sessions due to a newly added device or a device failure, and the unsynchronized sessions generate traffic, the first device may generate a unique hash value according to target features of the traffic.

[0055] The first device initiates a query to all second devices in the resource pool in a multicast manner, requesting to confirm whether there is a session corresponding to the hash value, that is, sending a query message to all second devices, the query message including the generated hash value.

[0056] After receiving the inquiry message, the second device searches its own session hash table to determine whether there is a session matching the hash value.

[0057] The session hash table is used to store session information of all devices in the resource pool so as to query and respond when receiving inquiries.

[0058] If there is a session matching the hash value, a response message is sent to the first device, where the response message includes the duration of the session and other relevant information.

[0059] After receiving the response message, the first device establishes and maintains the corresponding TCP session according to the information contained in the response message, thereby achieving rapid synchronous recovery of the session.

[0060] The network resource pool session synchronization method provided in the embodiment of the present invention realizes fast session synchronization between devices by forwarding TCP handshake / wave messages in real time and handling the situation of unsynchronized sessions, ensures session continuity when users seamlessly switch devices in the network resource pool, and improves the efficiency and stability of session synchronization.

[0061] The network resource pool session synchronization method provided by the present invention realizes real-time and efficient synchronization of TCP session information between BRAS devices in the resource pool by optimizing the synchronization mechanism, thereby ensuring the consistency of the session status of all devices. The synchronization method includes real-time session synchronization and session query and recovery.

[0062] (1) Real-time session synchronization: When any BRAS device in the resource pool receives a TCP handshake (SYN) or wave (FIN / RST) message, it immediately encapsulates the message into a multicast or broadcast message and forwards it to all other devices in the resource pool through a preset dedicated synchronization line. The receiving device synchronously updates its own TCP session table based on the content of the received message, thereby ensuring that all BRAS devices can establish and maintain TCP sessions in real time based on TCP handshake / wave messages, achieving consistency in session status.

[0063] (2) Session query and recovery: If some devices fail to synchronize to certain sessions due to the addition of new devices or device failure, when these unsynchronized sessions generate traffic, the device receiving the traffic will use the traffic protocol type, source IP address, destination IP address, source port, and destination port information to generate a unique hash value. Subsequently, the device initiates a query to all devices in the resource pool via multicast, requesting confirmation of whether a session corresponding to the hash value exists. After receiving the query, other devices query their own session table and return response information on whether the session exists, including the current duration of the session. If any positive response is received, the device that is not synchronized to the session establishes and maintains the corresponding session based on the response information.

[0064] The present invention also provides a network resource pool session synchronization system, comprising: The message encapsulation and forwarding module is responsible for encapsulating the received TCP handshake / wave message into a multicast or broadcast message and forwarding it to other devices in the resource pool through a synchronous dedicated line.

[0065] The session table management module maintains the TCP session table of the device and updates the session information according to the received synchronization message or query response.

[0066] The query initiation and response processing module generates a hash value and initiates a query when it detects traffic from an unsynchronized session. It receives and processes query responses from other devices and establishes or updates sessions based on the response information.

[0067] Figure 3 A method flow chart of an embodiment of the network resource pool session synchronization method provided by the present invention is as follows: Figure 3 As shown, the network resource pool session synchronization method includes: S301, message reception and encapsulation.

[0068] When the network interface of any BRAS / vBRAS device in the resource pool, i.e., the first device (hereinafter referred to as the local device), captures a TCP handshake (SYN, SYN-ACK, ACK message sequence) or a wave message (FIN, FIN-ACK, etc.), the message receiving module of the device will immediately respond and read these messages.

[0069] The read TCP handshake or wave message is passed to the message encapsulation and forwarding module. This module first verifies the integrity and validity of the message to ensure that the message has not been tampered with or damaged.

[0070] After verification, the message encapsulation and forwarding module will encapsulate the original TCP handshake or wave message into a new multicast or broadcast message. The encapsulation process may include adding additional header information to identify the message type, source device, timestamp, etc.

[0071] After encapsulation is complete, the module sends the encapsulated message to all other devices in the resource pool through a dedicated synchronization line (which may be a physically isolated VLAN or a dedicated network interface).

[0072] S302: Message forwarding and session synchronization.

[0073] When other devices in the resource pool, namely, second devices (hereinafter referred to as remote devices), receive the encapsulated multicast or broadcast messages, their message receiving modules decapsulate the messages and restore the original TCP handshake or wave messages.

[0074] The session management module of the remote device will establish or update the local TCP session table based on these restored messages. In this way, all devices will maintain a consistent TCP session state.

[0075] S303: Process the situation of unsynchronized session.

[0076] When the local device receives a data packet belonging to an unsynchronized session (i.e., the local device has no record of the session), the session query module is triggered.

[0077] The session query module extracts the protocol type, source IP, destination IP, source port, and destination port of the data packet and uses this information to generate a unique hash value.

[0078] Next, the module constructs a query message containing this hash value and sends it to all other devices in the resource pool via multicast.

[0079] S304: Response information processing and session establishment.

[0080] After receiving the query message, the remote device will search its own session table to see if there is a session that matches the hash value.

[0081] If a matching session exists, the remote device constructs a response message containing the session duration and other relevant information, and then sends it to the local device that initiated the query.

[0082] After the local device receives the response message, the session establishment and maintenance module will establish a new session entry based on this information and simulate the TCP handshake process (if necessary) to ensure that subsequent data packets can be processed correctly.

[0083] If multiple remote devices respond that the session exists, the local device may decide how to establish and maintain the new session based on a certain strategy (such as selecting the session with the longest duration).

[0084] Through the above steps, the present invention ensures that in the network resource pool, the consistency of sessions can be maintained between all BRAS / vBRAS devices, thereby improving the robustness and reliability of the network.

[0085] The network resource pool session synchronization method and device of the present invention realizes fast and accurate synchronization of session information between BRAS devices in the resource pool by forwarding TCP handshake / wave messages in real time and a hash value-based session query and recovery mechanism, thereby effectively improving the session management capability of the network resource pool and the overall network performance.

[0086] In order to better implement the network resource pool session synchronization method in the embodiment of the present invention, based on the network resource pool session synchronization method, the embodiment of the present invention also provides a network resource pool session synchronization device. Figure 4 One of the structural diagrams of an embodiment of the network resource pool session synchronization device provided by the present invention is as follows Figure 4 As shown, the network resource pool session synchronization device 400 includes: The encapsulation module 410 is used to encapsulate the acquired TCP message to obtain an encapsulated message; the TCP message includes a handshake message or a wave message; the encapsulated message includes a multicast message or a broadcast message; The sending module 420 is used to send the encapsulated message to the second device in the network resource pool through a preset synchronization line; the encapsulated message is used for the second device to perform session synchronization.

[0087] The network resource pool session synchronization device 400 provided in the above embodiment can implement the technical solution described in the above network resource pool session synchronization method embodiment. The specific implementation principles of the above modules or units can refer to the corresponding contents in the network resource pool session synchronization method embodiment, which will not be repeated here.

[0088] Figure 5 The second structural diagram of an embodiment of the network resource pool session synchronization device provided by the present invention is as follows Figure 5 As shown, the network resource pool session synchronization device 500 includes: The receiving module 510 is used to receive an encapsulated message through a preset synchronization line; the encapsulated message is obtained by the first device encapsulating the acquired TCP message; the TCP message includes a handshake message or a wave message; the encapsulated message includes a multicast message or a broadcast message; The synchronization module 520 is used to perform session synchronization based on the encapsulated message.

[0089] The network resource pool session synchronization device 500 provided in the above embodiment can implement the technical solution described in the above network resource pool session synchronization method embodiment. The specific implementation principles of the above modules or units can refer to the corresponding contents in the network resource pool session synchronization method embodiment, which will not be repeated here.

[0090] like Figure 6 As shown, the present invention also provides an electronic device 600. The electronic device 600 includes a processor 601, a memory 602 and a display 603. Figure 6 Only some components of the electronic device 600 are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0091] In some embodiments, the processor 601 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run program codes or process data stored in the memory 602, such as the network resource pool session synchronization method of the present invention.

[0092] In some embodiments, the processor 601 may be a single server or a server group. The server group may be centralized or distributed. In some embodiments, the processor 601 may be local or remote. In some embodiments, the processor 601 may be implemented in a cloud platform. In some embodiments, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an internal cloud, a multi-cloud, etc., or any combination thereof.

[0093] In some embodiments, the memory 602 may be an internal storage unit of the electronic device 600, such as a hard disk or memory of the electronic device 600. In other embodiments, the memory 602 may also be an external storage device of the electronic device 600, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., equipped on the electronic device 600.

[0094] Furthermore, the memory 602 may include both an internal storage unit of the electronic device 600 and an external storage device. The memory 602 is used to store application software installed in the electronic device 600 and various data.

[0095] In some embodiments, the display 603 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an organic light-emitting diode (OLED) touch device, etc. The display 603 is used to display information on the electronic device 600 and to display a visual user interface. The components 601-603 of the electronic device 600 communicate with each other via a system bus.

[0096] In one embodiment, when the processor 601 executes the network resource pool session synchronization program in the memory 602, the following steps may be implemented: Encapsulating the acquired TCP message to obtain an encapsulated message; the TCP message includes a handshake message or a wave message; the encapsulated message includes a multicast message or a broadcast message; The encapsulated message is sent to a second device in a network resource pool via a preset synchronization line; the encapsulated message is used by the second device to perform session synchronization.

[0097] It should be understood that: when the processor 601 executes the network resource pool session synchronization program in the memory 602, in addition to the above functions, other functions may also be implemented, and details may refer to the description of the above corresponding method embodiments.

[0098] Furthermore, the embodiment of the present invention does not specifically limit the type of the electronic device 600 mentioned, and the electronic device 600 may be a portable electronic device such as a mobile phone, a tablet computer, a personal digital assistant (PDA), a wearable device, a laptop computer, etc. Exemplary embodiments of portable electronic devices include but are not limited to portable electronic devices equipped with IOS, Android, Microsoft or other operating systems. The above-mentioned portable electronic device may also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the present invention, the electronic device 600 may not be a portable electronic device, but a desktop computer with a touch-sensitive surface (e.g., a touch panel).

[0099] Correspondingly, an embodiment of the present invention also provides a computer-readable storage medium, which is used to store computer-readable programs or instructions. When the program or instructions are executed by a processor, it can implement the steps or functions of the network resource pool session synchronization method provided in the above-mentioned method embodiments.

[0100] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the computer program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.

[0101] The network resource pool session synchronization method, device, electronic device and storage medium provided by the present invention are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A network resource pool session synchronization method, characterized in that: Applied to a first device, the method includes: Encapsulating the acquired TCP message to obtain an encapsulated message; the TCP message includes a handshake message or a wave message; the encapsulated message includes a multicast message or a broadcast message; The encapsulated message is sent to a second device in a network resource pool via a preset synchronization line; the encapsulated message is used by the second device to perform session synchronization.

2. The network resource pool session synchronization method according to claim 1, characterized in that: The step of encapsulating the acquired TCP message to obtain an encapsulated message includes: A synchronization mark and a timestamp are added to the TCP message to obtain the encapsulated message.

3. The network resource pool session synchronization method according to claim 1, characterized in that: Also includes: When receiving traffic of an unsynchronized session, generating a hash value according to a target feature of the traffic; Sending a query message to the second device by multicasting; The query message includes the hash value; receiving a response message sent by the second device; the response message is sent by the second device when determining that a session matching the hash value exists in the session hash table; The session synchronization is performed based on the response message.

4. The network resource pool session synchronization method according to claim 3, characterized in that: The target features include: Protocol type, source IP address, destination IP address, source port, and destination port.

5. A network resource pool session synchronization method, characterized in that: Applied to the second device, the method includes: Receiving an encapsulated message through a preset synchronization line; the encapsulated message is obtained by the first device encapsulating the acquired TCP message; the TCP message includes a handshake message or a wave message; the encapsulated message includes a multicast message or a broadcast message; Session synchronization is performed based on the encapsulated message.

6. The network resource pool session synchronization method according to claim 5, characterized in that: Also includes: Receiving an inquiry message sent by the first device; The inquiry message includes a hash value; The hash value is generated based on a target characteristic of the traffic of the unsynchronized session; When it is determined that there is a session matching the hash value in the session hash table, sending a response message to the first device; The response message is used by the first device to perform session synchronization.

7. A network resource pool session synchronization device, characterized in that: include: The encapsulation module is used to encapsulate the acquired TCP message to obtain an encapsulated message; The TCP message includes a handshake message or a wave message; The encapsulated message includes a multicast message or a broadcast message; The sending module is used to send the encapsulated message to the second device in the network resource pool through a preset synchronization line; the encapsulated message is used for the second device to perform session synchronization.

8. A network resource pool session synchronization device, characterized in that: include: A receiving module, used for receiving encapsulated messages through a preset synchronization line; The encapsulated message is obtained by the first device encapsulating the acquired TCP message; The TCP message includes a handshake message or a wave message; The encapsulated message includes a multicast message or a broadcast message; A synchronization module is used to perform session synchronization based on the encapsulated message.

9. An electronic device, characterized in that: comprising a memory and a processor, wherein: The memory is used to store programs; The processor is coupled to the memory and is used to execute the program stored in the memory to implement the network resource pool session synchronization method as described in any one of claims 1 to 6.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the network resource pool session synchronization method according to any one of claims 1 to 6 is implemented.

Citation Information

Cited By

  • Telephone traffic switching method, device, equipment, storage medium and computer program product

    CN120729993A

  • Traffic switching method, apparatus, device, storage medium and computer program product

    CN120729993B