Dual-computer hot standby control method and device

By introducing rule-driven data acquisition and hot standby mechanisms in the recording and storage device, dynamically allocating data and ensuring data consistency through heartbeat signals and data synchronization operations, the problems of low hot standby efficiency and unbalanced storage in the existing dual-machine hot standby control technology are solved, and more efficient data management and storage are achieved.

CN119739560AActive Publication Date: 2025-04-01HANGZHOU EBOYLAMP ELECTRONICS CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411733345.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-04-01
Estimated Expiration
2044-11-29

AI Technical Summary

Technical Problem

During the implementation of the existing dual-machine hot standby control technology, the hot standby efficiency is low and the data cannot be dynamically allocated on demand, resulting in the problem of unbalanced storage.

Method used

By introducing the first and second control modules, as well as the first and second data processing modules in the recording storage device, the rule-driven data acquisition and hot standby mechanism are adopted to dynamically allocate data to meet different needs, and ensure data consistency through the heartbeat signal mechanism and data synchronization operation.

Benefits of technology

It improves the efficiency of dual-machine hot standby, avoids the problem of storage imbalance, and achieves more efficient data management and storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119739560A_ABST
    Figure CN119739560A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computer control, and discloses a dual-computer hot standby control method and device, and the method comprises the steps that 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 a first rule, and sends the hot standby data to the second data processing module according to a second rule; when the first control module receives a storage stopping command, the storage stopping command and the first storage information are sent to the second control module, and the second control module obtains second storage information; and when the first storage information is different from the second storage information, sending a synchronization command to the second data processing module to execute data synchronization operation. According to the invention, the first control module and the second control module manage and dispatch data, the first data processing module and the second data processing module perform hot standby on the data, and the data is dynamically allocated according to the first rule and the second rule as required, so that the dual-computer hot standby efficiency is improved, and the 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 field of computer control technology, and in particular to a dual-machine hot standby control method and device. Background Art

[0002] With the improvement of ship endurance and load accuracy, the requirements for record storage devices used in ships are getting higher and higher, mainly reflected in higher storage bandwidth, larger storage capacity, higher reliability, more effective intelligence data, etc. At the same time, due to the limited space and power consumption of ships, the record storage devices used in ships cannot rely on the horizontal expansion of nodes. Therefore, a new type of record storage product is urgently needed to solve the above problems.

[0003] In the existing technology, cluster technology is often used to improve the availability, scalability and load balancing capabilities of the system. Among them, dual-machine hot standby is a common cluster method, which mainly deploys two sets of completely identical software and hardware platforms (such as servers, cloud platforms, etc.) to provide service hot standby and storage hot standby to the outside world. At the same time, the DRBD strategy is often used to implement dual-machine hot standby, that is, the data bit mirroring technology is used to mirror the block device (hard disk, partition, logical volume, etc.) network to realize the automatic real-time synchronization and backup of the master node data to the slave node, so as to achieve data consistency on the master and slave nodes.

[0004] However, in the implementation process of this solution, data hot backup, detection of hot backup switching mechanism and data management are all completed by the CPU. Its real-time backup efficiency is limited by the CPU performance and network bandwidth on the node, resulting in low hot backup efficiency. In addition, it can only perform network mirroring on block devices such as hard disks, partitions, and logical volumes. The smallest unit of the mirror is a partition or logical volume. It is impossible to dynamically allocate data on demand to meet the needs of not hot-backing up some data, which can easily lead to storage imbalance problems. For example, some partitions have insufficient storage space, while others have surplus storage space. Summary of the invention

[0005] In order to solve the above-mentioned problems of low hot standby efficiency and unbalanced storage, the embodiment of the present application provides a dual-machine hot standby control method and device, and its technical solution is as follows: In a first aspect, an embodiment of the present application provides a dual-machine hot standby control method, which is applied to a recording storage device, the recording storage device including a first data processing module, a first control module, a second data processing module, and a second control module, the method including: The first control module sends the first rule and the second rule to the first data processing module; wherein the first rule at least includes the first data type and the collection frequency, and the second rule at least includes the second data type; 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; wherein the hot standby data is the data in the initial data that needs to be backed up; When the first control module receives the stop storage command, the first storage information corresponding to the initial data and the stop storage command are sent to the second control module, and the second control module acquires the second storage information corresponding to the hot standby data; When the second control module identifies that there is a difference between the first storage information and the second storage information, a synchronization command is sent to the second data processing module, and the second data processing module performs a data synchronization operation.

