Dual-computer hot backup control method and device

By introducing FPGA and DDR memory into the dual-machine hot standby system, and utilizing the collaborative work of the control module and data processing module, the problems of low efficiency and unbalanced storage in dual-machine hot standby are solved, achieving efficient data management and storage optimization.

CN119739560BActive Publication Date: 2026-04-07HANGZHOU EBOYLAMP ELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

In existing technologies, dual-machine hot standby is inefficient and has uneven storage, making it impossible to dynamically allocate data as needed, resulting in insufficient or surplus storage space in some partitions.

Method used

Data is managed and scheduled through the first and second control modules, while the first and second data processing modules are responsible for hot backup data. FPGA and DDR memory are used to dynamically allocate data on demand to avoid unbalanced storage.

Benefits of technology

It improves the efficiency of dual-machine hot standby, reduces the dependence on CPU performance and network bandwidth, enables flexible data allocation, and avoids the problem of unbalanced storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119739560B_ABST
    Figure CN119739560B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of computer control, and discloses a dual-computer hot backup control method and device, which comprises the following steps: a first control module sends a first rule and a second rule to a first data processing module; the first data processing module collects initial data according to the first rule and sends hot backup data to a second data processing module according to the second rule; when the first control module receives a stop storage command, the first control module sends the stop storage command and first storage information to a second control module, and the second control module acquires second storage information; when the first storage information and the second storage information are different, a synchronization command is sent to the second data processing module to perform a data synchronization operation. According to the application, the first control module and the second control module manage and dispatch data, the first data processing module and the second data processing module hot backup data, and data is dynamically distributed according to the first rule and the second rule as required, so that the efficiency of dual-computer hot backup is improved, and storage imbalance is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer control, in particular to a dual-machine hot backup control method and device. BACKGROUND

[0002] With the improvement of the endurance ability and load precision of the warship, the requirements for the recording storage device applied to the warship are also higher and higher, mainly embodied in higher storage bandwidth, larger storage capacity, higher reliability, more effective intelligence data and the like. At the same time, due to the limited space and power consumption of the warship, the recording storage device applied to the warship cannot rely on the node horizontal expansion mode to realize. Therefore, a new recording storage product is urgently needed to solve the above problems.

[0003] In the prior art, cluster technology is often used to improve the availability, scalability and load balancing capability of the system, among which, dual-machine hot backup is a common cluster mode, mainly deploying two sets of completely consistent software and hardware platforms (such as servers, cloud platforms, etc.), providing service hot backup and storage hot backup. At the same time, the DRBD strategy is often used to realize dual-machine hot backup, that is, the data bit mirroring technology is used to network mirror the block device (hard disk, partition, logical volume, etc.), so as to realize the automatic real-time synchronization backup of the master node data to the slave node, so as to achieve the data consistency on the master and slave nodes.

[0004] However, in the implementation process of the scheme, the data hot backup, detection hot backup switching mechanism and data management are all completed by the CPU, and the real-time backup efficiency is limited by the CPU performance and network bandwidth on the node, thereby resulting in low hot backup efficiency, and the network mirroring can only be performed on the block device such as hard disk, partition and logical volume, and the minimum unit of the mirroring is the partition or logical volume, which cannot dynamically allocate data on demand to meet the demand of some data not hot backup, thereby easily leading to the problem of unbalanced storage, such as some partitions not having enough storage space and some partitions having remaining storage space. SUMMARY

[0005] To solve the problems of low hot backup efficiency and unbalanced storage mentioned above, the embodiments of the present application provide a dual-machine hot backup control method and device, and the technical scheme is as follows:

[0006] In a first aspect, the embodiments of the present application provide a dual-machine hot backup control method, which is applied to a recording storage device, the recording storage device comprising a first data processing module, a first control module, a second data processing module and a second control module, and the method comprises:

[0007] The first control module sends the first rule and the second rule to the first data processing module; wherein the first rule at least comprises a first data type and a collection frequency, and the second rule at least comprises a second data type;

[0008] The first data processing module collects initial data according to the first rule and sends hot backup data to the second data processing module according to the second rule; wherein, the hot backup data is the data in the initial data that needs to be backed up;

[0009] When the first control module receives the stop storage command, it sends the first storage information corresponding to the initial data and the stop storage command to the second control module, and the second control module obtains the second storage information corresponding to the hot standby data.

