Negotiation hot standby processing method and system based on FPGA and CPU collaboration

Through FPGA and CPU collaborative processing, the problems of low security and low algorithm processing performance in negotiated hot backup are solved, and more efficient hot backup data processing is achieved.

CN118199862BActive Publication Date: 2024-08-23JIANGSU NEW QUALITY INFORMATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410282918.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-12
Publication Date
2024-08-23
Estimated Expiration
2044-03-12

AI Technical Summary

Technical Problem

The existing negotiation software hot standby function has security risks in protecting the confidentiality of hot standby payloads, and the algorithm processing efficiency is low, resulting in delays in hot standby data processing.

Method used

The negotiated hot standby processing method based on the collaboration of FPGA and CPU is used to receive and analyze network data packets through FPGA, set and manage hot standby keys, optimize the algorithm processing process, and improve security and processing performance.

Benefits of technology

It improves the security and algorithm processing performance during the hot standby negotiation process and reduces the hot standby data processing delay.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118199862B
    Figure CN118199862B
Patent Text Reader

Abstract

A negotiation hot standby processing method and system based on the collaboration of FPGA and CPU, wherein the method initializes and configures parameters of FPGA through the configuration management interface by the startup management unit of the CPU, and the FPGA receives a network data packet. If the network data packet is a normal data communication hot standby packet, the network data packet is forwarded to the CPU; if the network data packet is a key setting packet of an external network interface, the FPGA sets the key; after completing the key setting, it is sent to the standby machine, waiting for data encryption and decryption and data sending and receiving; if the network data packet is a key request packet of an external network interface, the FPGA performs data analysis on the network data packet, applies for and sets a new key; the CPU receives the network data packet forwarded by the FPGA, performs protocol identification and classification, and if the network data packet forwarded by the FPGA is a key request packet, the key request packet is sent to the FPGA to set a new hot standby key. The present invention solves the problems of low security and low algorithm processing performance of software in the negotiation hot standby process, and delayed hot standby data processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer network communication, and in particular to a negotiation hot standby processing method and system based on FPGA and CPU collaboration. Background Art

[0002] At present, the negotiated software hot standby function is mostly based on the pre-shared key method for confidentiality protection of the hot standby load. The encryption, decryption and authentication algorithms are also pre-agreed upon. There is a lack of methods to update keys and algorithms, which poses a security risk. In terms of algorithm processing efficiency of the hot standby load, soft algorithms or call-based algorithm chips are usually used, which have a large delay in efficiency.

[0003] How to improve the security during the negotiation hot standby process and improve the algorithm processing performance to reduce the hot standby data processing delay is an urgent problem to be solved. Summary of the invention

[0004] To this end, the present invention provides a negotiation hot standby processing method and system based on FPGA and CPU collaboration to solve the problems of low software security and low algorithm processing performance and hot standby data processing delay during the negotiation hot standby process.

[0005] In order to achieve the above object, the present invention provides the following technical solution: a negotiated hot standby processing method based on FPGA and CPU collaboration, comprising:

[0006] The startup management unit of the CPU initializes and configures parameters of the FPGA through the configuration management interface, and the FPGA receives the network data packet and determines the category of the network data packet;

[0007] If the network data packet is a normal data communication hot standby packet, forwarding the network data packet to the CPU;

[0008] If the network data packet is a key setting packet of an external network interface, the FPGA performs data analysis on the network data packet, obtains the decryption mode, and sets the key; after completing the key setting, assembles a response packet indicating that the key is set successfully, sends it to the standby machine, and waits for data encryption and decryption and data sending and receiving;

[0009] If the network data packet is a key request packet of an external network interface, the FPGA performs data analysis on the network data packet, applies for the first hot standby key, obtains the decryption mode, decrypts the first hot standby key, randomly selects the encryption mode for the first hot standby key, and assembles the encrypted packet; after completing the setting of the first hot standby key, the first hot standby key setting packet is sent to the standby machine with the mac address; a) if the standby machine receives the first hot standby key setting packet, it waits for data encryption and decryption and data sending and receiving; b) if the standby machine does not receive the first hot standby key setting packet, it re-applies for the second hot standby key;

[0010] The CPU receives network data packets forwarded by the FPGA and performs protocol identification and classification;

