Network gate load balancing method and device based on file transmission

By adopting a load balancing method based on file transmission in the gatekeeper cluster, the control node and data node scan the external network side server in the gatekeeper cluster, determine the data to be transmitted, and pull and upload it, solving the problem of transmission efficiency in the existing technology. It solves the problem of low efficiency and achieves load balancing and efficient transmission of the gatekeeper cluster.

CN113794765BActive Publication Date: 2024-10-01QI AN XIN TECHNOLOGY GROUP INC +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111061025.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-10
Publication Date
2024-10-01
Estimated Expiration
2041-09-10

AI Technical Summary

Technical Problem

Existing security isolation gatekeepers cannot efficiently and quickly transmit large amounts of file data in big data scenarios, resulting in low transmission efficiency.

Method used

Using the gatekeeper load balancing method based on file transmission, the control node and data node scan the external network side server in the gatekeeper cluster to determine the target file data to be transmitted, and pull and upload it according to the needs of each node to achieve Load balancing, making full use of cluster device performance.

Benefits of technology

It achieves load balancing of the gatekeeper cluster, improves the efficiency and overall transmission capacity of file transmission, and ensures the efficiency and stability of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113794765B_ABST
    Figure CN113794765B_ABST
Patent Text Reader

Abstract

The network gate load balancing method and device based on file transmission provided by the embodiment of the present invention are applied to a network gate cluster, wherein the network gate cluster includes at least two network gates, each network gate is identified as a node, wherein one network gate is identified as a control node, and each of the remaining network gates is identified as a data node, and the method includes: scanning the external network side server through the control node to determine the target file data to be transmitted; according to the target file data to be transmitted, obtaining the target file data that each node needs to transmit, and sending it to each node; the control node and the data node pull the target file from the external network side server according to the target file data that each node needs to transmit; the control node and the data node upload the pulled target file to the internal network side server. Since the control node can control each data node to pull and transmit the same number of target files, the load balancing of the network gate cluster is achieved, and the overall transmission capacity of the network gate is improved at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of network security, and in particular to a network gate load balancing method and device based on file transmission. Background Art

[0002] A security isolation network gate, also known as a network gate, is a network security device that has multiple control functions and can exchange application data safely and appropriately between networks. The security isolation network gate supports file-based business synchronization functions. In big data scenarios, the security network gate can be used to pull and push file data between two server clusters to achieve synchronization of file data between two networks.

[0003] In the prior art, a secure isolation network gate is set up in two server clusters to achieve cross-domain file transmission between the two server clusters. However, due to the expansion of front-end and back-end services and the evolution of cluster deployment, a secure isolation network gate cannot efficiently and quickly transmit a large amount of file data. Summary of the invention

[0004] In view of the problems in the prior art, the embodiments of the present invention provide a network gate load balancing method and device based on file transmission.

[0005] Specifically, the embodiment of the present invention provides the following technical solutions:

[0006] In the first aspect, an embodiment of the present invention provides a network gate load balancing method based on file transfer, which is applied to a network gate cluster, wherein the network gate cluster includes at least two network gates, each of which is identified as a node, wherein one network gate is identified as a control node, and each of the remaining network gates is identified as a data node, and the method includes: scanning the external network side server by the control node to determine the target file data to be transmitted; obtaining the target file data to be transmitted by each node based on the target file data to be transmitted, and sending it to each node; the control node and the data node pull the target file on the external network side server according to the target file data to be transmitted by each node; the control node and the data node upload the pulled target file to the internal network side server.

[0007] Furthermore, before the control node scans the external network server and determines the target file data to be transmitted, it also includes: determining the control node and the data node in the initialized nodes through node election; wherein the initialized nodes include the node corresponding to the control node before the election and the node corresponding to the data node before the election; the initialized nodes are in an election state, the control node is in a control state, and the data node is in a data state; if the control node and / or the data node fails, the failed control node and / or the failed data node are in a failed state.

[0008] Furthermore, the network gate load balancing method based on file transfer also includes: the control node regularly declares its status on the external network side; the status of the control node is transferred to the internal network side through the switching card and announced on the internal network side; the data node regularly declares its status on the external network side; the status of the data node is transferred to the internal network side through the switching card and announced on the internal network side.