[0006] In an optional solution 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: The first control module obtains the system load value and determines the system load state according to the system load value; A first rule is generated based on a collection frequency corresponding to a system load state.

[0007] In another optional solution of the first aspect, 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 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 initial data.

[0008] In another optional solution of the first aspect, after the second data processing module collects the initial data, the method further includes: 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 the 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.

[0009] In yet another optional solution of the first aspect, the record storage device further includes a first storage module and a second storage module; After the first data processing module collects initial data 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, the state of the second storage module is obtained; 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 initial data.

[0010] In yet another optional solution of the first aspect, the data synchronization operation is performed by the second data processing module, including: 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 synchronization index information corresponding to the synchronization data to the second control module to achieve data sharing access.

[0011] In another optional solution of the first aspect, after the first control module receives the stop storage command, sends the first storage information corresponding to the initial data and the stop storage command to the second control module, the method further includes: When the first control module detects a power-on signal and the second control module is in a hot standby state, the second data processing module performs a data synchronization operation; 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.

[0012] In a second aspect, an embodiment of the present application provides 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: A first processing module, configured to send the first rule and the second rule to the first data processing module by the first control module; wherein the first rule at least includes the first data type and the acquisition frequency, and the second rule at least includes the second data type; The second processing module is used for collecting the initial data according to the first rule by the first data processing module, and sending the hot standby data to the second data processing module according to the second rule; wherein the hot standby data is the data that needs to be backed up in the initial data; A third processing module is used for sending 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 recognizes that there is a difference between the first storage information and the second storage information, and the second data processing module performs a data synchronization operation.

[0013] In a third aspect, an embodiment of the present application further provides a dual-machine hot standby control device, including a processor and a memory; The processor is connected to the memory; A memory for storing executable program codes; The processor runs the 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 of the embodiment of the present application or any implementation method of the first aspect.

[0014] In a fourth aspect, an embodiment of the present application provides a computer storage medium, which stores a computer program. The computer program includes program instructions. When the program instructions are executed by a processor, the dual-machine hot standby control method provided by the first aspect of the embodiment of the present application or any one of the implementation methods of the first aspect can be implemented.

[0015] The beneficial effects brought by the technical solutions provided by some embodiments of this specification include at least: During the dual-machine hot standby control process, the first control module and the second control module are responsible for managing and scheduling data, and the first data processing module and the second data processing module are responsible for hot standby data, so that the dual-machine hot standby is not limited by CPU performance and network bandwidth, thereby improving the efficiency of dual-machine hot standby. At the same time, data can be dynamically allocated on demand according to the first rule and the second rule to meet the need for non-hot standby of some data, thereby avoiding the occurrence of storage imbalance. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 An overall flow chart of a dual-machine hot standby control method provided in an embodiment of the present application; Figure 2 A schematic diagram of the structure of a dual-machine hot standby control device provided in an embodiment of the present application; Figure 3 A schematic diagram of the structure of another dual-machine hot standby control device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0018] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0019] In the following introduction, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance. The following introduction provides multiple embodiments of the present application, and different embodiments can be replaced or combined, so the present application can also be considered to include all possible combinations of the same and / or different embodiments recorded. Therefore, if one embodiment includes features A, B, and C, and another embodiment includes features B and D, then the present application should also be considered to include embodiments containing one or more of all other possible combinations of A, B, C, and D, although the embodiment may not be clearly recorded in the following text.

[0020] 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 functions and arrangements of the elements described without departing from the scope of the present application. Various processes or components may be appropriately omitted, substituted or added to each example. For example, the described method may be performed in an order different from the order described, and various steps may be added, omitted or combined. In addition, features described in some examples may be combined in other examples.