[0011] If the network data packet forwarded by the FPGA is a key setting completion packet, c) if the key setting completion packet comes from the host, send a negotiation hot standby data packet; d) if the key setting completion packet comes from the backup machine, receive the negotiation hot standby data, and parse and process the negotiation hot standby data;

[0012] If the network data packet forwarded by the FPGA is a key request packet, the key request packet is sent to the FPGA to set a new hot standby key.

[0013] As a preferred solution for the negotiated hot standby processing method based on the collaboration of FPGA and CPU, after the FPGA starts the management unit, the CPU's startup management unit initializes and configures the parameters of the FPGA through the configuration management interface, initializes the network interface operating parameters of the FPGA, and completes the FPGA receiving network data packets with the initialized network interface operating parameters.

[0014] As a preferred solution for the negotiated hot standby processing method based on the collaboration of FPGA and CPU, the FPGA accesses the hot standby key address and performs a hot standby key query operation. If the host cannot query the hot standby key, it applies for the first hot standby key; the host encrypts the first hot standby key with a randomly selected encryption mode using the MAC address, assembles an encrypted package, and sends it to the standby machine.

[0015] As a preferred solution of the negotiated hot standby processing method based on the collaboration of FPGA and CPU, if the standby machine cannot query the first hot standby key, it sends the second hot standby key request to the host.

[0016] As a preferred solution for the negotiated hot standby processing method based on the collaboration of FPGA and CPU, the FPGA receives a new key setting package, decrypts it with the MAC address according to the decryption mode selected in the new key setting package, and obtains the key; the FPGA is set to the corresponding key address and sends a key setting success response packet.

[0017] The present invention also provides a negotiation hot standby processing system based on FPGA and CPU collaboration, comprising:

[0018] The CPU startup management unit is used to initialize and configure parameters of the FPGA through the configuration management interface;

[0019] The FPGA data category determination module is used to receive a network data packet through the FPGA and determine the category of the network data packet;

[0020] The FPGA first data forwarding module is used to forward the network data packet to the CPU if the network data packet is a normal data communication hot standby packet;

[0021] The second data forwarding module of FPGA is used for, if the network data packet is a key setting packet of the external network interface, FPGA performs data analysis on the network data packet, obtains the decryption mode, and sets the key; after completing the key setting, assembles a response packet of successful key setting, sends it to the standby machine, and waits for data encryption and decryption and data sending and receiving;

[0022] The third data forwarding module of FPGA is used for, if the network data packet is a key request packet of the external network interface, FPGA performs data parsing on the network data packet, applies for the first hot standby key, obtains the decryption mode, decrypts the first hot standby key, randomly selects the encryption mode for the first hot standby key, and assembles the encrypted packet; after completing the setting of the first hot standby key, the first hot standby key setting packet is sent to the standby machine with the mac address;

[0023] The standby machine data receiving and processing module is used for waiting for data encryption and decryption and data sending and receiving if the standby machine receives the first hot standby key setting package; if the standby machine does not receive the first hot standby key setting package, reapplying for a second hot standby key;

[0024] The CPU data category judgment module is used to receive network data packets forwarded by the FPGA and perform protocol identification and classification;

[0025] The first analysis and processing module of the CPU is used to transfer to the second analysis and processing module of the CPU if the network data packet forwarded by the FPGA is a key setting completion packet; if the network data packet forwarded by the FPGA is a key request packet, the key request packet is sent to the FPGA to perform a new hot standby key setting; the second analysis and processing module of the CPU is used to send a negotiated hot standby data packet if the key setting completion packet comes from the host; if the key setting completion packet comes from the backup machine, the negotiated hot standby data is received and the negotiated hot standby data is analyzed and processed.

[0026] As a preferred solution for the negotiated hot standby processing system based on FPGA and CPU collaboration, it also includes:

[0027] The FPGA initialization module is used to initialize and configure parameters of the FPGA through the configuration management interface after the startup management unit is started. The network interface operating parameters of the FPGA are initialized, and the FPGA receiving network data packets after the network interface operating parameters are initialized is completed.

[0028] As a preferred solution for the negotiated hot standby processing system based on the collaboration of FPGA and CPU, in the FPGA third data forwarding module, the FPGA accesses the hot standby key address and performs a hot standby key query operation. If the host cannot query the hot standby key, it applies for the first hot standby key; the host encrypts the first hot standby key with a randomly selected encryption mode using the MAC address, assembles an encrypted package, and sends it to the standby machine.

