A hot backup processing method, device, equipment and machine-readable storage medium
By dividing the reserved space in memory for hot backup, the performance overhead caused by frequent memory application and recycling in hot backup is solved, and efficient service transmission of network equipment is achieved.
Patent Information
- Application Number
- CN202110598005.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-31
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2041-05-31
AI Technical Summary
When deploying dual-machine hot backups in key locations in the network, hot backups frequently perform memory application and recycling processes in the prior art, resulting in large performance overhead and inability to effectively ensure uninterrupted service transmission.
The dedicated reserved space is divided in the memory for hot backup, and the dedicated space is divided into the reserved space to fill in the unique information of the hot backup message, generate hot backup messages, avoid frequent memory application and recycling processes, and use fixed information to generate hot backup messages.
By dividing reserved space in memory, performance overhead during hot backup is reduced and uninterrupted service transmission is ensured.
Smart Images

Figure CN113505022B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communication technology, and in particular to a hot backup processing method, apparatus, device, and machine-readable storage medium. Background Art
[0002] With the rapid development of the internet and the digital transformation of various industries, the number of services carried by networks is increasing, and their importance is growing. Ensuring network reliability and uninterrupted service delivery has become a crucial challenge in network construction. In one type of network, a network device is deployed at the network egress. Services between the internal and external networks are processed and forwarded through this device. If this device fails, all services between the internal and external networks will be interrupted. Therefore, if only one device is used at this critical location in the network, no matter how reliable it is, there is always the risk of network disruption due to a single point of failure.
[0003] Therefore, two network devices are usually deployed at key locations on the network to improve network reliability. When the primary device fails, traffic is forwarded through the backup device, ensuring uninterrupted service between the internal and external networks. For traditional network devices (such as switches and routers), only Layer 2 network redundancy and routing table backup are required to ensure uninterrupted service transmission. However, for devices that require status detection and policy processing of messages (such as firewalls, intrusion prevention, web firewalls, and Internet behavior auditing), the legitimacy of the first packet of a flow will be checked and a session will be established to record the message status information (including the message's source IP, source port, destination IP, destination port, protocol, etc.). Subsequent packets of this flow will only be processed and forwarded on such devices if they match the session. If subsequent packets do not match the session, they will be discarded.
[0004] Therefore, when deploying such devices in dual-node deployment, consistency of service entry information and key configuration information between the two devices is essential to ensure uninterrupted service delivery. Hot standby can ensure consistency of service entry information and key configuration information between the two devices, but hot standby frequently executes memory allocation and deallocation processes, resulting in high performance overhead. Furthermore, all information must be copied, further increasing performance overhead. Summary of the Invention
[0005] In view of this, the present disclosure provides a hot backup processing method, device, electronic device, and machine-readable storage medium to improve the above-mentioned problem of high hot backup performance overhead.
[0006] The specific technical solutions are as follows:
[0007] The present disclosure provides a hot standby processing method, which is applied to a hot standby device. The method includes: creating an associated session in a reserved space and generating associated service table item information based on a received message; obtaining a dedicated space address in the reserved space, and filling the dedicated space with hot standby message unique information associated with the session; generating a hot standby message based on the hot standby message common information, service table item information, and the hot standby message unique information, and forwarding the hot standby message so that the hot standby device at the opposite end completes hot standby based on the hot standby message; the hot standby message common information is fixed information generated based on the configured hot standby function.
[0008] As a technical solution, the hot standby message public information includes a source MAC address, a destination MAC address, a source IP address, and a destination IP address.
[0009] As a technical solution, the step of obtaining a dedicated space address in the reserved space and filling the dedicated space with the unique information of the hot standby message associated with the session includes: reclaiming the dedicated space after forwarding the hot standby message.
[0010] The present disclosure provides a hot standby processing method, which is applied to a hot standby device, the method comprising: receiving a hot standby message sent by a hot standby device at the opposite end, and completing hot standby according to the hot standby message; the hot standby message is generated by the hot standby device at the opposite end according to the common information of the hot standby message, service table information and unique information of the hot standby message; the common information of the hot standby message is fixed information generated by the hot standby device at the opposite end according to the configured hot standby function; the service table information is generated by the hot standby device at the opposite end by creating an associated session in a reserved space according to the received message; and the unique information of the hot standby message is filled in a dedicated space of the reserved space of the hot standby device at the opposite end.
[0011] The present disclosure also provides a hot standby processing device, which is applied to a hot standby device. The device includes: a creation module, which is used to create an associated session in a reserved space and generate associated service table item information based on a received message; a filling module, which is used to obtain a dedicated space address in the reserved space and fill the dedicated space with hot standby message unique information associated with the session; a forwarding module, which is used to generate a hot standby message based on the hot standby message public information, service table item information and hot standby message unique information, and forward the hot standby message so that the hot standby device at the opposite end completes the hot standby according to the hot standby message; the hot standby message public information is fixed information generated according to the configured hot standby function.
[0012] As a technical solution, the hot standby message public information includes a source MAC address, a destination MAC address, a source IP address, and a destination IP address.
[0013] As a technical solution, the step of obtaining a dedicated space address in the reserved space and filling the dedicated space with the unique information of the hot standby message associated with the session includes: reclaiming the dedicated space after forwarding the hot standby message.
[0014] The present disclosure also provides a hot standby processing device, which is applied to a hot standby device, and the device includes: a receiving module, which is used to receive a hot standby message sent by a hot standby device at the opposite end, and complete hot standby according to the hot standby message; the hot standby message is generated by the hot standby device at the opposite end according to the hot standby message public information, service table information and hot standby message unique information; the hot standby message public information is fixed information generated by the hot standby device at the opposite end according to the configured hot standby function; the service table item information is generated by the hot standby device at the opposite end by creating an associated session in a reserved space according to the received message; the hot standby message unique information is filled in a dedicated space of the reserved space of the hot standby device at the opposite end.
[0015] The present disclosure also provides an electronic device, including a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the aforementioned hot backup processing method.
[0016] The present disclosure also provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the aforementioned hot backup processing method.
[0017] The above technical solution provided by the present disclosure brings at least the following beneficial effects:
[0018] A dedicated reserved space is allocated in the memory for hot backup. At the same time, a dedicated space is allocated in the reserved space to fill in the unique information of the hot backup message. When the hot backup is completed, the reserved space in the memory is used to complete the hot backup process, thereby avoiding frequent execution of memory application and recovery processes. At the same time, associated fixed information is generated for the public information of the hot backup message, and the fixed information is no longer copied each time in the hot backup process. In summary, performance overhead is reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments of the present disclosure or the description of the prior art. Obviously, the drawings described below are only some of the embodiments recorded in the present disclosure. For ordinary technicians in this field, other drawings can also be obtained based on these drawings of the embodiments of the present disclosure.
[0020] Figure 1is a flow chart of a hot backup processing method in one embodiment of the present disclosure;
[0021] Figure 2 is a structural diagram of a hot standby processing device in one embodiment of the present disclosure;
[0022] Figure 3 It is a hardware structure diagram of an electronic device in one embodiment of the present disclosure. DETAILED DESCRIPTION
[0023] The terms used in the embodiments of the present disclosure are intended only to describe specific embodiments and are not intended to limit the present disclosure. The singular forms "a," "an," "the," and "the" used in the present disclosure and claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to any or all possible combinations of one or more of the associated listed items.
[0024] It should be understood that although the terms first, second, third, etc. may be used to describe various information in the embodiments of the present disclosure, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" used may be interpreted as "at the time of" or "when" or "in response to determining".
[0025] In one technical solution, a memory pool is allocated during initialization to construct hot standby messages. After a device processes a service message and establishes a session, it requests memory space, copies session information, service information, and message information into this memory pool, constructs the message protocol information, and then sends the hot standby message to other devices. After successful transmission, the memory is released for reuse the next time a session is established. This solution frequently executes memory allocation and deallocation processes, resulting in high performance overhead. Furthermore, all information needs to be copied, further increasing performance overhead.
[0026] In view of this, the present disclosure provides a hot backup processing method, device, electronic device, and machine-readable storage medium to improve the above-mentioned problem of high hot backup performance overhead.
[0027] Specifically, the technical solution is described below.
[0028] In one embodiment, the present disclosure provides a hot standby processing method, which is applied to a hot standby device, the method comprising: creating an associated session in a reserved space and generating associated service table item information based on a received message; obtaining a dedicated space address in the reserved space, and filling the dedicated space with hot standby message unique information associated with the session; generating a hot standby message based on the hot standby message public information, service table item information and hot standby message unique information, and forwarding the hot standby message so that the hot standby device on the opposite end completes hot standby according to the hot standby message; the hot standby message public information is fixed information generated based on the configured hot standby function.
[0029] Specifically, if Figure 1 , including the following steps:
[0030] Step S11: creating an associated session in the reserved space according to the received message and generating associated service entry information;
[0031] Step S12: obtaining a dedicated space address in the reserved space, and filling the dedicated space with unique information of the hot standby message associated with the session;
[0032] Step S13: generating a hot standby message according to the hot standby message common information, the service table information and the hot standby message unique information, and forwarding the hot standby message.
[0033] A dedicated reserved space is allocated in the memory for hot backup. At the same time, a dedicated space is allocated in the reserved space to fill in the unique information of the hot backup message. When the hot backup is completed, the reserved space in the memory is used to complete the hot backup process, thereby avoiding frequent execution of memory application and recovery processes. At the same time, associated fixed information is generated for the public information of the hot backup message, and the fixed information is no longer copied each time in the hot backup process. In summary, performance overhead is reduced.
[0034] In one embodiment, the hot standby message public information includes a source MAC address, a destination MAC address, a source IP address, and a destination IP address.
[0035] In one embodiment, obtaining a dedicated space address in the reserved space and filling the dedicated space with the hot standby message unique information associated with the session includes: reclaiming the dedicated space after forwarding the hot standby message.
[0036] In one embodiment, the present disclosure provides a hot standby processing method, which is applied to a hot standby device, the method comprising: receiving a hot standby message sent by a peer hot standby device, and completing hot standby according to the hot standby message; the hot standby message is generated by the peer hot standby device according to the hot standby message common information, service table information, and hot standby message unique information; the hot standby message common information is fixed information generated by the peer hot standby device according to the configured hot standby function; the service table information is generated by the peer hot standby device by creating an associated session in a reserved space based on the received message; and the hot standby message unique information is filled in a dedicated space of the reserved space of the peer hot standby device. This embodiment is the peer hot standby device in the aforementioned embodiment, i.e., the backup hot standby device.
[0037] When the memory pool is initialized, reserved space corresponding to the hot standby message is reserved. Space is reserved according to the hot standby service needs to ensure that no memory application is required.
[0038] When the user configures the hot standby function, hot standby message public information is generated. Due to dual-machine hot standby, the address information of the two hot standby devices will not change in the normal process. This data generally includes the second and third layer information of the message, such as the source MAC address, destination MAC address, source IP address, and destination IP address. More fixed information related to the hot standby business can also be added according to the actual business situation.
[0039] When receiving a message, the primary hot standby device distinguishes the message that needs to create a session according to the message type, allocates it to the memory of the hot standby reserved space, then creates the associated session, generates the associated business table entry information, and obtains the corresponding dedicated space control structure through the general space control structure of the message space in the memory, thereby obtaining the dedicated space reserved during initialization, and filling the dedicated space with the hot standby message-specific information.
[0040] The hot standby message is generated by gathering three pieces of data: common hot standby message information, service table information, and hot standby message-specific information. This information is then forwarded via the network interface card (NIC) to enable the hot standby device on the other end to complete the hot standby process. After the NIC completes the transmission, it reclaims the resources used in the aforementioned service and continues processing service messages, freeing up dedicated space for the next hot standby message generation and forwarding process.
[0041] In one embodiment, the present disclosure also provides a hot backup processing device, such as Figure 2, applied to a hot standby device, the device includes: a creation module 21, used to create an associated session in a reserved space and generate associated service table item information according to a received message; a filling module 22, used to obtain a dedicated space address in the reserved space, and fill the dedicated space with hot standby message unique information associated with the session; a forwarding module 23, used to generate a hot standby message according to the hot standby message public information, service table item information and hot standby message unique information, and forward the hot standby message to enable the hot standby device at the opposite end to complete the hot standby according to the hot standby message; the hot standby message public information is fixed information generated according to the configured hot standby function.
[0042] In one embodiment, the hot standby message public information includes a source MAC address, a destination MAC address, a source IP address, and a destination IP address.
[0043] In one embodiment, obtaining a dedicated space address in the reserved space and filling the dedicated space with the hot standby message unique information associated with the session includes: reclaiming the dedicated space after forwarding the hot standby message.
[0044] In one embodiment, the present disclosure also provides a hot backup processing device, which is applied to a hot backup device, and the device includes: a receiving module, which is used to receive a hot backup message sent by the hot backup device at the opposite end, and complete hot backup according to the hot backup message; the hot backup message is generated by the hot backup device at the opposite end according to the hot backup message public information, service table information and hot backup message unique information; the hot backup message public information is fixed information generated by the hot backup device at the opposite end according to the configured hot backup function; the service table item information is generated by the hot backup device at the opposite end according to the received message, creating an associated session in the reserved space; the hot backup message unique information is filled in the dedicated space of the reserved space of the hot backup device at the opposite end.
[0045] The device implementation is the same as or similar to the corresponding method implementation, and will not be repeated here.
[0046] In one embodiment, the present disclosure provides an electronic device, including a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the aforementioned hot backup processing method. From a hardware perspective, the hardware architecture diagram can be found in Figure 3 shown.
[0047] In one embodiment, the present disclosure provides a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the aforementioned hot backup processing method.
[0048] Here, the machine-readable storage medium can be any electronic, magnetic, optical or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as CD, DVD, etc.), or similar storage media, or a combination thereof.
[0049] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email transceiver, game console, tablet computer, wearable device, or any combination of these devices.
[0050] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing the present disclosure, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0051] Those skilled in the art will appreciate that embodiments of the present disclosure may be provided as methods, systems, or computer program products. Thus, the present disclosure may take the form of a fully hardware implementation, a fully software implementation, or an implementation combining software and hardware. Furthermore, embodiments of the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0052] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0053] Furthermore, these computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0054] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0055] Those skilled in the art will appreciate that embodiments of the present disclosure may be provided as methods, systems, or computer program products. Thus, the present disclosure may take the form of a fully hardware implementation, a fully software implementation, or an implementation combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (which may include, but are not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0056] The foregoing is merely an embodiment of the present disclosure and is not intended to limit the present disclosure. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure are intended to be included within the scope of the claims of the present disclosure.
Claims
1. A hot backup processing method, characterized in that: Applied to a hot standby device, the method includes: Based on the received message requiring a session, the associated session is created in the reserved space and associated service entry information is generated; Acquire a corresponding dedicated space control structure through the general space control structure of the reserved space to obtain a dedicated space address in the reserved space, fill the dedicated space with unique information of the hot standby message associated with the session, and reclaim the dedicated space after forwarding the hot standby message; Generate a hot standby message based on the hot standby message common information, service table information and hot standby message unique information, and forward the hot standby message so that the hot standby device at the opposite end completes the hot standby according to the hot standby message; The hot standby message public information is fixed information associated with the hot standby service and generated according to the configured hot standby function; The hot standby message unique information is information that is filled in the dedicated space and is recycled along with the dedicated space after the hot standby device forwards the hot standby message.
2. The method according to claim 1, characterized in that The hot standby message public information includes source MAC address, destination MAC address, source IP address, and destination IP address.
3. A hot backup processing method, characterized in that: Applied to a hot standby device, the method includes: Receive the hot standby message sent by the hot standby device at the opposite end and complete the hot standby according to the hot standby message; The hot standby message is generated by the hot standby device at the opposite end according to the hot standby message public information, service table information and hot standby message unique information; The hot standby message public information is fixed information associated with the hot standby service generated by the hot standby device at the opposite end according to the configured hot standby function; The service entry information is generated by the hot standby device at the opposite end according to the message received to create a session, and by creating an associated session in the reserved space; The unique information of the hot standby message is information filled in the dedicated space of the reserved space of the hot standby device at the opposite end and is recovered along with the dedicated space after the hot standby device forwards the hot standby message. The dedicated space is the corresponding dedicated space control structure obtained by the hot standby device at the opposite end through the general space control structure of the reserved space, and is recovered after forwarding the hot standby message.
4. A hot backup processing device, characterized in that: Applied to hot standby equipment, the device comprises: A creation module, configured to create a session based on received messages, create associated sessions in the reserved space, and generate associated service entry information; a filling module, configured to obtain a corresponding dedicated space control structure from the general space control structure of the reserved space to obtain a dedicated space address in the reserved space, fill the dedicated space with unique information of the hot standby message associated with the session, and reclaim the dedicated space after forwarding the hot standby message; A forwarding module, configured to generate a hot standby message based on the hot standby message common information, service table information, and hot standby message unique information, and forward the hot standby message so that the hot standby device at the opposite end completes the hot standby according to the hot standby message; The hot standby message public information is fixed information associated with the hot standby service and generated according to the configured hot standby function; The hot standby message unique information is information that is filled in the dedicated space and is recycled along with the dedicated space after the hot standby device forwards the hot standby message.
5. The device according to claim 4, characterized in that The hot standby message public information includes source MAC address, destination MAC address, source IP address, and destination IP address.
6. A hot backup processing device, characterized in that: Applied to hot standby equipment, the device comprises: The receiving module is used to receive the hot standby message sent by the hot standby device at the opposite end and complete the hot standby according to the hot standby message; The hot standby message is generated by the hot standby device at the opposite end according to the hot standby message public information, service table information and hot standby message unique information; The hot standby message public information is fixed information associated with the hot standby service generated by the hot standby device at the opposite end according to the configured hot standby function; The service entry information is generated by the hot standby device at the opposite end according to the message received to create a session, and by creating an associated session in the reserved space; The unique information of the hot standby message is information filled in the dedicated space of the reserved space of the hot standby device at the opposite end and is recovered along with the dedicated space after the hot standby device forwards the hot standby message. The dedicated space is the corresponding dedicated space control structure obtained by the hot standby device at the opposite end through the general space control structure of the reserved space, and is recovered after forwarding the hot standby message.
7. An electronic device, characterized in that: include: A processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the method according to any one of claims 1 to 3.
8. A machine-readable storage medium, characterized in that The machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Method for improving performance of communication server by using memory pool
CN103530239A
Access server memory management optimization method, access server and communication system
CN109918203A