[0021] See also Figure 1 , Figure 1 An overall flow chart of a dual-machine hot standby control method provided in an embodiment of the present application is shown.

[0022] like Figure 1 As shown, the dual-machine hot standby control method may at least include the following steps: Step 101: The first control module sends the first rule and the second rule to the first data processing module.

[0023] In an embodiment of the present application, a 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, wherein the first data processing module includes at least an FPGA (Field-Programmable Gate Array) chip and a 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 a DDR memory, and 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.). In the dual-machine hot standby control process, the first control module and the second control module are responsible for managing and scheduling data, and the first data processing module and the second data processing module are responsible for hot standby data, so that the dual-machine hot standby is not limited by CPU performance and network bandwidth, and the efficiency of the dual-machine hot standby is improved. At the same time, data can be dynamically allocated on demand according to the first rule and the second rule to meet the demand that some data is not hot-standby, thereby avoiding the occurrence of storage imbalance.

[0024] It should be noted that in the dual-machine hot standby control process, there are master nodes and slave nodes. The master node refers to the node currently providing services and is responsible for processing all requests and transactions. The slave node refers to the standby node, which is 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 the slave node can belong to the same record storage device or different record storage devices.

[0025] Specifically, in the dual-machine hot standby control process, the first control module may first send the first rule and the second rule to the first data processing module, so that the first data processing module collects initial data according to the collection frequency in the first rule, and filters the collected initial data according to the second rule. It can be understood that the first rule may include but is not limited to the first data type, collection frequency, storage method, etc., and the second rule may include but is not limited to the second data type, data size, etc., wherein the second data type is a subset of the first data type. The first rule and the second rule can be pre-set by the user, or dynamically set according to the actual application scenario and requirements.

[0026] As an option of the embodiment of the present application, 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 state according to the system load value; A first rule is generated based on a collection frequency corresponding to a system load state.

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

[0028] Next, the preset acquisition frequency corresponding to different system load states can be queried in the database, and a suitable storage method can be selected based on the acquisition frequency to generate the first rule. For example, if the system is determined to be in a high load state, the corresponding acquisition frequency is 0.1 Hz, and the storage method can be but not limited to dual-master replication, master-slave replication, distributed file system, object storage, database cluster, etc. The first rule can be but not limited to the acquisition frequency and storage method.

[0029] 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.

[0030] Specifically, after the first data processing module receives the first rule, initial data can be collected according to the first rule, and 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, and the method can be but is not limited to the PCIE Switch bus addressing method.

[0031] Furthermore, after the first data processing module collects initial data according to the first rule, hot standby data in the initial data can be determined according to the second rule, and then the hot standby data can be sent to the second data processing module, wherein the hot standby data is the data in the initial data that needs to be backed up.

[0032] It can be understood that the screening function of the second rule realizes the on-demand data allocation and meets the requirement of not hot-backing up some data, thereby avoiding the occurrence of storage imbalance.

[0033] As another option of the embodiment of the present application, 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 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 initial data.

[0034] 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 also send a first heartbeat signal to the FPGA in the second data processing module, and then the heartbeat detection can be used to ensure that the communication between the master node and the slave node is normal, and the fault can be discovered and handled in time. If the master node does not send a heartbeat signal within a predetermined time, the slave node can assume that the master node has failed and trigger a failover mechanism. When the master node fails, the slave node can quickly and automatically take over the work of the master node, minimize the service interruption time, and ensure the continuity and availability of the service.

[0035] Then, when the second data processing module does not receive the first heartbeat signal within the preset time interval, it means that the master node may have a fault. The heartbeat network card in the first control module may send a second heartbeat signal to the heartbeat network card in the second control module to avoid erroneous judgment of master node failure due to network jitter or temporary interruption, thereby reducing the possibility of misjudgment.

[0036] Thereafter, when the second control module does not receive the second heartbeat signal within the preset time interval, it means that the master node fails and the slave node needs to complete data collection and storage. Therefore, the FPGA in the second data processing module can collect initial data.