[0029] As a preferred solution of the negotiated hot standby processing system based on FPGA and CPU collaboration, in the FPGA third data forwarding module, if the standby machine cannot query the first hot standby key, it sends the second hot standby key request to the host.

[0030] As a preferred solution for the negotiated hot standby processing system based on the collaboration of FPGA and CPU, in the FPGA second data forwarding module, the FPGA receives a new key setting package, decrypts it with the MAC address according to the decryption mode selected in the new key setting package, and obtains the key; the FPGA is set to the corresponding key address and sends a key setting success response packet.

[0031] The present invention has the following advantages: the startup management unit of the CPU initializes and configures parameters of the FPGA through the configuration management interface, the FPGA receives a network data packet and determines the category of the network data packet: if the network data packet is a normal data communication hot standby packet, the network data packet is forwarded to the CPU; if the network data packet is a key setting packet of an external network interface, the FPGA performs data analysis on the network data packet, obtains the decryption mode, and sets the key; after completing the key setting, assembles a response packet of successful key setting, sends it to the standby machine, and waits for data encryption and decryption and data sending and receiving; if the network data packet is a key request packet of an external network interface, the FPGA performs data analysis on the network data packet, applies for the first hot standby key, obtains the decryption mode, decrypts the first hot standby key, and randomly selects the encryption mode for the first hot standby key Formula, assemble encryption package; after completing the setting of the first hot standby key, send the first hot standby key setting package to the standby machine with the mac address; a) if the standby machine receives the first hot standby key setting package, wait for data encryption and decryption and data sending and receiving; b) if the standby machine does not receive the first hot standby key setting package, reapply for the second hot standby key; CPU receives the network data packet forwarded by FPGA, performs protocol identification and classification: if the network data packet forwarded by FPGA is a key setting completion packet, c) if the key setting completion packet comes from the host, send a negotiation hot standby data packet; d) if the key setting completion packet comes from the standby machine, receive the negotiation hot standby data, parse and process the negotiation hot standby data; if the network data packet forwarded by FPGA is a key request packet, send the key request packet to FPGA to set a new hot standby key. The present invention utilizes FPGA and CPU for collaborative processing to solve the problems of low security and low algorithm processing performance of software in the negotiation hot standby process, and delayed hot standby data processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the drawings required for the implementation methods or the prior art descriptions are briefly introduced below. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.

[0033] The structures, proportions, sizes, etc. illustrated in this specification are only used to match the contents disclosed in the specification so as to facilitate understanding and reading by persons familiar with the technology. They are not used to limit the conditions under which the present invention can be implemented, and therefore have no substantial technical significance. Any structural modification, change in proportion or adjustment of size shall still fall within the scope of the technical contents disclosed in the present invention without affecting the effects and purposes that can be achieved by the present invention.

[0034] Figure 1 A schematic diagram of FPGA logic in a negotiated hot standby processing method based on FPGA and CPU collaboration provided in Example 1 of the present invention;

[0035] Figure 2 A CPU logic schematic diagram in the negotiated hot standby processing method based on FPGA and CPU collaboration provided in Example 1 of the present invention;

[0036] Figure 3 A schematic diagram of a negotiated hot standby processing system based on FPGA and CPU collaboration provided in Example 2 of the present invention.

[0037] Figure 4 A schematic diagram of a negotiated hot standby processing system solution based on FPGA and CPU collaboration provided in Example 3 of the present invention. DETAILED DESCRIPTION

[0038] The following is a description of the implementation of the present invention by specific embodiments. People familiar with the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. Obviously, the described embodiments are 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0039] Due to the current negotiation of software hot standby functions, the confidentiality protection of hot standby loads is mostly based on pre-shared keys, and the encryption, decryption and authentication algorithms are also pre-agreed. There is a lack of methods to update keys and algorithms, which poses a security risk. In terms of algorithm processing efficiency of hot standby loads, soft algorithms or call-based algorithm chips are usually used, which have large efficiency delays.

[0040] In view of this, the present invention utilizes FPGA and CPU to collaboratively process, and solves the problems of low security, low algorithm processing performance, and delayed hot standby data processing in the process of hot standby negotiation. The following is a specific implementation of the technical solution of the present invention.

[0041] Example 1