[0010] When the second control module identifies a difference between the first stored information and the second stored information, it sends a synchronization command to the second data processing module, which then performs the data synchronization operation.

[0011] In one alternative embodiment of the first aspect, before the first control module sends the first rule and the second rule to the first data processing module, the method further includes:

[0012] The first control module obtains the system load value and determines the system load status based on the system load value;

[0013] The first rule is generated based on the sampling frequency corresponding to the system load status.

[0014] In another alternative to the first aspect, after the first data processing module collects initial data according to the first rule and sends hot standby data to the second data processing module according to the second rule, the method further includes:

[0015] The first data processing module sends a first heartbeat signal to the second data processing module;

[0016] When the second data processing module does not receive the first heartbeat signal within a preset time interval, the first control module sends the second heartbeat signal to the second control module.

[0017] When the second control module does not receive the second heartbeat signal within a preset time interval, the second data processing module collects the initial data.

[0018] In another alternative to the first aspect, after the initial data is collected by the second data processing module, it further includes:

[0019] When the second data processing module receives the first heartbeat signal within a preset time interval, and when the second control module receives the second heartbeat signal within a preset time interval, the second data processing module sends supplementary data to the first data processing module, and the first data processing module collects the initial data; wherein, the supplementary data is the data collected by the second data processing module.

[0020] In another alternative to the first aspect, the recording storage device further includes a first storage module and a second storage module;

[0021] After the first data processing module collects the initial data according to the first rule, the process also includes:

[0022] When the first control module detects that the first storage module is in a fully loaded state, it obtains the state of the second storage module; wherein, the first storage module is used to store data from the first data processing module, and the second storage module is used to store data from the second data processing module;

[0023] When the second control module detects that the second storage module is in an idle state, the second data processing module collects the initial data.

[0024] In another alternative to the first aspect, the data synchronization operation is performed by the second data processing module, including:

[0025] The first data processing module sends the synchronization data in the first storage module to the second data processing module, and the second data processing module stores the synchronization data in the second storage module.

[0026] The first control module sends the synchronization index information corresponding to the synchronization data to the second control module to achieve data sharing and access.

[0027] In another alternative embodiment of the first aspect, after the first control module sends the first storage information corresponding to the initial data and the stop storage command to the second control module when the first control module receives the stop storage command, it further includes:

[0028] When the first control module detects a power-on signal, and when the second control module is in hot standby mode, the second data processing module performs a data synchronization operation.

[0029] When the first control module detects a power-on signal and the second control module is in a non-hot standby state, the first data processing module collects initial data.

[0030] Secondly, embodiments of this application provide a dual-machine hot standby control device, which is applied to a recording storage device. The recording storage device includes a first data processing module, a first control module, a second data processing module, and a second control module. The device includes:

[0031] The first processing module is used to send the first rule and the second rule to the first data processing module from the first control module; wherein the first rule includes at least a first data type and a sampling frequency, and the second rule includes at least a second data type;

[0032] The second processing module is used to collect initial data from the first data processing module according to the first rule, and send hot backup data to the second data processing module according to the second rule; wherein, the hot backup data is the data in the initial data that needs to be backed up;

[0033] The third processing module is used to send the first storage information corresponding to the initial data and the stop storage command to the second control module when the first control module receives the stop storage command, and the second control module obtains the second storage information corresponding to the hot standby data.

[0034] The fourth processing module is used to send a synchronization command to the second data processing module when the second control module identifies a difference between the first stored information and the second stored information, and the second data processing module performs the data synchronization operation.

[0035] Thirdly, embodiments of this application also provide a dual-machine hot standby control device, including a processor and a memory;

[0036] The processor is connected to the memory;

[0037] Memory, used to store executable program code;

[0038] The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to implement the dual-machine hot standby control method provided by the first aspect or any implementation of the first aspect of the embodiments of this application.

[0039] Fourthly, embodiments of this application provide a computer storage medium storing a computer program, which includes program instructions. When executed by a processor, the program instructions can implement the dual-machine hot standby control method provided by the first aspect or any implementation thereof of the embodiments of this application.

[0040] The beneficial effects of the technical solutions provided in some embodiments of this specification include at least the following:

[0041] During the dual-machine hot standby control process, the first and second control modules are responsible for managing and scheduling data, while the first and second data processing modules are responsible for hot standby data. This makes the dual-machine hot standby not limited by CPU performance and network bandwidth, thus improving the efficiency of the dual-machine hot standby. At the same time, data can be dynamically allocated on demand according to the first and second rules to meet the needs of some data not being hot-standby, thereby avoiding the occurrence of storage imbalance. Attached Figure Description

[0042] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0043] Figure 1 A flowchart illustrating a dual-machine hot standby control method provided in this application embodiment;

[0044] Figure 2 This is a schematic diagram of the structure of a dual-machine hot standby control device provided in an embodiment of this application;

[0045] Figure 3 This is a schematic diagram of another dual-machine hot standby control device provided in the embodiments of this application. Detailed Implementation

[0046] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.

[0047] In the following description, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. The following description provides multiple embodiments of this application, which can be substituted or combined with each other. Therefore, this application can also be considered to include all possible combinations of the same and / or different embodiments described. Thus, if one embodiment includes features A, B, and C, and another embodiment includes features B and D, then this application should also be considered to include embodiments containing one or more other possible combinations of A, B, C, and D, even if such embodiments are not explicitly described in the following text.

[0048] The following description provides examples and does not limit the scope, applicability, or examples set forth in the claims. Changes may be made to the function and arrangement of the described elements without departing from the scope of this application. Various processes or components may be appropriately omitted, substituted, or added to the examples. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Furthermore, features described with respect to some examples may be combined into other examples.

[0049] Please see Figure 1 , Figure 1 The diagram shows an overall flowchart of a dual-machine hot standby control method provided in an embodiment of this application.

[0050] like Figure 1 As shown, the dual-machine hot standby control method may include at least the following steps:

[0051] Step 101: The first control module sends the first rule and the second rule to the first data processing module.

[0052] In this embodiment, the dual-machine hot standby control method is applied to a recording storage device, which includes a first data processing module, a first control module, a second data processing module, and a second control module. The first data processing module includes at least an FPGA (Field-Programmable Gate Array) chip and DDR memory (a high-performance dynamic random access memory). The first control module includes at least a CPU and hot standby coordination software. The second data processing module includes at least an FPGA chip and DDR memory. The second control module includes at least a CPU and hot standby coordination software (which can be used to receive commands, send commands, record storage information, etc.). During the dual-machine hot standby control process, the first and second control modules are responsible for managing and scheduling data, while the first and second data processing modules are responsible for hot standby data. This allows the dual-machine hot standby to be unrestricted by CPU performance and network bandwidth, improving its efficiency. Simultaneously, it can dynamically allocate data on demand according to the first and second rules to meet the need for some data not to be hot-standby, thereby avoiding storage imbalance.

[0053] It should be noted that in the dual-machine hot standby control process, there are master nodes and slave nodes. The master node is the node currently providing services, responsible for handling all requests and transactions. The slave node is the standby node, ready to take over the responsibilities of the master node at any time. The master node includes at least a first control module and a first data processing module, and the slave node includes at least a second control module and a second data processing module. The master node and slave node can belong to the same record storage device or different record storage devices.

[0054] Specifically, in the dual-machine hot standby control process, the first control module first sends the first rule and the second rule to the first data processing module. This allows the first data processing module to collect initial data according to the collection frequency specified in the first rule, and then filter the collected initial data according to the second rule. It is understood that the first rule may include, but is not limited to, a first data type, collection frequency, storage method, etc., and the second rule may include, but is not limited to, a second data type, data size, etc., where the second data type is a subset of the first data type. The first and second rules can be preset by the user or dynamically set according to actual application scenarios and requirements.

[0055] As an optional embodiment of this application, before the first control module sends the first rule and the second rule to the first data processing module, the method further includes:

[0056] The first control module obtains the system load value and determines the system load status based on the system load value;

[0057] The first rule is generated based on the sampling frequency corresponding to the system load status.

[0058] Specifically, before the first control module sends the first rule and the second rule to the first data processing module, the first control module can first obtain the system load value through the uptime command. The system load value can be, but is not limited to, CPU utilization, average load, idle time, and the number of system calls and context switches. When the CPU utilization is below 30%, the average load is usually less than 1, which is considered that the system is in a low load state; when the CPU utilization is between 30% and 70%, the average load is between 1 and 2, which is considered that the system is in a medium load state; when the CPU utilization is above 70%, the average load is usually greater than 2, which is considered that the system is in a high load state.