[0037] It is worth noting that in the process of judging whether the first heartbeat signal and the second heartbeat signal are received, in addition to judging the first heartbeat signal first and then sending the second heartbeat signal to make a judgment, the first heartbeat signal and the second heartbeat signal can also be sent at the same time to judge the two signals at the same time. Only when both heartbeat signals are abnormal, the master node is judged to be faulty to reduce the risk of misjudgment.

[0038] As another option of the embodiment of the present application, after the second data processing module collects the initial data, the method further includes: 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 the 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.

[0039] Specifically, after the second data processing module collects the 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 means that both heartbeat links have returned to normal, and the failure 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 to complete. Since the slave node collected a part of the data during the failure of the master node, 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., the supplementary data) to the first data processing module, and the first data processing module continues to collect subsequent data to realize the switching of the data collection tasks of the master and slave nodes after the master node failure is recovered.

[0040] As another option of the embodiment of the present application, the recording storage device further includes a first storage module and a second storage module; After the first data processing module collects initial data 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, the state of the second storage module is obtained; 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 initial data.

[0041] Specifically, the recording storage device may also include a first storage module and a second storage module, and the first storage module and the second storage module may include, but are not limited to, NVMe SSD, NAND Flash SSD, etc., 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. After the first data processing module collects initial data according to the first rule, the hot standby coordination software in the first control module may also detect the storage state of the first storage module. If it is detected that the first storage module is in a fully loaded state, that is, the storage space of the master node has been fully used, and there is no remaining space to store subsequent data, then the hot standby coordination software in the second control module may detect the storage space of the slave node (that is, the second storage module). If it is detected that there is still storage space left in the slave node, the slave node may take over the master node to complete data collection and storage, that is, the FPGA in the second data processing module collects initial data and stores the initial data in the second storage module, thereby realizing the serial working mode of the master and slave nodes, and achieving the purpose of expanding the storage space.

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

[0043] Specifically, in the process where the second data processing module receives the hot standby data and the FPGA inside it stores the hot standby data in 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, and thus the data collection 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 the 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.

[0044] Furthermore, after the main 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 collaborative software in the second control module controls the FPGA in the second data processing module to stop receiving hot standby data and stop recording storage information, that is, the second storage information corresponding to the hot standby data, according to the stop storage command.

[0045] It is worth noting that in addition to stopping data collection and storage according to the command, it is also necessary to stop recording and storing information to avoid misjudging the data of the master and slave nodes as being out of sync due to failure to stop recording and storing information in time.

[0046] Thereafter, the second control module may obtain the stopped second storage record information for comparison with the first storage information to verify consistency during data transmission.

[0047] Step 104: When the second control module identifies that there is a difference between the first storage information and the second storage information, a synchronization command is sent to the second data processing module, and the second data processing module performs a data synchronization operation.

[0048] Specifically, after the second control module obtains the second storage information corresponding to the hot standby data, the first storage information and the second storage information may be compared to obtain a comparison result.

[0049] When it is identified that there is no difference in the comparison result, it means that the hot standby process is successfully completed and there is no abnormality in the data. The hot standby coordination software of the slave node can set itself to the state of completed data hot standby and report the state to the hot standby coordination software of the master node, that is, send a hot standby completion signal to the first control module. After receiving the hot standby completion signal from the slave node, the hot standby coordination software of the master node can set itself to the state of completed data hot standby, which means that the hot standby process is successfully completed, the data is normal, and no data synchronization is required.

[0050] At the same time, when a difference is identified in the comparison result, it means that the data in the hot standby process is abnormal, and a data synchronization operation is required to restore the hot standby data to normal. Therefore, the second control module can send a synchronization command to the second data processing module, and then the second data processing module can perform a data synchronization operation according to the synchronization command.

[0051] As another option of the embodiment of the present application, the second data processing module performs the data synchronization operation, including: 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 synchronization index information corresponding to the synchronization data to the second control module to achieve data sharing access.

[0052] Specifically, in the process of the second data processing module performing a data synchronization operation, the first data processing module can first determine the data that needs to be synchronized (such as missing data within a certain time period, or a certain type of data that is lost, etc.) based on the previous comparison results, and then send the synchronized data in the first storage module to the second data processing module, so that the second data processing module stores the synchronized data in the second storage module, so that the hot standby data is normal and error-free.