[0042] See also Figure 1 and Figure 2 Embodiment 1 of the present invention provides a negotiation hot standby processing method based on FPGA and CPU collaboration, and the FPGA processing process includes the following steps:

[0043] S001: After the FPGA is powered on, it completes the reset, starts the management unit to receive the configuration management instruction, and initializes the network interface of the FPGA. The next step is to go to S002;

[0044] S002: Receive network data packets through the network interface that completes the initialization of FPGA, and perform protocol identification and classification: if the network data packet is a normal data communication hot standby packet, go to S101 for processing; if the network data packet is a key setting packet, go to S201 for processing; if the network data packet is a key request packet, go to S301 for processing;

[0045] S101: Determine that the network data packet is a normal data communication hot standby packet, and then proceed to S402;

[0046] S201: Determine whether the network data packet is an external network interface key setting packet, and then go to S202.

[0047] S202: parse the network data packet, obtain the decryption mode, set the key, and then go to S203.

[0048] S203: Assemble a response packet indicating that the key is set successfully and send it to the standby machine.

[0049] S301: Determine that the network data packet is a key request packet from an external network interface, FPGA performs data analysis on the network data packet, and then proceeds to S302;

[0050] S302: FPGA applies for a new hot standby key, obtains the decryption mode, decrypts the new hot standby key, and then sets the new hot standby key to the specified location. The next step goes to S303.

[0051] S303: Randomly select an encryption mode for the new hot standby key, assemble an encryption package, and then go to S304.

[0052] S304: Send the new hot standby key setting package to the standby machine using the MAC address.

[0053] The CPU processing flow includes the following steps:

[0054] S401: After the CPU is powered on, it completes the reset, and the startup management unit initializes and configures the parameters of the FPGA through the configuration management interface, initializes the network interface of the FPGA, and sets the master and standby states and the master and standby IP addresses to the FPGA, and then goes to 402;

[0055] S402: Receive the network data packet forwarded by the FPGA, perform protocol identification and classification on the network data packet: if the network data packet is a key setting completion packet, proceed to S403 for processing; if the network data packet is a key request packet, proceed to S404 for processing;

[0056] S403: If the received network data packet is parsed as a key setting completion packet, the negotiation hot standby data function is enabled;

[0057] S404: If the received network data packet is parsed as a key request packet, the key request packet is sent to the FPGA, and the next step is to go to S301;

[0058] S405: If the key setting completion packet comes from the host, then send the hot standby data packet. If the key setting completion packet comes from the standby, then receive the negotiated hot standby data and parse the negotiated hot standby data.

[0059] In summary, the startup management unit of the CPU of the present invention initializes and configures parameters of the FPGA through the configuration management interface, and the FPGA receives a network data packet and determines the category of the network data packet: if the network data packet is a normal data communication hot standby packet, the network data packet is forwarded to the CPU; if the network data packet is a key setting packet of the external network interface, the FPGA performs data analysis on the network data packet, obtains the decryption mode, and sets the key; after completing the key setting, assembles a response packet for successful key setting, sends it to the standby machine, and waits for data encryption and decryption and data sending and receiving; if the network data packet is a key request packet of the external network interface, the FPGA performs data analysis on the network data packet, applies for the first hot standby key, obtains the decryption mode, decrypts the first hot standby key, and randomly selects the encryption mode for the first hot standby key , assemble an encryption package; after completing the setting of the first hot standby key, send the first hot standby key setting package to the standby machine with the mac address; a) if the standby machine receives the first hot standby key setting package, wait for data encryption and decryption and data sending and receiving; b) if the standby machine does not receive the first hot standby key setting package, reapply for the second hot standby key; the CPU receives the network data packet forwarded by the FPGA, performs protocol identification and classification: if the network data packet forwarded by the FPGA is a key setting completion packet, c) if the key setting completion packet comes from the host, send a negotiation hot standby data packet; d) if the key setting completion packet comes from the standby machine, receive the negotiation hot standby data, and parse and process the negotiation hot standby data; if the network data packet forwarded by the FPGA is a key request packet, send the key request packet to the FPGA to set a new hot standby key. The present invention utilizes FPGA and CPU collaborative processing to solve the problems of low software security and low algorithm processing performance in the negotiation hot standby process, and delayed hot standby data processing.