[0009] Furthermore, the data node periodically declares its status on the external network side, including: when the data node fails, synchronizing the fault status of the failed data node to the external network side server and the internal network side server, and deactivating the failed data node; the control node switches the target file data that needs to be pulled by the failed data node to the data node that has not failed; and / or, the control node periodically declares its status on the external network side, including: when the control node fails, synchronizing the fault status of the control node to the external network side server and the internal network side server, and deactivating the control node; initiating a new election term and electing a new control node.

[0010] Further, the failed control node recovers from the failure and / or the failed data node recovers from the failure, and the existing control node declares the recovered failed control node and / or the recovered failed data node as a new data node.

[0011] Furthermore, the network gate load balancing method based on file transfer also includes: if the internal network is divided into at least two subnets, the new control node is not elected; if the external network is divided into at least two subnets, the new control node is not elected; if the internal network is divided into at least two subnets and the external network is divided into at least two subnets, the new control node is not elected; if the at least two subnets into which the external network is divided are re-merged, the new control node is elected.

[0012] In the second aspect, an embodiment of the present invention also provides a network gate load balancing device based on file transfer, including: a synchronization module, used to scan the external network side server through the control node to determine the target file data to be transmitted; based on the target file data to be transmitted, obtain the target file data that each node needs to transmit, and send it to each node; a load management module, used for the control node and the data node to pull the target file from the external network side server according to the target file data that each node needs to transmit; the control node and the data node upload the pulled target file to the internal network side server.

[0013] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the network gate load balancing method based on file transfer as described in the first aspect are implemented.

[0014] In a fourth aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the network gate load balancing method based on file transfer as described in the first aspect.

[0015] In a fifth aspect, an embodiment of the present invention further provides a computer program product having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement the steps of the network gate load balancing method based on file transfer described in the first aspect.

[0016] The network gate load balancing method and device based on file transmission provided by the embodiment of the present invention are applied to a network gate cluster, wherein the network gate cluster includes at least two network gates, each network gate is identified as a node, wherein one network gate is identified as a control node, and each of the remaining network gates is identified as a data node, and the method includes: scanning the external network side server through the control node to determine the target file data to be transmitted; according to the target file data to be transmitted, obtaining the target file data that each node needs to transmit, and sending it to each node; the control node and the data node pull the target file from the external network side server according to the target file data that each node needs to transmit; the control node and the data node upload the pulled target file to the internal network side server. Since the control node can control each data node to pull and transmit the same number of target files, the load balancing of the network gate cluster is achieved, and at the same time, the performance of each network gate device in the cluster can be fully utilized, thereby improving the overall transmission capacity of the network gate. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 This is a flow chart of an embodiment of a network gate load balancing method based on file transmission of the present invention;

[0019] Figure 2 This is a flow chart of an embodiment of the control node election of the present invention;

[0020] Figure 3 A schematic diagram of a network gate cluster embodiment of the present invention;

[0021] Figure 4 It is a schematic diagram of the structure of an embodiment of a network gate load balancing device based on file transmission of the present invention;

[0022] Figure 5 A schematic diagram of an application scenario embodiment of the present invention;

[0023] Figure 6 It is a schematic diagram of the structure of an electronic device entity embodiment of the present invention. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. 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.

[0025] Figure 1 FIG. 1 is a flow chart of an embodiment of a network gate load balancing method based on file transmission of the present invention. Figure 1 As shown, the network gate load balancing method based on file transmission in an embodiment of the present invention includes:

[0026] S101, the control node scans the external network server to determine the target file data to be transmitted. In an embodiment of the present invention, the control node can scan the external network server periodically. The period can be 1 minute, 3 minutes, or 5 minutes, which is not limited in the embodiment of the present invention. The external network server is a server that stores the target file. The external network server can be a NAS server or a file server. The embodiment of the present invention does not limit the type of the external network server. Before the control node scans the external network server to determine the target file data, it also includes: initializing the network gate, that is, starting the HA service, and performing the three-layer virtual router redundancy protocol (Virtual Router Redundancy Protocol, referred to as VRRP) networking; starting the Raft service, and performing the user datagram protocol (User Datagram Protocol, referred to as UDP) multicast networking. The Raft service is implemented by the Raft protocol. The Raft protocol can make a cluster network gate form a replicated state machine, and each network gate is a state machine. The running state of the network gate can only be changed through a series of commands, and each state machine stores a log containing a series of instructions. As long as the consistency of the logs is guaranteed, the consistency of the status of each network gate can be guaranteed.

[0027] S102, according to the target file data to be transmitted, the target file data to be transmitted by each node is obtained, and sent to each node.

[0028] In an embodiment of the present invention, the target file data that each node needs to transmit can be obtained based on the acquired target file data to be transmitted and the sum of the number of control nodes and data nodes. At the same time, the target file data that each node needs to transmit is sent to each node, so that each node can clearly know the target file data that needs to be transmitted.

[0029] S103, the control node and the data node pull the target file from the external network side server according to the target file data that each node needs to transmit.

[0030] In the embodiment of the present invention, when the control node issues an instruction to pull a target file, all nodes including the control node itself and the data nodes pull the corresponding target file according to the instruction and the data of the target file to be pulled.

[0031] S104, the control node and the data node upload the retrieved target file to the intranet-side server.

[0032] In the embodiment of the present invention, the intranet-side server is a server that receives the target file. Similar to the external network-side server, the intranet-side server can be a NAS server, or can be a file server. The embodiment of the present invention does not limit the type of the intranet-side server. When all nodes pull the corresponding target file, the control node issues an instruction to upload the file, and all nodes including the control node itself and the data node upload the target file to the intranet-side server according to the instruction.

[0033] The network gate load balancing method based on file transmission provided by the embodiment of the present invention determines the target file data to be transmitted by scanning the external network side server through the control node; obtains the target file data to be transmitted by each node according to the target file data to be transmitted, and sends it to each node; the control node and the data node pull the target file from the external network side server according to the target file data to be transmitted by each node; the control node and the data node upload the pulled target file to the internal network side server. Since the control node can control each data node to pull and transmit the same number of target files, the load balancing of the network gate cluster is realized, and at the same time, the performance of each network gate device in the cluster can be fully utilized, thereby improving the overall transmission capacity of the network gate.

[0034] In some optional embodiments, before the control node scans the external network side server to determine the target file data to be transmitted, it also includes: determining the control node and the data node in the initialized nodes through node election; wherein the initialized nodes include the node corresponding to the control node before the election and the node corresponding to the data node before the election; the initialized nodes are in an election state, the control nodes are in a control state, and the data nodes are in a data state; if the control node and / or the data node fails, the failed control node and / or the failed data node are in a failed state.

[0035] Figure 2 FIG. 1 is a flow chart of an embodiment of the control node election of the present invention. The process of the control node election is as follows: Figure 2 As shown. First, the data nodes, also called slave nodes, are initialized and the election begins. All nodes are in the election state, nominating themselves for election and waiting for votes from other nodes. If a node obtains votes from other nodes, it is elected as the control node; if it is informed that the control node already exists, it will switch to the data node. If the election times out without a result, a new round of elections will be held.

[0036] The node election method provided by the embodiment of the present invention can determine the control node and the data node before the target file is transmitted, thereby facilitating the transmission of the target file.

[0037] In some optional embodiments, the network gate load balancing method based on file transfer also includes: the control node regularly declares its status on the external network side; the status of the control node is transferred to the internal network side through the switching card, and announced on the internal network side; the data node regularly declares its status on the external network side; the status of the data node is transferred to the internal network side through the switching card, and announced on the internal network side.