[0053] Then, the first control module can send the synchronization index information corresponding to the synchronization data (such as file name, file type, storage location, start time, file size, etc.) to the second control module, so that data sharing access can be achieved between the master node and the slave node (that is, accurately find the required data through the index information and read and write, etc.).

[0054] As another optional embodiment of the present application, when the first control module receives the stop storage command, after sending the first storage information corresponding to the initial data and the stop storage command to the second control module, the method further includes: When the first control module detects a power-on signal and the second control module is in a hot standby state, the second data processing module performs a data synchronization operation; 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.

[0055] Specifically, when the first control module receives a stop storage command, after sending 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, wherein the power-on signal is a signal generated when the device or system is restored to the power-on state after power failure.

[0056] When the first control module detects a power-on signal and when the second control module is in hot standby state, it means that the device or system is performing data hot standby at the time of power outage. In order to avoid abnormalities in the hot standby data due to power outage, it is necessary to perform data synchronization operations after powering on again to ensure that the hot standby data is correct. Therefore, the second data processing module can perform data synchronization operations at this time.

[0057] In addition, 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 when the power was cut off, so there is no need to perform data synchronization operations, and the first data processing module can continue to collect initial data normally.

[0058] See also Figure 2 , Figure 2 A schematic structural diagram of a dual-machine hot standby control device provided in an embodiment of the present application is shown.

[0059] 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: A first processing module 201, configured to send the first rule and the second rule to the first data processing module by the first control module; wherein the first rule at least includes the first data type and the acquisition frequency, and the second rule at least includes the second data type; The second processing module 202 is used for collecting initial data according to the first rule by the first data processing module, and sending hot standby data to the second data processing module according to the second rule; wherein the hot standby data is the data that needs to be backed up in the initial data; The third processing module 203 is used for sending 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 204 is configured to send a synchronization command to the second data processing module when the second control module identifies that there is a difference between the first storage information and the second storage information, and the second data processing module performs a data synchronization operation.

[0060] 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: The first processing module 201 is specifically used for: The first control module obtains the system load value and determines the system load state according to the system load value; A first rule is generated based on a collection frequency corresponding to a system load state.

[0061] In some possible embodiments, 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 method further includes: The second processing module 202 is specifically used for: 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 initial data.

[0062] In some possible embodiments, after the second data processing module collects the initial data, the method further includes: The second processing module 202 is specifically used for: 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 the 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.

[0063] In some possible embodiments, the record storage device further includes a first storage module and a second storage module; After the first data processing module collects initial data according to the first rule, the method further includes: The second processing module 202 is specifically used for: When the first control module detects that the first storage module is in a fully loaded state, the state of the second storage module is obtained; 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 initial data.

[0064] In some possible embodiments, the data synchronization operation is performed by the second data processing module, including: The fourth processing module 204 is specifically used for: 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 synchronization index information corresponding to the synchronization data to the second control module to achieve data sharing access.

[0065] In some possible embodiments, after the first control module receives the stop storage command, the first storage information corresponding to the initial data and the stop storage command are sent to the second control module, the method further includes: The fourth processing module 204 is specifically used for: When the first control module detects a power-on signal and the second control module is in a hot standby state, the second data processing module performs a data synchronization operation; 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.

[0066] See also Figure 3 , Figure 3 A structural schematic diagram of another dual-machine hot standby control device provided in an embodiment of the present application is shown.

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

[0068] The communication bus 302 may be used to realize the connection and communication among the above-mentioned components.

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

[0070] The network interface 304 may include, but is not limited to, a Bluetooth module, an NFC module, a Wi-Fi module, etc.

[0071] Among them, the processor 301 may include one or more processing cores. The processor 301 uses various interfaces and lines to connect the various parts of the entire dual-machine hot standby control device 300, and 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 calling data stored in the memory 305. Optionally, the processor 301 can be implemented in at least one hardware form of DSP, FPGA, and PLA. The processor 301 can integrate one or a combination of CPU, GPU, modem, etc. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 301, and it can be implemented separately through a chip.