[0059] Next, the system can query the database for preset sampling frequencies corresponding to different system load states, select an appropriate storage method based on the sampling frequency, and then generate the first rule. For example, if the system is determined to be under high load, the corresponding sampling frequency is 0.1Hz, and the storage method can be, but is not limited to, dual-master replication, master-slave replication, distributed file system, object storage, database cluster, etc. The first rule can be, but is not limited to, composed of the sampling frequency and the storage method.

[0060] Step 102: The first data processing module collects initial data according to the first rule and sends the hot standby data to the second data processing module according to the second rule.

[0061] Specifically, after the first data processing module receives the first rule, it can collect initial data according to the first rule. Then, the FPGA in the first data processing module can map the physical address space of the storage module used to store the initial data to the address space of the FPGA, so that the FPGA can access the data in the storage module through a specific address. The method can be, but is not limited to, PCIE switch bus addressing.

[0062] Furthermore, after the first data processing module collects the initial data according to the first rule, it can also determine the hot backup data in the initial data according to the second rule, and then send the hot backup data to the second data processing module. The hot backup data is the data in the initial data that needs to be backed up.

[0063] Understandably, the filtering function of the second rule enables data allocation on demand, meets the need for some data not to be hot-backed, and thus avoids the occurrence of storage imbalance.

[0064] As another optional embodiment of this application, after the first data processing module collects initial data according to the first rule and sends hot standby data to the second data processing module according to the second rule, the method further includes:

[0065] The first data processing module sends a first heartbeat signal to the second data processing module;

[0066] When the second data processing module does not receive the first heartbeat signal within a preset time interval, the first control module sends the second heartbeat signal to the second control module.

[0067] When the second control module does not receive the second heartbeat signal within a preset time interval, the second data processing module collects the initial data.

[0068] Specifically, after the first data processing module collects initial data according to the first rule and sends the hot standby data to the second data processing module according to the second rule, the FPGA in the first data processing module can send a first heartbeat signal to the FPGA in the second data processing module. This heartbeat detection ensures normal communication between the master and slave nodes and allows for timely detection and handling of faults. If the master node fails to send a heartbeat signal within a predetermined time, the slave node can assume the master node has failed and trigger the failover mechanism. When the master node fails, the slave node can quickly and automatically take over the master node's work, minimizing service interruption time and ensuring service continuity and availability.

[0069] Next, if the second data processing module does not receive the first heartbeat signal within the preset time interval, it means that the master node may be malfunctioning. The heartbeat network card in the first control module can send the second heartbeat signal to the heartbeat network card in the second control module to avoid incorrect judgment of master node malfunction due to network jitter or temporary interruption, and reduce the possibility of misjudgment.

[0070] Subsequently, if the second control module does not receive the second heartbeat signal within the preset time interval, it indicates that the master node has failed and the slave node needs to complete the data acquisition and storage. Therefore, the FPGA in the second data processing module can acquire the initial data.

[0071] It is worth noting that in determining whether the first and second heartbeat signals have been received, in addition to checking the first heartbeat signal first and then sending the second heartbeat signal for further checking, it is also possible to send both the first and second heartbeat signals simultaneously and check them at the same time. Only when both heartbeat signals are abnormal is it determined that the master node has failed, thus reducing the risk of false positives.

[0072] As another optional embodiment of this application, after the initial data is collected by the second data processing module, the method further includes:

[0073] When the second data processing module receives the first heartbeat signal within a preset time interval, and when the second control module receives the second heartbeat signal within a preset time interval, the second data processing module sends supplementary data to the first data processing module, and the first data processing module collects the initial data; wherein, the supplementary data is the data collected by the second data processing module.

[0074] Specifically, after the second data processing module collects initial data, when the second data processing module receives the first heartbeat signal within a preset time interval, and when the second control module receives the second heartbeat signal within a preset time interval, it indicates that both heartbeat links have returned to normal and the fault of the master node has been repaired. At this time, the data collection task of the slave node can be returned to the master node for completion. Since the slave node collected some data during the master node fault, and the master node did not collect this part of the data, in order to ensure the continuity and consistency of the data, it is necessary to synchronize this part of the data from the slave node to the master node. Therefore, the second data processing module can send this part of the data (i.e., supplementary data) to the first data processing module, and the first data processing module can continue to collect subsequent data to realize the switching of the data collection task between the master and slave nodes after the master node fault is recovered.