[0038] The control node and the data node make announcements in order to determine whether the node is healthy. The periodicity can be 5 minutes, or it can also be 10 minutes, which is not limited in the embodiment of the present invention. The control node makes the announcement first. This is because the control node controls other data nodes to execute instructions, and it is necessary to first determine the status of the control node. Since there is a network gate between the external network side and the internal network side, the network gate has an isolation effect. After the control node makes an announcement in the external network, the announcement status of the control node cannot be transmitted to the internal network side, and the transmission of the announcement status needs to be realized through the switch. A switch is a device that completes the information exchange function in a communication system. It can provide an exclusive electrical signal path for any two network nodes connected to the switch. The announcement of the data node and the transmission process of the announcement status are similar to the announcement of the control node and the transmission process of the announcement status, which will not be repeated here.

[0039] The control node and data node declaration method provided in the embodiment of the present invention can determine whether the control node and the data node are healthy, so that the control node can issue instructions for pulling target files and uploading target files, and the control node can execute the instructions for pulling target files and uploading target files.

[0040] In some optional embodiments, the data node periodically declares its status on the external network side, including: when a data node fails, synchronizing the fault status of the failed data node to the external network side server and the internal network side server, and deactivating the failed data node; the control node switches the target file data that needs to be pulled by the failed data node to the data node that has not failed.

[0041] The control node switches the target file data that needs to be pulled by the failed data node to the data node that has not failed, which means that the control node switches the service flow of the failed data node to the non-failed data node. The control node can evenly distribute the service flow of the failed data node to the non-failed data node. The target file data that needs to be pulled can be the number of target files that need to be pulled. Figure 3 FIG. 1 is a schematic diagram of an embodiment of a network gate cluster of the present invention. Figure 3As shown in the figure, a network gate cluster has a total of 3 network gates, marked as network gate 1, network gate 2 and network gate 3. Correspondingly, each network gate is marked as a node, and node 1, node 2 and node 3 can be obtained. Among them, node 1 is a control node, and nodes 2-3 are data nodes. Nodes 2-3 are data nodes that make node declarations on the external network side. Among them, data node 2 is in a faulty state. The faulty state of data node 2 is synchronized to the internal network server and the external network server, and data node 2 is disabled so that it no longer executes the instructions for pulling target files and uploading target files issued by control node 1. Before data node 2 fails, the number of target files pulled by data node 2 is 3. When it fails, control node 1 allocates these 3 target files to data node 3, that is, each data node in data node 3 pulls and uploads 3 more target files.

[0042] For another example, a network gate cluster has a total of 5 network gates, which are marked as network gate 1, network gate 2, network gate 3, network gate 4 and network gate 5. Correspondingly, each network gate is marked as a node, and nodes 1, 2, 3, 4 and 5 can be obtained. Among them, node 1 is a control node, and nodes 2-5 are data nodes. Nodes 2-5 are data nodes that make node declarations on the external network side. Among them, data node 2 is in a faulty state. The faulty state of data node 2 is synchronized to the internal network side server and the external network side server, and data node 2 is deactivated so that it no longer executes the instructions for pulling target files and uploading target files issued by control node 1. Before data node 2 fails, the number of target files pulled by data node 2 is 3. When it fails, control node 1 allocates these 3 target files to data nodes 3-5, that is, each of data nodes 3-5 pulls and uploads one more target file.

[0043] The method for processing a data node failure provided by the embodiment of the present invention can ensure that the work of the failed node is taken over and realize the load balancing of the network gate.

[0044] In some optional embodiments, the control node periodically declares its status on the external network side, including: when a control node fails, synchronizing the failure status of the control node to the external network side server and the internal network side server, and deactivating the control node; initiating a new election term, electing a new control node to take over the work of the failed control node.

[0045] When a control node fails, it is also necessary to synchronize the fault status and deactivate the faulty node. After the faulty control node is deactivated, a new term election needs to be initiated to elect a new control node. The election of a new control node may include: each data node in the data node nominates itself as a control node; a data node that obtains votes from data nodes other than itself becomes a new control node. The node election process is as follows: Figure 2 As shown, no further details are given here.

[0046] After a new control node is selected, the new control node is networked with the data node, the new control node and the data node perform status synchronization respectively, the new control node restarts the file synchronization service, the new control node and the data node automatically compare directory information, and continue to send unsent target files.