[0060] It should be noted that the method of the embodiment of the present disclosure can be performed by a single device, such as a computer or a server. The method of the present embodiment can also be applied in a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present disclosure, and the multiple devices will interact with each other to complete the described method.

[0061] It should be noted that the above describes some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0062] Example 2

[0063] See also Figure 3 Embodiment 2 of the present invention provides a negotiation hot standby processing system based on FPGA and CPU collaboration, including:

[0064] The CPU startup management unit 101 is used to initialize and configure parameters of the FPGA through the configuration management interface;

[0065] FPGA data category determination module 202, used to receive network data packets through FPGA and determine the category of the network data packets;

[0066] The FPGA first data forwarding module 203 is used to forward the network data packet to the CPU if the network data packet is a normal data communication hot standby packet;

[0067] The FPGA second data forwarding module 204 is used for, if the network data packet is a key setting packet of the external network interface, the FPGA performs data analysis on the network data packet, obtains the decryption mode, and sets the key; after completing the key setting, assembles a response packet of successful key setting, sends it to the standby machine, and waits for data encryption and decryption and data sending and receiving;

[0068] The FPGA third data forwarding module 205 is used for, if the network data packet is a key request packet of the external network interface, the FPGA performs data analysis on the network data packet, applies for the first hot standby key, obtains the decryption mode, decrypts the first hot standby key, randomly selects the encryption mode for the first hot standby key, and assembles the encrypted packet; after completing the setting of the first hot standby key, the first hot standby key setting packet is sent to the standby machine with the mac address;

[0069] The standby machine data receiving processing module 206 is used to wait for data encryption and decryption and data sending and receiving if the standby machine receives the first hot standby key setting package; if the standby machine does not receive the first hot standby key setting package, re-apply for a second hot standby key;

[0070] The CPU data category determination module 102 is used to receive network data packets forwarded by the FPGA and perform protocol identification and classification;

[0071] The CPU first parsing and processing module 103 is used to transfer to the CPU second parsing and processing module if the network data packet forwarded by the FPGA is a key setting completion packet; if the network data packet forwarded by the FPGA is a key request packet, the key request packet is sent to the FPGA to perform a new hot standby key setting;

[0072] The CPU second parsing and processing module 104 is used to send a negotiation hot standby data packet if the key setting completion packet comes from the host; if the key setting completion packet comes from the backup machine, receive the negotiation hot standby data and parse the negotiation hot standby data.

[0073] In this embodiment, it also includes:

[0074] FPGA initialization module 201 is used to initialize and configure parameters of FPGA through the configuration management interface after the startup management unit is started, initialize the network interface operating parameters of FPGA, and complete the reception of network data packets by FPGA with initialized network interface operating parameters.

[0075] In this embodiment, in the FPGA third data forwarding module 205, the FPGA accesses the hot standby key address and performs a hot standby key query operation. If the host cannot query the hot standby key, it applies for the first hot standby key; the host encrypts the first hot standby key with a randomly selected encryption mode using the MAC address, assembles an encrypted package, and sends it to the standby machine.

[0076] In this embodiment, in the FPGA third data forwarding module 205, if the standby machine cannot query the first hot standby key, it sends the second hot standby key request to the host.

[0077] In this embodiment, in the FPGA second data forwarding module 204, the FPGA receives a new key setting package, decrypts it with the MAC address according to the decryption mode selected in the new key setting package, and obtains the key; the FPGA is set to the corresponding key address and sends a key setting success response packet.

[0078] It should be noted that the information interaction, execution process, etc. between the modules / units of the above-mentioned system are based on the same concept as the method embodiment in Example 1 of the present application, and the technical effects they bring are the same as those of the method embodiment of the present application. For specific contents, please refer to the description in the method embodiment shown in the previous part of the present application, and will not be repeated here.

[0079] Example 3

[0080] See also Figure 4 Embodiment 3 of the present invention provides a negotiated hot standby processing system solution based on FPGA and CPU collaboration, including:

[0081] FPGA SoC chip (C001), DDR4 memory (C002), network PHY chip (C003), FLASH storage (C004), CPU (C005), power supply, clock and multiple network interface connector modules.

[0082] Specific:

[0083] C001: Xilinx's fusion SoC chip XCZU7EV is used to implement it, which integrates FPGA and ARM processor core. Among them, FPGA realizes the transmission, reception and processing of network data, and also realizes the ARP protocol processing function here; ARM processor realizes the configuration and management of FPGA part through the internal AXI bus.

