Node data hot backup method and device, equipment and medium
By performing data common storage and master node election mechanism in the backup cluster, the problems of low efficiency and poor reliability of hot backup of node hot data are solved, and efficient and reliable hot backup is achieved to ensure the rapid recovery of the system.
Patent Information
- Application Number
- CN202411220489.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2024-12-13
AI Technical Summary
The existing hot backup methods for hot data of nodes are less efficient and have poor reliability and availability of hot backup work, making it difficult for the system to recover quickly in the event of failure.
By responding to user data backup operations, the data is sent to each node in the backup cluster for common storage, and the master node is marked according to the election rules within the preset time period, and the master node's data is sent to the server to perform backup operations to ensure that the data is Real-time and correctness.
It improves the efficiency of hot backup of node data, enhances the reliability and availability of hot backup work of nodes, and ensures that the system can recover quickly in the event of failure.
Smart Images

Figure CN119127574A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data backup, and in particular to a hot backup method, device, equipment and medium for node data. Background Art
[0002] In today's digital age, many critical application systems, such as financial trading systems, online services, and database management systems, place extremely high demands on the system's ability to operate continuously. Any downtime can lead to serious consequences, including significant economic losses and service interruptions. Therefore, high availability has become a critical consideration in system design. As a common solution to ensure high availability of systems, hot backup is becoming increasingly prominent. Its core principle is to synchronize one or more backup systems in real time to a state close to that of the primary system, so that it can quickly take over when the primary system fails to ensure uninterrupted operation of the system.
[0003] However, in actual applications, the implementation of hot backup systems for nodes is not smooth sailing and faces many challenges. First, the configuration and management of hot backup nodes is extremely complex. It requires detailed settings and coordination of multiple levels such as hardware, software, and network, which places high demands on the professional knowledge and experience of technicians. Secondly, hot backup systems require additional hardware and software resources to support the operation of backup systems, which undoubtedly greatly increases costs. Enterprises not only need to purchase additional hardware facilities such as servers and storage devices, but also need to pay for related software licenses and maintenance.
[0004] In summary, the existing hot backup method for node hot data has the problem of low hot backup efficiency of node data, and poor reliability and availability of node hot backup work. Summary of the invention
[0005] The present invention provides a node data hot backup method, device, equipment and medium, which can solve the problems of low node data hot backup efficiency caused by the existing node hot data hot backup method and poor reliability and availability of node hot backup work.
[0006] In a first aspect, an embodiment of the present invention provides a hot backup method for node data, the method comprising:
[0007] In response to various data backup-related operations performed by the user, various data generated by the operations are sent to various nodes in the backup cluster for common storage;
[0008] Whenever the preset time period is reached, the master node is marked in each node in the backup cluster according to the preset election rules, and the data collected by the master node is sent to the server to perform the backup operation during the time period.
[0009] In a second aspect, an embodiment of the present invention provides a hot backup device for node data, the device comprising:
[0010] A data backup module, which is used to respond to various data backup related operations performed by the user and send various data generated by the operation to each node in the backup cluster for common storage;
[0011] The node election module is used to mark the master node in each node in the backup cluster according to the preset election rules whenever a preset time period is reached, and send the data collected by the master node to the server to perform the backup operation during the time period.
[0012] In a third aspect, an embodiment of the present invention provides an electronic device, the electronic device comprising:
[0013] at least one processor; and
[0014] a memory communicatively connected to the at least one processor; wherein,
[0015] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute a hot backup method for node data described in any embodiment of the present invention.
[0016] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a hot backup method for node data described in any embodiment of the present invention when executed.
[0017] The technical solution of the embodiment of the present invention responds to various data backup related operations performed by the user, and sends the various data generated by the operation to each node in the backup cluster for common storage. Thereafter, whenever a preset time period is reached, a master node is marked in each node in the backup cluster according to a preset election rule, and within this time period, the data collected by the master node is sent to the server to perform a backup operation. This solves the problem that the hot backup efficiency of node data is low and the reliability and availability of node hot backup work are poor caused by the existing hot backup method of node hot data, improves the hot backup efficiency of node data, and enhances the reliability and availability of node hot backup work.
[0018] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0020] Figure 1 is a flowchart of a hot backup method for node data provided according to Embodiment 1 of the present invention;
[0021] Figure 2 is a flowchart of a hot backup method for node data provided according to Embodiment 2 of the present invention;
[0022] Figure 3 This is a schematic diagram of the structure of a hot backup device for node data provided according to Embodiment 3 of the present invention;
[0023] Figure 4 The present invention is a schematic diagram of the structure of an electronic device for implementing a hot backup method for node data according to an embodiment of the present invention. DETAILED DESCRIPTION
[0024] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme 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 only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, any variation of the terms "including" and "having" is intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0026] Embodiment 1
[0027] Figure 1A flowchart of a hot backup method for node data provided in Embodiment 1 of the present invention. This embodiment is applicable to the situation where hot backup of node data is performed. The method can be executed by a hot backup device for node data. The hot backup device for node data can be implemented in the form of hardware and / or software. The hot backup device for node data can be configured in a terminal or server with a hot backup function for node data.
[0028] like Figure 1 As shown, the method includes:
[0029] S110 . In response to various data backup related operations performed by the user, various data generated by the operations are sent to various nodes in the backup cluster for common storage.
[0030] Specifically, in this embodiment, in response to various data backup-related operations performed by the user, such as manually setting the backup time interval, selecting a specific data range for backup, specifying the backup storage location, etc., the system will perform detailed analysis and processing on various types of data generated by these operations. Then, the processed data will be accurately sent to each node in the backup cluster, and the joint storage will be achieved through the collaborative work of each node. In this process, each node is responsible for storing all data through data synchronization to ensure the integrity and correctness of the data in each node.
[0031] It should be noted that, in order to ensure that the data in the hot backup node is comprehensive and correct, each node in the backup cluster is preferably set to a data synchronization mode, that is, each node stores the same order of magnitude and consistent content to be backed up data; wherein, the data synchronization is a process to ensure that the data in different locations, different systems or different devices maintain consistency and accuracy. Data synchronization involves real-time monitoring and comparison of data to identify any differences that may occur between source data and target data. When data is updated, inserted or deleted, the data synchronization mechanism can quickly capture these changes and accurately propagate the corresponding modifications to the relevant systems or devices. In today's highly interconnected digital environment, data synchronization is of irreplaceable importance for cross-departmental collaboration, multi-system integration, and ensuring data consistency and availability. Whether between business systems within an enterprise or in distributed applications across regions, data synchronization is silently playing a key role, supporting the smooth operation of various business processes. In summary, relevant personnel in this field should know that the method of data synchronization is a mature prior art, and this embodiment will not be repeated.
[0032] S120. Whenever a preset time period is reached, a master node is marked in each node in the backup cluster according to a preset election rule, and during the time period, data collected by the master node is sent to the server to perform a backup operation.
[0033] Optionally, in order to ensure the accuracy of the backup results obtained by the backup operation, in this embodiment, the execution mode of the backup operation can be set to overwrite backup, that is, the master node data backed up in the current time period will overwrite the master node data backed up in the server in the previous period. Through the above operation, the real-time and correctness of the backup data in the server can be guaranteed, while avoiding the storage pressure on the server caused by duplicate data storage.
[0034] The technical solution of the embodiment of the present invention responds to various data backup related operations performed by the user, and sends the various data generated by the operation to each node in the backup cluster for common storage. Thereafter, whenever a preset time period is reached, the master node is marked in each node in the backup cluster according to the preset election rules, and within the time period, the data collected by the master node is sent to the server to perform the backup operation, thereby improving the hot backup efficiency of the node data and enhancing the reliability and availability of the node hot backup work.
[0035] Embodiment 2
[0036] Figure 2 A flowchart of a hot backup method for node data provided in Embodiment 2 of the present invention. This embodiment is refined based on the above-mentioned embodiment. In this embodiment, a master node is determined among the nodes in the backup cluster according to a preset election rule, and within this time period, the data collected by the master node is sent to the server to perform a backup operation.
[0037] like Figure 2 As shown, the method includes:
[0038] S210 . In response to various data backup related operations performed by the user, various data generated by the operations are sent to various nodes in the backup cluster for common storage.
[0039] S220. Whenever a preset time period is reached, an online confirmation message is sent to each node in the backup cluster, and the node that successfully feeds back an election message in response to the online confirmation message is identified as the current running node.
[0040] Specifically, during the operation of the entire system, whenever a preset time period is reached, such as a specific time interval such as every hour, every day or every week, an online confirmation message will be sent to each node in the backup cluster; wherein the online confirmation message is a specific instruction or signal used to confirm whether the current node is in a normal operating state. Subsequently, the system will identify the node that successfully feeds back the election message for the online confirmation message as the current operating node. For example, when the node receives the online confirmation message, it quickly performs self-detection, including hardware status (such as CPU operation status, memory usage, etc.), software operation status (such as whether the process is normal, whether the service is available, etc.), and feeds back the detection results to the system in the form of an election message. If the node can accurately complete the feedback within the specified time, it will be identified as the current operating node and undertake the corresponding data processing and storage tasks; it should be noted that the specific content of the election message can be manually set according to actual needs, and this embodiment does not limit this. Such a mechanism can ensure that the system can always effectively identify the currently running nodes and nodes in the shutdown state within the current time period, avoiding the problem of hot backup operation failure caused by incorrectly setting the master node as a node in the shutdown state.
[0041] S230: Select a unique target node from each currently running node according to the node quantity, node number and at least one of the preset election rules of each currently running node, and mark the target node as a master node.
[0042] Among them, according to the node quantity, node number and at least one of the preset election rules of each currently running node, a unique target node is selected from each currently running node, including: if the number of currently running nodes is unique, the current running node is determined as the only target node.
[0043] Further, based on the above steps, if the number of currently running nodes is not unique and the preset election rule is an automatic election rule, determine whether there is a node marked as a master node among each currently running node; if there is a node marked as a master node, the master node is determined as the target node; if there is no node marked as a master node, the current running node with the smallest node number is selected from each currently running node and determined as the target node.
[0044] Optionally, a unique target node is selected from each currently running node based on the number of nodes, the node number and at least one of the preset election rules of each currently running node, including: if the number of currently running nodes is not unique and the preset election rule is a manual election rule, obtaining a specified node number in the preset election rule; detecting whether the current running node matching the specified node number has been marked as a master node; if so, determining the master node as the unique target node; if not, determining the current running node matching the node number as the unique target node.
[0045] On the basis of the above steps, after sending the data collected by the master node to the server to perform the backup operation, it also includes: after detecting that an election message sent by a node that is not the current running node is received within the time period, the node is identified as the current running node; returning to execute the operation of selecting a unique target node from each current running node based on the node quantity, node number and at least one of the preset election rules of each current running node.
[0046] Optionally, after sending the online confirmation information to each node in the backup cluster, it also includes: if no election message fed back by any node is received within a complete time period, generating network abnormality information to prompt relevant personnel.
[0047] In a specific implementation of this embodiment, in the operation process of the entire system, it is necessary to accurately select a unique target node from each current running node based on multiple key factors of each current running node, such as the number of nodes, the node number, and at least one of the preset election rules; wherein the number of nodes refers to the total number of nodes currently in operation, and the node number is a unique identifier assigned to each node to distinguish different nodes. Specifically, if the number of current running nodes is unique, then the current running node is directly determined as the only target node. Further, if the number of current running nodes is not unique, and the preset election rule is an automatic election rule, then it is necessary to determine whether there is a node that has been marked as a master node in each current running node. For example, the master node may be marked in advance based on the previous operation status or specific performance indicators. If there is a node that has been marked as a master node, the master node is determined as the target node; if there is no node that has been marked as a master node, then the current running node with the smallest node number is selected from each current running node and determined as the target node.
[0048] Another optional situation is that if the number of currently running nodes is not unique, and the preset election rule is a manual election rule, then the specified node number is obtained in the preset election rule. Next, it is detected whether the current running node that matches the specified node number has been marked as the master node. If so, the master node is determined as the only target node; if not, the current running node that matches the node number is determined as the only target node. After sending the data collected by the master node to the server to perform the backup operation, it also includes the following steps: after detecting that an election message sent by a non-current running node is received within the time period, the node is identified as the current running node, and then the operation of selecting a unique target node in each current running node is returned based on the number of nodes, the node number and at least one of the preset election rules of each current running node.
[0049] Optionally, after sending the online confirmation information to each node in the backup cluster, the following situation is also included: if no election message is received from any node within a complete time period, network abnormality information will be generated to prompt relevant personnel. For example, the network abnormality information can be sent to the staff responsible for network maintenance and management through pop-up windows, emails, or text messages, so that they can take timely measures to solve the problem and ensure the normal operation of the system.
[0050] The technical solution of the embodiment of the present invention responds to various data backup related operations performed by the user, and sends the various data generated by the operation to each node in the backup cluster for common storage. Thereafter, whenever a preset time period is reached, an online confirmation message is sent to each node in the backup cluster, and the node that successfully feeds back an election message for the online confirmation message is identified as the current running node. Thereafter, based on the node quantity, node number and at least one of the preset election rules of each current running node, a unique target node is selected from each current running node, and the target node is marked as the master node. Finally, the data collected by the master node is sent to the server to perform the backup operation, thereby solving the problem that the hot backup efficiency of node data is low and the reliability and availability of node hot backup work are poor due to the existing hot backup method of node hot data, thereby improving the hot backup efficiency of node data and enhancing the reliability and availability of node hot backup work.
[0051] Embodiment 3
[0052] Figure 3 This is a schematic diagram of the structure of a hot backup device for node data provided by Embodiment 3 of the present invention. Figure 3 As shown, the device comprises:
[0053] The data backup module 310 is used to respond to various data backup related operations performed by the user and send various data generated by the operation to each node in the backup cluster for common storage;
[0054] The node election module 320 is used to mark the master node in each node in the backup cluster according to the preset election rules whenever a preset time period is reached, and send the data collected by the master node to the server to perform the backup operation during the time period.
[0055] The technical solution of the embodiment of the present invention responds to various data backup related operations performed by the user, and sends the various data generated by the operation to each node in the backup cluster for common storage. Thereafter, whenever a preset time period is reached, the master node is marked in each node in the backup cluster according to the preset election rules, and within the time period, the data collected by the master node is sent to the server to perform the backup operation, thereby improving the hot backup efficiency of the node data and enhancing the reliability and availability of the node hot backup work.
[0056] Based on the above embodiment, the node election module 320 includes:
[0057] The running node identification unit is used to send an online confirmation message to each node in the backup cluster, and identify the node that successfully feeds back an election message in response to the online confirmation message as the current running node;
[0058] A master node marking unit, configured to select a unique target node from each currently running node according to the number of nodes, the node number and at least one of the preset election rules of each currently running node, and mark the target node as the master node;
[0059] The data backup unit is used to send the data collected by the master node to the server to perform backup operations.
[0060] On the basis of the above embodiment, the master node marking unit is further used to: if the number of currently running nodes is unique, determine the currently running node as the only target node.
[0061] Based on the above embodiment, the master node marking unit further includes:
[0062] A first rule judgment unit, configured to judge whether there is a node marked as a master node among the currently running nodes if the number of currently running nodes is not unique and the preset election rule is an automatic election rule;
[0063] A first determining unit, configured to determine the master node as a target node if there is a node that has been marked as a master node;
[0064] The second determining unit is configured to select a current running node with the smallest node number from among the current running nodes as the target node if there is no node marked as the master node.
[0065] Based on the above embodiment, the master node marking unit further includes:
[0066] A second rule judgment unit, configured to obtain a designated node number in the preset election rule if the number of currently running nodes is not unique and the preset election rule is a manual election rule;
[0067] A master node detection unit, used to detect whether the current running node matching the specified node number has been marked as a master node;
[0068] a third determining unit, configured to, if yes, determine the master node as the only target node;
[0069] The fourth determining unit is configured to, if not, determine the current running node that matches the node ID as the only target node.
[0070] On the basis of the above embodiment, the data backup unit is also used to: after sending the data collected by the master node to the server to perform a backup operation, after detecting that an election message sent by a node that is not the current running node is received within the time period, identify the node as the current running node; return to execute the operation of selecting a unique target node from each current running node based on the node quantity, node number and at least one of the preset election rules of each current running node.
[0071] Based on the above embodiment, the running node identification unit is also used to: after sending online confirmation information to each node in the backup cluster, if no election message is received from any node within a complete time period, generate network abnormality information to prompt relevant personnel.
[0072] A hot backup device for node data provided in an embodiment of the present invention can execute a hot backup method for node data provided in any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.
[0073] Embodiment 4
[0074] Figure 4A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0075] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0076] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0077] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a hot backup method for node data.
[0078] Accordingly, the method comprises:
[0079] In response to various data backup-related operations performed by the user, various data generated by the operations are sent to various nodes in the backup cluster for common storage;
[0080] Whenever a preset time period is reached, the master node is marked in each node in the backup cluster according to the preset election rules, and during this time period, the data collected by the master node is sent to the server to perform the backup operation.
[0081] In some embodiments, a hot backup method for node data may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the hot backup method for node data described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform a hot backup method for node data in any other appropriate manner (e.g., by means of firmware).
[0082] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0083] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0084] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0085] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0086] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0087] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0088] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
Claims
1. A hot backup method for node data, characterized in that: include: In response to various data backup-related operations performed by the user, various data generated by the operations are sent to various nodes in the backup cluster for common storage; Whenever a preset time period is reached, the master node is marked in each node in the backup cluster according to the preset election rules, and during this time period, the data collected by the master node is sent to the server to perform the backup operation.
2. The method according to claim 1, characterized in that According to the preset election rules, the master node is marked in each node in the backup cluster, and the data collected by the master node is sent to the server to perform backup operations during the time period, including: Send online confirmation information to each node in the backup cluster, and identify the node that successfully feedbacks the election message in response to the online confirmation information as the current running node; According to the number of nodes, the node number and at least one of the preset election rules of each currently running node, a unique target node is selected from each currently running node, and the target node is marked as a master node; The data collected by the master node is sent to the server to perform backup operations.
3. The method according to claim 2, characterized in that According to at least one of the number of nodes, the node number and the preset election rule of each currently running node, a unique target node is selected from each currently running node, including: If the number of currently running nodes is unique, the currently running nodes are determined as unique target nodes.
4. The method according to claim 2, characterized in that: According to at least one of the number of nodes, the node number and the preset election rule of each currently running node, a unique target node is selected from each currently running node, including: If the number of currently running nodes is not unique and the preset election rule is an automatic election rule, determine whether there is a node marked as a master node among the currently running nodes; If there is a node that has been marked as a master node, the master node is determined as the target node; If there is no node marked as a master node, the current running node with the smallest node number is selected from among the current running nodes to be determined as the target node.
5. The method according to claim 2, characterized in that: According to at least one of the number of nodes, the node number and the preset election rule of each currently running node, a unique target node is selected from each currently running node, including: If the number of currently running nodes is not unique, and the preset election rule is a manual election rule, then obtaining the designated node number in the preset election rule; Detect whether the currently running node matching the specified node number has been marked as a master node; If yes, the master node is determined as the only target node; If not, the current running node matching the node ID is determined as the only target node.
6. The method according to claim 2, characterized in that After sending the data collected by the master node to the server for backup operation, it also includes: After detecting that an election message sent by a node other than the currently running node is received within the time period, identifying the node as the currently running node; Returns an operation of selecting a unique target node from each currently running node based on at least one of the node quantity, node number, and preset election rule of each currently running node.
7. The method according to claim 2, characterized in that After sending the online confirmation information to each node in the backup cluster, it also includes: If no election message is received from any node within a complete time period, a network abnormality message is generated to alert relevant personnel.
8. A hot backup device for node data, characterized in that: include: A data backup module, which is used to respond to various data backup related operations performed by the user and send various data generated by the operation to each node in the backup cluster for common storage; The node election module is used to mark the master node in each node in the backup cluster according to the preset election rules whenever a preset time period is reached, and send the data collected by the master node to the server to perform the backup operation during the time period.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute a hot backup method for node data according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a hot backup method for node data according to any one of claims 1 to 7 when executed.