[0047] Optionally, when a new node joins or a failed node recovers, it can rejoin the network through node election.

[0048] The method for processing a control node failure provided by the embodiment of the present invention can re-implement the control of the control node over the data node and the transmission of the target file by electing a new control node.

[0049] In some optional embodiments, the network gate load balancing method based on file transfer also includes: if the internal network is divided into at least two subnets, no election of a control node is performed; if the external network is divided into at least two subnets, no election of a new control node is performed; if the internal network is divided into at least two subnets and the external network is divided into at least two subnets, no election of a new control node is performed; if the at least two subnets into which the external network was divided are re-merged, an election of a new control node is performed.

[0050] The intranet is divided into at least two subnets. Since node election only exists in the external network and the intranet service is in passive notification mode, the intranet still receives the target file from the external network and uploads it to the external network server. Therefore, the intranet split will not cause service migration problems. The external network remains normal and does not need to be switched.

[0051] The external network is divided into at least two subnets, each with a control node, but the internal network remains as one network; the fault-tolerant protection mechanism sets the internal network to passive receiving mode, so when two control nodes appear on the external network, the external network will only snatch the target file from the external network server, which is an acceptable situation, but will not cause internal network competition problems, so it will not cause business switching and interruption abnormalities.

[0052] The intranet is divided into at least two subnets and the extranet is divided into at least two subnets. This situation is handled in the same way as the split of the extranet and does not cause service interruption.

[0053] If at least two subnets that were divided in the external network are reunited, if there are multiple control nodes in the external network, state migration will be triggered. After multiple control nodes become data nodes, a new round of elections will begin until the election is normal and the business finally returns to normal.

[0054] The network splitting and merging processing method provided by the embodiment of the present invention determines whether to elect a new control node according to actual conditions, thereby ensuring the normal transmission of the target file.

[0055] Figure 4 It is a schematic diagram of the structure of an embodiment of a network gate load balancing device based on file transmission of the present invention.

[0056] like Figure 4 As shown, the network gate load balancing device based on file transmission includes:

[0057] The synchronization module 401 is used to scan the external network side server through the control node to determine the target file data to be transmitted; according to the target file data to be transmitted, the target file data to be transmitted by each node is obtained, and sent to each node;

[0058] The load management module 402 is used to control the node and the data node to pull the target file according to the target file data that each node needs to transmit; the control node and the data node upload the pulled target file to the intranet side server.

[0059] Optionally, the network gate load balancing device based on file transmission further includes:

[0060] The first election module is used to determine the control node and the data node in the initialized nodes through node election; wherein the initialized nodes include the nodes corresponding to the control node before the election and the nodes corresponding to the data node before the election; the initialized nodes are in an election state, the control nodes are in a control state, and the data nodes are in a data state; if the control node and / or the data node fails, the failed control node and / or the failed data node are in a failed state.

[0061] Optionally, the network gate load balancing device based on file transmission further includes:

[0062] The first declaration module is used to control the node to regularly declare its status on the external network side;

[0063] A first synchronization module, used to transmit the state of the control node to the intranet side through the switch card and announce it on the intranet side;

[0064] The second declaration module is used for data nodes to regularly declare their status on the external network side;

[0065] The second synchronization module is used to transmit the state of the data node to the intranet side through the switch card and announce it on the intranet side.

[0066] Optionally, the first declaration module includes:

[0067] A first processing unit is used for synchronizing the fault status of the failed data node to the external network side server and the internal network side server when a data node fails, and deactivating the failed data node;

[0068] The second processing unit is used to control the node to switch the target file data that needs to be pulled by the failed data node to the data node that has not failed.

[0069] Optionally, the second declaration module includes:

[0070] A third processing unit is used for synchronizing the fault status of the control node to the external network side server and the internal network side server when a control node fails, and deactivating the control node;

[0071] The fourth processing unit is used to initiate a new election term and elect a new control node.

[0072] Optionally, the network gate load balancing device based on file transmission further includes:

[0073] The fault recovery module is used to recover a failed control node and / or a failed data node. The existing control node declares the recovered failed control node and / or the recovered failed data node as a new data node.