[0084] C002: Four MTMT40A256M16 chips are selected, which are DDR4, as the memory part of the ARM processor of C001, and are used for system software and application runtime memory.

[0085] C003: Select multiple RTL8211 Gigabit to implement the network PHY circuit, which is used for physical link layer network communication, and connects to C001 through the RGMII protocol to send and receive network data.

[0086] C004: One MT25QU256ABA chip and FLASH memory are selected as the persistent storage part of the ARM processor running C001. It is used for the persistent storage of system software, file system and application programs. The system boots and reads data from here after power-on.

[0087] C005: Three M300 chips are selected and connected to C001 through the RGMII protocol for CPU, and the negotiation software runs on it.

[0088] It should be noted that the information interaction, execution process, etc. between the modules / units of the above-mentioned system are based on the same concept as the method embodiment in Example 2 of the present application, and the technical effects they bring are the same as those of the method embodiment of the present application. For specific contents, please refer to the description in the method embodiment shown above in the present application, and will not be repeated here.

[0089] Example 4

[0090] Embodiment 4 of the present invention provides a non-transitory computer-readable storage medium, in which a program code of a negotiated hot standby processing method based on collaboration between FPGA and CPU is stored, and the program code includes instructions for executing embodiment 1 or any possible implementation method thereof.

[0091] The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0092] Example 5

[0093] Embodiment 5 of the present invention provides an electronic device, including: a memory and a processor;

[0094] The processor and the memory communicate with each other via a bus; the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the negotiated hot standby processing method based on FPGA and CPU collaboration of embodiment 1 or any possible implementation thereof.

[0095] Specifically, the processor can be implemented by hardware or by software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor can be a general-purpose processor implemented by reading software codes stored in a memory. The memory can be integrated in the processor or can be located outside the processor and exist independently.

[0096] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center.

[0097] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0098] Although the present invention has been described in detail above by general description and specific embodiments, it is obvious to those skilled in the art that some modifications or improvements can be made to the present invention. Therefore, these modifications or improvements made without departing from the spirit of the present invention all belong to the scope of protection claimed by the present invention.

Claims

1. A negotiation hot standby processing method based on FPGA and CPU collaboration, characterized in that: include: The startup management unit of the CPU initializes and configures parameters of the FPGA through the configuration management interface, and the FPGA receives the network data packet and determines the category of the network data packet; If the network data packet is a normal data communication hot standby packet, forwarding the network data packet to the CPU; If the network data packet is a key setting packet of an external network interface, the FPGA performs data analysis on the network data packet, obtains the decryption mode, and sets the key; after completing the key setting, assembles a response packet indicating that the key is set successfully, sends it to the standby machine, and waits for data encryption and decryption and data sending and receiving; If the network data packet is a key request packet of an external network interface, the FPGA performs data analysis on the network data packet, applies for a first hot standby key, obtains a decryption mode, decrypts the first hot standby key, randomly selects an encryption mode for the first hot standby key, and assembles an encrypted packet; After completing the setting of the first hot standby key, sending the first hot standby key setting package to the standby machine with the MAC address; a) if the standby machine receives the first hot standby key setting package, it waits for data encryption and decryption and data sending and receiving; b) if the standby machine does not receive the first hot standby key setting package, it re-applies for the second hot standby key; The CPU receives network data packets forwarded by the FPGA and performs protocol identification and classification; If the network data packet forwarded by the FPGA is a key setting completion packet, c) if the key setting completion packet comes from the host, send a negotiation hot standby data packet; d) if the key setting completion packet comes from the backup machine, receive the negotiation hot standby data, and parse and process the negotiation hot standby data; If the network data packet forwarded by the FPGA is a key request packet, the key request packet is sent to the FPGA to set a new hot standby key.

2. According to claim 1, the negotiation hot standby processing method based on FPGA and CPU collaboration is characterized in that: After the FPGA starts the management unit, the CPU starts the management unit to initialize and configure parameters of the FPGA through the configuration management interface, initialize the network interface operating parameters of the FPGA, and complete the FPGA receiving network data packets after the network interface operating parameters are initialized.