[0075] As another option in the embodiments of this application, the recording storage device further includes a first storage module and a second storage module;

[0076] After the first data processing module collects the initial data according to the first rule, the process also includes:

[0077] When the first control module detects that the first storage module is in a fully loaded state, it obtains the state of the second storage module; wherein, the first storage module is used to store data from the first data processing module, and the second storage module is used to store data from the second data processing module;

[0078] When the second control module detects that the second storage module is in an idle state, the second data processing module collects the initial data.

[0079] Specifically, the recording storage device may further include a first storage module and a second storage module. The first and second storage modules may include, but are not limited to, NVMe SSDs and NAND Flash SSDs. The first storage module stores data from the first data processing module, and the second storage module stores data from the second data processing module. After the first data processing module collects initial data according to a first rule, the hot standby coordination software in the first control module can detect the storage status of the first storage module. If the first storage module is detected to be fully loaded, meaning the master node's storage space is completely used and there is no remaining space for storing subsequent data, the hot standby coordination software in the second control module can then detect the storage space of the slave node (i.e., the second storage module). If the slave node has remaining storage space, it can take over from the master node to complete data collection and storage. That is, the FPGA in the second data processing module collects the initial data and stores it in the second storage module, thereby realizing a serial working mode between master and slave nodes and achieving the purpose of expanding storage space.

[0080] Step 103: When the first control module receives the stop storage command, it sends the first storage information corresponding to the initial data and the stop storage command to the second control module, and the second control module obtains the second storage information corresponding to the hot standby data.

[0081] Specifically, during the process of the second data processing module receiving hot standby data and its internal FPGA storing the hot standby data into the second storage module, if the first control module receives a stop storage command, it means that the hot standby operation needs to be stopped. Therefore, the data acquisition and storage of the FPGA in the first data processing module can be stopped. At the same time, the hot standby collaborative software in the first control module stops recording storage information, that is, the first storage information corresponding to the initial data, which may include, but is not limited to, storage time, data size, data type, storage address, etc.

[0082] Furthermore, after the master node stops hot standby, the first control module needs to send a stop storage command to the second control module so that the hot standby coordination software in the second control module can control the FPGA in the second data processing module to stop receiving hot standby data and stop recording storage information, i.e., the second storage information corresponding to the hot standby data, according to the stop storage command.

[0083] It is worth noting that, in addition to stopping data collection and storage according to the command, it is also necessary to stop recording storage information to avoid misjudging the data inconsistency between the master and slave nodes due to failure to stop recording storage information in time.

[0084] Subsequently, the second control module can acquire the stopped second storage record information to compare with the first storage information and verify the consistency of the data transmission process.

[0085] Step 104: When the second control module identifies a difference between the first stored information and the second stored information, it sends a synchronization command to the second data processing module, and the second data processing module performs the data synchronization operation.

[0086] Specifically, after the second control module obtains the second storage information corresponding to the hot standby data, it can also compare the first storage information and the second storage information to obtain the comparison result.

[0087] When no difference is found in the comparison results, it indicates that the hot standby process has been successfully completed and the data is normal. The slave node's hot standby coordination software can then set itself to a completed data hot standby state and report this status to the master node's hot standby coordination software, i.e., send a hot standby completion signal to the first control module. After receiving the slave node's hot standby completion signal, the master node's hot standby coordination software can set itself to a completed data hot standby state, indicating that the hot standby process has been successfully completed, the data is normal, and no data synchronization is required.

[0088] Meanwhile, when a discrepancy is detected in the comparison results, it indicates an anomaly in the data during the hot standby process, requiring data synchronization to restore the hot standby data to normal. Therefore, the second control module can send a synchronization command to the second data processing module, which can then execute the data synchronization operation based on the synchronization command.

[0089] As another optional embodiment of this application, the data synchronization operation is performed by the second data processing module, including:

[0090] The first data processing module sends the synchronization data in the first storage module to the second data processing module, and the second data processing module stores the synchronization data in the second storage module.

[0091] The first control module sends the synchronization index information corresponding to the synchronization data to the second control module to achieve data sharing and access.