[0074] Optionally, the network gate load balancing device based on file transmission further includes:

[0075] A first processing module, configured to not elect a new control node if the internal network side is divided into at least two subnets;

[0076] A second processing module, configured to not elect a new control node if the external network side is divided into at least two subnets;

[0077] A third processing module, configured to not elect a new control node if the internal network side is divided into at least two subnets and the external network side is divided into at least two subnets;

[0078] The fourth processing module is used to elect a new control node if at least two subnets that were divided on the external network side are merged again.

[0079] Figure 5 FIG. 1 is a schematic diagram of an application scenario embodiment of the present invention. Figure 5As shown in the figure, each gateway includes a load management module and a synchronization module. The load management module runs on the gateway system, identifies a single device as a node, and multiple device nodes are networked in a clustered manner; the load management module is a HA+Raft function, adding the Raft protocol to the original HA of the gateway to assist in network election and maintain the status changes of each node. In the load management module, HA is responsible for monitoring the overall health of the internal and external networks of the device, and Raft is similar to the role of a sentinel to cooperate with the synchronization module to complete the master node election.

[0080] The Raft protocol standard is divided into four states: election state, control state, data state, and fault state; it is initialized to the election state, and after being elected as the leader, it changes to the control state (master node), and other followers are in the data state (slave node). This process is called a term. Due to the hardware form of 2+1 dual hosts in the internal and external networks of the network gate, the internal and external networks need to maintain the same state, so a state synchronization mechanism is introduced. Raft elections are executed on the external network, and a state synchronization program is designed: the external network sends the state through the switching card in real time through timing and water level triggering, and synchronizes it to the host on the internal network side of the network gate; in this way, the internal network can obtain the latest state in real time.

[0081] The synchronization module refers to the network gate file synchronization module, also known as the file module. The synchronization module is responsible for the perception, pulling, and uploading of the target file. The load management module is added to cooperate with the synchronization module for linkage. The synchronization module provides an interface for starting, stopping, and status query. The load management module calls the interface to complete the control.

[0082] The Raft controller in the load management module starts the synchronization module task and starts it as a control node or a data node according to the status of the control node, also known as the master node, and the data node, also known as the slave node. In the control state, the synchronization module will periodically scan the external network server, sense changes and push out the target file. In the data state, the synchronization module will pull and upload the target file sent by the control node to complete the final file synchronization work.

[0083] Figure 6 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 6As shown, the electronic device may include: a processor (processor) 601, a communication interface (Communications Interface) 602, a memory (memory) 603 and a communication bus 604, wherein the processor 601, the communication interface 602, and the memory 603 complete mutual communication through the communication bus 604. The processor 601 can call the logic instructions in the memory 603 to execute the following method: the control node scans the external network side server to determine the target file data to be transmitted; according to the target file data to be transmitted, the target file data to be transmitted by each node is obtained and sent to each node; the control node and the data node pull the target file from the external network side server according to the target file data to be transmitted by each node; the control node and the data node upload the pulled target file to the internal network side server.

[0084] In addition, the logic instructions in the above-mentioned memory 603 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0085] On the other hand, an embodiment of the present invention further provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the load balancing method of the network firewall cluster based on file transfer provided in the above-mentioned embodiments, for example, including: scanning the external network side server through the control node to determine the target file data to be transmitted; obtaining the target file data that each node needs to transmit based on the target file data to be transmitted, and sending it to each node; the control node and the data node pull the target file from the external network side server according to the target file data that each node needs to transmit; the control node and the data node upload the pulled target file to the internal network side server.

[0086] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the load balancing method of the network firewall cluster based on file transfer provided in the above-mentioned embodiments, for example, including: scanning the external network side server by the control node to determine the target file data to be transmitted; obtaining the target file data to be transmitted by each node based on the target file data to be transmitted, and sending it to each node; the control node and the data node pull the target file from the external network side server according to the target file data to be transmitted by each node; the control node and the data node upload the pulled target file to the internal network side server.

[0087] The device embodiments described above are merely illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, i.e., they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without paying creative labor.