3. According to claim 1, the negotiation hot standby processing method based on FPGA and CPU collaboration is characterized in that: The FPGA accesses the hot standby key address and performs a hot standby key query operation. If the host cannot query the hot standby key, the host applies for the first hot standby key. The host encrypts the first hot standby key using a randomly selected encryption mode with a MAC address, assembles an encrypted package, and sends it to the standby machine.

4. According to claim 3, the negotiation hot standby processing method based on FPGA and CPU collaboration is characterized in that: If the standby machine cannot find the first hot standby key, it sends the second hot standby key request to the host.

5. According to claim 3, the negotiation hot standby processing method based on FPGA and CPU collaboration is characterized in that: FPGA receives the new key setting package, decrypts it with the MAC address according to the decryption mode selected in the new key setting package, and obtains the key; FPGA sets it to the corresponding key address and sends a key setting success response package.

6. A negotiated hot standby processing system based on FPGA and CPU collaboration, characterized in that: include: The CPU startup management unit is used to initialize and configure parameters of the FPGA through the configuration management interface; The FPGA data category determination module is used to receive a network data packet through the FPGA and determine the category of the network data packet; The FPGA first data forwarding module is used to forward the network data packet to the CPU if the network data packet is a normal data communication hot standby packet; The second data forwarding module of FPGA is used for, if the network data packet is a key setting packet of the external network interface, FPGA performs data analysis on the network data packet, obtains the decryption mode, and sets the key; after completing the key setting, assembles a response packet of successful key setting, sends it to the standby machine, and waits for data encryption and decryption and data sending and receiving; The FPGA third data forwarding module is used for, if the network data packet is a key request packet of the external network interface, the FPGA performs data parsing on the network data packet, applies for the first hot standby key, obtains the decryption mode, decrypts the first hot standby key, randomly selects the encryption mode for the first hot standby key, and assembles the encrypted packet; After completing the setting of the first hot standby key, sending the first hot standby key setting package to the standby machine with the MAC address; A standby machine data receiving processing module, configured to wait for data encryption and decryption and data sending and receiving if the standby machine receives the first hot standby key setting package; If the standby machine does not receive the first hot standby key setting package, it re-applies for the second hot standby key; The CPU data category judgment module is used to receive network data packets forwarded by the FPGA and perform protocol identification and classification; The first analysis and processing module of the CPU is used to transfer to the second analysis and processing module of the CPU if the network data packet forwarded by the FPGA is a key setting completion packet; if the network data packet forwarded by the FPGA is a key request packet, the key request packet is sent to the FPGA to perform a new hot standby key setting; The second analysis and processing module of the CPU is used to send a negotiation hot standby data packet if the key setting completion packet comes from the host; if the key setting completion packet comes from the backup machine, receive the negotiation hot standby data and parse and process the negotiation hot standby data.

7. The negotiated hot standby processing system based on FPGA and CPU collaboration according to claim 6, characterized in that: Also includes: The FPGA initialization module is used to initialize and configure parameters of the FPGA through the configuration management interface after the startup management unit is started. The network interface operating parameters of the FPGA are initialized, and the FPGA receiving network data packets after the network interface operating parameters are initialized is completed.

8. The negotiated hot standby processing system based on FPGA and CPU collaboration according to claim 6, characterized in that: In the FPGA third data forwarding module, the FPGA accesses the hot standby key address and performs a hot standby key query operation. If the host cannot query the hot standby key, the first hot standby key is applied for; the host encrypts the first hot standby key with a randomly selected encryption mode using the MAC address, assembles an encrypted package, and sends it to the standby machine.

9. The negotiated hot standby processing system based on FPGA and CPU collaboration according to claim 8, characterized in that: In the FPGA third data forwarding module, if the standby machine cannot query the first hot standby key, a request for the second hot standby key is sent to the host.

10. The negotiated hot standby processing system based on FPGA and CPU collaboration according to claim 8, characterized in that: In the FPGA second data forwarding module, the FPGA receives a new key setting package, decrypts it with the MAC address according to the decryption mode selected in the new key setting package, and obtains the key; the FPGA is set to the corresponding key address and sends a key setting success response packet.

Citation Information

Patent Citations

  • Data packet encryption and decryption method and system based on FPGA and eBPF cooperation

    CN114978676A

  • ARP protocol processing method and system based on FPGA and eBPF cooperation

    CN115297082A

  • Encryption and decryption network transmission method and equipment

    CN115442030A