[0092] Specifically, during the data synchronization operation performed by the second data processing module, the first data processing module can first determine the data that needs to be synchronized based on the previous comparison results (such as data missing in a certain time period, or data of a certain type that is lost). Then, the synchronized data in the first storage module can be sent to the second data processing module, so that the second data processing module can store the synchronized data in the second storage module to ensure that the hot backup data is normal and error-free.

[0093] Next, the first control module can send the synchronization index information (such as file name, file type, storage location, start time, file size, etc.) corresponding to the synchronization data to the second control module so that the master node and the slave node can realize data sharing access (i.e., accurately find the required data through the index information and perform reading and writing, etc.).

[0094] As another optional embodiment of this application, after the first control module sends the first storage information corresponding to the initial data and the stop storage command to the second control module when the first control module receives the stop storage command, it further includes:

[0095] When the first control module detects a power-on signal, and when the second control module is in hot standby mode, the second data processing module performs a data synchronization operation.

[0096] When the first control module detects a power-on signal and the second control module is in a non-hot standby state, the first data processing module collects initial data.

[0097] Specifically, when the first control module receives the stop storage command, it sends the first storage information corresponding to the initial data and the stop storage command to the second control module. The first control module can also detect the power-on signal, which is the signal generated when the device or system is restored to power-on state after a power outage.

[0098] When the first control module detects a power-on signal and the second control module is in hot standby mode, it means that the device or system is performing data hot standby during the power outage. In order to avoid abnormalities in the hot standby data due to the power outage, a data synchronization operation needs to be performed after power is restored to ensure that the hot standby data is correct. Therefore, the second data processing module can perform the data synchronization operation at this time.

[0099] Furthermore, when the first control module detects a power-on signal and the second control module is in a non-hot standby state, it means that the device or system did not perform data hot standby or has completed data hot standby during the power outage. Therefore, there is no need to perform data synchronization operation, and the first data processing module can continue to collect the initial data normally.

[0100] Please see Figure 2 , Figure 2 A schematic diagram of a dual-machine hot standby control device provided in an embodiment of this application is shown.

[0101] like Figure 2 As shown, the dual-machine hot standby control device may include at least a first processing module 201, a second processing module 202, a third processing module 203, and a fourth processing module 204, wherein:

[0102] The first processing module 201 is used to send the first rule and the second rule to the first data processing module from the first control module; wherein the first rule includes at least a first data type and a sampling frequency, and the second rule includes at least a second data type;

[0103] The second processing module 202 is used to collect initial data from the first data processing module according to the first rule, and send hot backup data to the second data processing module according to the second rule; wherein, the hot backup data is the data in the initial data that needs to be backed up;

[0104] The third processing module 203 is used to send the first storage information corresponding to the initial data and the stop storage command to the second control module when the first control module receives the stop storage command, and the second control module obtains the second storage information corresponding to the hot standby data.

[0105] The fourth processing module 204 is used to send a synchronization command to the second data processing module when the second control module identifies a difference between the first stored information and the second stored information, and the second data processing module performs the data synchronization operation.

[0106] In some possible embodiments, before the first control module sends the first rule and the second rule to the first data processing module, the method further includes:

[0107] The first processing module 201 is specifically used for:

[0108] The first control module obtains the system load value and determines the system load status based on the system load value;

[0109] The first rule is generated based on the sampling frequency corresponding to the system load status.

[0110] In some possible embodiments, after the first data processing module collects initial data according to a first rule and sends hot standby data to the second data processing module according to a second rule, the method further includes:

[0111] The second processing module 202 is specifically used for:

[0112] The first data processing module sends a first heartbeat signal to the second data processing module;

[0113] When the second data processing module does not receive the first heartbeat signal within a preset time interval, the first control module sends the second heartbeat signal to the second control module.

[0114] When the second control module does not receive the second heartbeat signal within a preset time interval, the second data processing module collects the initial data.

[0115] In some possible embodiments, after the initial data is acquired by the second data processing module, the method further includes:

[0116] The second processing module 202 is specifically used for:

[0117] When the second data processing module receives the first heartbeat signal within a preset time interval, and when the second control module receives the second heartbeat signal within a preset time interval, the second data processing module sends supplementary data to the first data processing module, and the first data processing module collects the initial data; wherein, the supplementary data is the data collected by the second data processing module.

[0118] In some possible embodiments, the recording storage device further includes a first storage module and a second storage module;

[0119] After the first data processing module collects the initial data according to the first rule, the process also includes:

[0120] The second processing module 202 is specifically used for:

[0121] When the first control module detects that the first storage module is in a fully loaded state, it obtains the state of the second storage module; wherein, the first storage module is used to store data from the first data processing module, and the second storage module is used to store data from the second data processing module;

[0122] When the second control module detects that the second storage module is in an idle state, the second data processing module collects the initial data.

[0123] In some possible embodiments, the data synchronization operation is performed by the second data processing module, including:

[0124] The fourth processing module 204 is specifically used for:

[0125] The first data processing module sends the synchronization data in the first storage module to the second data processing module, and the second data processing module stores the synchronization data in the second storage module.

[0126] The first control module sends the synchronization index information corresponding to the synchronization data to the second control module to achieve data sharing and access.

[0127] In some possible embodiments, after the first control module sends the first storage information corresponding to the initial data and the stop storage command to the second control module when the first control module receives the stop storage command, the method further includes:

[0128] The fourth processing module 204 is specifically used for:

[0129] When the first control module detects a power-on signal, and when the second control module is in hot standby mode, the second data processing module performs a data synchronization operation.

[0130] When the first control module detects a power-on signal and the second control module is in a non-hot standby state, the first data processing module collects initial data.

[0131] Please see Figure 3 , Figure 3 A schematic diagram of another dual-machine hot standby control device provided in an embodiment of this application is shown.

[0132] like Figure 3 As shown, the dual-machine hot standby control device 300 may include at least one processor 301, at least one network interface 304, user interface 303, memory 305, and at least one communication bus 302.

[0133] The communication bus 302 can be used to realize the connection and communication of the above components.

[0134] The user interface 303 may include buttons, and the optional user interface may also include a standard wired interface or a wireless interface.

[0135] The network interface 304 may include, but is not limited to, Bluetooth modules, NFC modules, Wi-Fi modules, etc.

[0136] The processor 301 may include one or more processing cores. The processor 301 connects to various parts within the dual-machine hot standby control device 300 using various interfaces and lines. It executes various functions and processes data of the dual-machine hot standby control device 300 by running or executing instructions, programs, code sets, or instruction sets stored in the memory 305, and by calling data stored in the memory 305. Optionally, the processor 301 may be implemented using at least one hardware form of DSP, FPGA, or PLA. The processor 301 may integrate one or more of the following: CPU, GPU, and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 301 and may be implemented as a separate chip.

[0137] The memory 305 may include RAM or ROM. Optionally, the memory 305 may include a non-transitory computer-readable medium. The memory 305 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 305 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 305 may also be at least one storage device located remotely from the aforementioned processor 301. Figure 3 As shown, the memory 305, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a dual-machine hot standby control application.

[0138] Specifically, processor 301 can be used to call the dual-machine hot standby control application stored in memory 305, and specifically perform the following operations:

[0139] The first control module sends the first rule and the second rule to the first data processing module; wherein, the first rule includes at least the first data type and the sampling frequency, and the second rule includes at least the second data type;

[0140] The first data processing module collects initial data according to the first rule and sends hot backup data to the second data processing module according to the second rule; wherein, the hot backup data is the data in the initial data that needs to be backed up;

[0141] When the first control module receives the stop storage command, it sends the first storage information corresponding to the initial data and the stop storage command to the second control module, and the second control module obtains the second storage information corresponding to the hot standby data.

[0142] When the second control module identifies a difference between the first stored information and the second stored information, it sends a synchronization command to the second data processing module, which then performs the data synchronization operation.

[0143] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method. The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, microdrives, as well as magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.

[0144] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0145] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0146] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some service interface; the indirect coupling or communication connection between apparatuses or units may be electrical or other forms.

[0147] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0148] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0149] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0150] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0151] The above are merely exemplary embodiments of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Those skilled in the art will readily conceive of embodiments of this disclosure upon considering the specification and practicing the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described herein. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.

Claims