[0088] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.

[0089] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A network gate load balancing method based on file transmission, characterized in that: Applied to a network gate cluster, the network gate cluster includes at least two network gates, each network gate is identified as a node, wherein one network gate is identified as a control node, and each of the remaining network gates is identified as a data node, the method includes: Scanning the external network server through the control node to determine the target file data to be transmitted; According to the target file data to be transmitted, the target file data to be transmitted by each node is obtained, and sent to each node; The control node and the data node pull the target file from the external network side server according to the target file data that each node needs to transmit; The control node and the data node upload the pulled target file to the intranet side server, wherein the external network side server is the server that stores the target file; the intranet side server is the server that receives the target file; there is a network gate between the external network side server and the intranet side server, and the network gate has an isolation function; The network gate load balancing method based on file transmission also includes: If the intranet is divided into at least two subnets, no new control node election will be performed; If the external network is divided into at least two subnets, the election of the new control node is not performed; If the internal network is divided into at least two subnets and the external network is divided into at least two subnets, no election of the new control node is performed; If at least two subnets of the external network that were divided are merged again, an election of the new control node is performed.

2. The network gate load balancing method based on file transmission according to claim 1 is characterized in that: Before the control node scans the external network server to determine the target file data to be transmitted, the method further includes: Determine the control node and the data node in the initialized nodes through node election; wherein the initialized nodes include the node corresponding to the control node before the election and the node corresponding to the data node before the election; the initialized nodes are in an election state, the control nodes are in a control state, and the data nodes are in a data state; If the control node and / or the data node fails, the failed control node and / or the failed data node is in a failed state.

3. The network gate load balancing method based on file transmission according to claim 1, characterized in that: Also includes: The control node regularly announces status on the external network side; The state of the control node is transmitted to the intranet side through the switch card and announced on the intranet side; The data node regularly announces its status on the external network side; The state of the data node is transmitted to the intranet side through the switch card and announced on the intranet side.

4. The method for load balancing a network gate based on file transmission according to claim 3, characterized in that: The data node periodically announces its status on the external network side, including: When the data node fails, the fault status of the failed data node is synchronized to the external network side server and the internal network side server, and the failed data node is deactivated; The control node switches the target file data that needs to be pulled by the failed data node to the data node that has not failed; and / or, The control node periodically announces status on the external network side, including: If the control node fails, the failure state of the control node is synchronized to the external network server and the internal network server, and the control node is deactivated; Initiate a new election term and elect a new control node.

5. The network gate load balancing method based on file transmission according to claim 4 is characterized in that: The failed control node recovers from the failure and / or the failed data node recovers from the failure, and the existing control node declares the recovered failed control node and / or the recovered failed data node as a new data node.

6. A network gate load balancing device based on file transmission, characterized in that: include: The synchronization module is used to scan the external network server through the control node to determine the target file data to be transmitted; According to the target file data to be transmitted, the target file data to be transmitted by each node is obtained, and sent to each node; A load management module, used for the control node and the data node to pull the target file on the external network side server according to the target file data that each node needs to transmit; The control node and the data node upload the pulled target file to the intranet side server, wherein the external network side server is the server that stores the target file; the intranet side server is the server that receives the target file; there is a network gate between the external network side server and the intranet side server, and the network gate has an isolation function; The network gate load balancing device based on file transmission also includes: A first processing module, configured to not elect a new control node if the internal network side is divided into at least two subnets; A second processing module, configured to not elect a new control node if the external network side is divided into at least two subnets; A third processing module, configured to not elect a new control node if the internal network side is divided into at least two subnets and the external network side is divided into at least two subnets; The fourth processing module is used to elect a new control node if at least two subnets that were divided on the external network side are merged again.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the network gate load balancing method based on file transmission as described in any one of claims 1 to 5 are implemented.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the network gate load balancing method based on file transfer as claimed in any one of claims 1 to 5 are implemented.

9. A computer program product having executable instructions stored thereon, characterized in that: When the instruction is executed by the processor, the processor implements the steps of the network gate load balancing method based on file transmission as described in any one of claims 1 to 5.