[0072] The memory 305 may include a RAM or a ROM. Optionally, the memory 305 includes a non-transitory computer-readable medium. The memory 305 may be used to store instructions, programs, codes, 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 a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 305 may optionally be at least one storage device located away from the aforementioned processor 301. As Figure 3 As shown, the memory 305 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 program.

[0073] Specifically, the processor 301 may be used to call the dual-machine hot standby control application program stored in the memory 305, and specifically perform the following operations: The first control module sends the first rule and the second rule to the first data processing module; wherein the first rule at least includes the first data type and the collection frequency, and the second rule at least includes the second data type; 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; wherein the hot standby data is the data in the initial data that needs to be backed up; When the first control module receives the stop storage command, the first storage information corresponding to the initial data and the stop storage command are sent to the second control module, and the second control module acquires the second storage information corresponding to the hot standby data; When the second control module identifies that there is a difference between the first storage information and the second storage information, a synchronization command is sent to the second data processing module, and the second data processing module performs a data synchronization operation.

[0074] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the above method are implemented. The computer-readable storage medium may include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD, a CD-ROM, a micro drive, and a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic card or an optical card, a nanosystem (including a molecular memory IC), or any type of medium or device suitable for storing instructions and / or data.

[0075] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0076] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0077] In the several embodiments provided in the present application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

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

[0079] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0080] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, 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. The computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, disk or optical disk and other media that can store program codes.

[0081] A person skilled in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by entering a program to instruct related hardware, and the program may be stored in a computer-readable memory, which may include a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0082] The above are only exemplary embodiments of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure here, those skilled in the art will easily think of the implementation scheme of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field that are not recorded in the present disclosure. The description and examples are only regarded as exemplary, and the scope and spirit of the present disclosure are defined by the claims.

Claims

1. A dual-machine hot standby control method, characterized in that: The method is applied to a record storage device, the record storage device includes a first data processing module, a first control module, a second data processing module and a second control module, and 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 at least includes the first data type and the acquisition frequency, and the second rule at least includes the second data type; 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; wherein the hot standby data is data in the initial data that needs to be backed up; When the first control module receives the stop storage command, the first storage information corresponding to the initial data and the stop storage command are sent to the second control module, and the second control module acquires the second storage information corresponding to the hot standby data; When the second control module recognizes that there is a difference between the first storage information and the second storage information, a synchronization command is sent to the second data processing module, and the second data processing module performs a 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 acquires a system load value, and determines a system load state according to the system load value; A first rule is generated based on a collection 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 the 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 second data processing module collects the initial data, the method further includes: 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 data collected by the second data processing module.

5. The method according to claim 1, characterized in that The recording storage device also includes a first storage module and a second storage module; After the first data processing module collects initial data 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, the state of the second storage module is acquired; 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 performing of the data synchronization operation 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 synchronization index information corresponding to the synchronization data to the second control module to achieve data sharing 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 a hot standby state, 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 device is applied to a record storage device, the record storage device includes a first data processing module, a first control module, a second data processing module and a second control module, and the device includes: A first processing module, configured to send the first rule and the second rule to the first data processing module by the first control module; wherein the first rule at least includes a first data type and a collection frequency, and the second rule at least includes a second data type; A second processing module, configured to collect initial data according to the first rule by the first data processing module, and send hot standby data to the second data processing module according to the second rule; wherein the hot standby data is data in the initial data that needs to be backed up; a third processing module, configured 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 acquires 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 recognizes that there is a difference between the first storage information and the second storage information, and the second data processing module performs a data synchronization operation.

9. A dual-machine hot standby control device, characterized in that: including a processor and a 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 by reading the executable program code stored in the memory, so as to execute the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a computer or a processor, the computer or the processor executes the steps of the method according to any one of claims 1 to 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

  • Data acquisition system and method, equipment and storage medium

    CN117951227A

  • Data management method and device based on collection, storage and calculation integrated architecture

    CN118035165A

  • Data processing method and apparatus, and terminal device

    WO2018081928A1