1. A dual-machine hot standby control method, characterized in that, The method is applied to a recording storage device, which includes a master node and slave nodes. The master node is the node currently providing services and is responsible for handling all requests and transactions. The slave node is a standby node, ready to take over the responsibilities of the master node at any time. The master node includes at least a first control module and a first data processing module, and the slave node includes at least a second control module and a second data processing module. The method includes: The first control module sends the first rule and the second rule to the first data processing module; wherein, the first rule includes at least a first data type and a sampling frequency, and the second rule includes at least a second data type; The first data processing module collects initial data according to the first rule, and sends hot backup data to the second data processing module according to the second rule; wherein, the hot backup data is the data in the initial data that needs to be backed up; When the first control module receives a stop storage command, it sends the first storage information corresponding to the initial data and the stop storage command to the second control module, and the second control module obtains the second storage information corresponding to the hot standby data. When the second control module identifies a difference between the first stored information and the second stored information, it sends a synchronization command to the second data processing module, which then performs the data synchronization operation.

2. The method according to claim 1, characterized in that, Before the first control module sends the first rule and the second rule to the first data processing module, the method further includes: The first control module obtains the system load value and determines the system load status based on the system load value; A first rule is generated based on the sampling frequency corresponding to the system load state.

3. The method according to claim 1, characterized in that, After the first data processing module collects initial data according to the first rule and sends hot standby data to the second data processing module according to the second rule, the method further includes: The first data processing module sends a first heartbeat signal to the second data processing module; When the second data processing module does not receive the first heartbeat signal within a preset time interval, the first control module sends a second heartbeat signal to the second control module. When the second control module does not receive the second heartbeat signal within the preset time interval, the second data processing module collects the initial data.

4. The method according to claim 3, characterized in that, After the initial data is collected by the second data processing module, the following is also included: When the second data processing module receives the first heartbeat signal within the preset time interval, and when the second control module receives the second heartbeat signal within the preset time interval, the second data processing module sends supplementary data to the first data processing module, and the first data processing module collects the initial data; wherein, the supplementary data is the data collected by the second data processing module.

5. The method according to claim 1, characterized in that, The recording and storage device further includes a first storage module and a second storage module; After the initial data is collected by the first data processing module according to the first rule, the method further includes: When the first control module detects that the first storage module is in a fully loaded state, it obtains the state of the second storage module; wherein, the first storage module is used to store data from the first data processing module, and the second storage module is used to store data from the second data processing module; When the second control module detects that the second storage module is in an idle state, the second data processing module collects the initial data.

6. The method according to claim 5, characterized in that, The data synchronization operation performed by the second data processing module includes: The first data processing module sends the synchronization data in the first storage module to the second data processing module, and the second data processing module stores the synchronization data in the second storage module. The first control module sends the synchronization index information corresponding to the synchronization data to the second control module to achieve data sharing and access.

7. The method according to claim 1, characterized in that, After the first control module sends the first storage information corresponding to the initial data and the stop storage command to the second control module when the first control module receives the stop storage command, the method further includes: When the first control module detects a power-on signal and the second control module is in hot standby mode, the second data processing module performs a data synchronization operation. When the first control module detects a power-on signal, and when the second control module is in a non-hot standby state, the first data processing module collects the initial data.

8. A dual-machine hot standby control device, characterized in that, The apparatus is applied to a recording and storage device, which includes a master node and slave nodes. The master node is the node currently providing services and is responsible for handling all requests and transactions. The slave node is a standby node, ready to take over the responsibilities of the master node at any time. The master node includes at least a first control module and a first data processing module, and the slave node includes at least a second control module and a second data processing module. The apparatus includes: The first processing module is used to send the first rule and the second rule to the first data processing module from the first control module; wherein the first rule includes at least a first data type and a sampling frequency, and the second rule includes at least a second data type; The second processing module is used to collect initial data from the first data processing module according to the first rule, and send hot backup data to the second data processing module according to the second rule; wherein, the hot backup data is the data in the initial data that needs to be backed up; The third processing module is used to send the first storage information corresponding to the initial data and the stop storage command to the second control module when the first control module receives the stop storage command, and the second control module obtains the second storage information corresponding to the hot standby data. The fourth processing module is used to send a synchronization command to the second data processing module when the second control module identifies a difference between the first stored information and the second stored information, and the second data processing module performs the data synchronization operation.

9. A dual-machine hot standby control device, characterized in that, Including the processor and memory; The processor is connected to the memory; The memory is used to store executable program code; The processor runs a program corresponding to the executable program code stored in the memory to perform the steps of the method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer-readable storage medium stores instructions that, when executed on a computer or processor, cause the computer or processor to perform the steps of the method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Authority control method and device for hot standby

    CN114090348A

  • Dual-computer hot standby method for SCADA data acquisition server

    CN116436930A