A data differential identification coding synchronization method, device, equipment and medium

Through bitmap mapping and compression technology, the problem of inefficient data synchronization in dual master control systems is solved, fast and efficient data backup is achieved, and system performance is improved.

CN113742097BActive Publication Date: 2025-03-28FIBERHOME TELECOMMUNICATION TECHNOLOGIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110881446.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-02
Publication Date
2025-03-28
Estimated Expiration
2041-08-02

AI Technical Summary

Technical Problem

In the existing dual-main control systems, due to large data volume, frequent synchronization and long blocking waiting time, the execution efficiency of the main control disk software system is inefficient, especially in scenarios such as NSR, the performance of the dual-main control system has been greatly reduced.

Method used

The bitmap is obtained by mapping the data structure of the main control block, the bitmap is set when updating the main control block, and the bitmap is compressed and sent to the backup control disk. The backup control disk decodes the difference update data and updates the backup control block.

Benefits of technology

It realizes fast and efficient data backup, improves the performance and efficiency of the dual master control system, and reduces the waiting time of the master control disk.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113742097B_ABST
    Figure CN113742097B_ABST
Patent Text Reader

Abstract

The present application discloses a data differential identification coding synchronization method, device, equipment and readable storage medium, which maps the data structure of the main control block to obtain a bitmap; when the main control block is updated, the bitmap is set corresponding to the data structure change; the bitmap is compressed to obtain compressed data, and sent to the standby control disk, the compressed data is used for differential update data obtained by decoding the standby control disk, and the standby control block is updated. The present invention can solve the problem that the existing main control disk software system is inefficient due to large data volume, frequent synchronization, and long blocking waiting time, especially in scenarios such as NSR, where a large amount of routing learning or neighbor oscillation occurs, which will cause the performance of the dual main control system to drop significantly. It can not only address the frequent transmission of large amounts of data, but also realize a fast and efficient backup dual main control system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of hot backup, and in particular to a data differential identification coding synchronization method, device, equipment and medium. Background Art

[0002] Telecom-level or core enterprise network equipment has relatively high requirements for system reliability. A common reliability solution for such equipment is to use a dual master control system to achieve 1+1 backup.

[0003] Specifically, one main control disk is in working state; the other backup control disk is in standby state. Under normal circumstances, the data of the main control disk needs to be synchronized to the backup control disk in real time. When the main control disk is reset due to unpredictable reasons, the backup control disk can instantly take over the work of the main control disk, thereby shortening the service interruption time caused by the failure of the main control board and improving the reliability of the equipment.

[0004] However, in the existing dual-master control system, the master control disk needs to frequently synchronize a large amount of data to the standby control disk, and its data transmission generally uses synchronous RPC to synchronize data. Due to the large amount of data, frequent synchronization, and long blocking waiting time, the execution efficiency of the master control disk software system will be low, especially in scenarios such as NSR where a large amount of route learning or neighbor oscillation occurs, which will cause the performance of the dual-master control system to drop significantly.

[0005] Therefore, there is an urgent need for a dual-master control system that can achieve fast and efficient backup for frequent transmission of large amounts of data. Summary of the invention

[0006] The present application provides a data differentiation identification coding synchronization method, device, equipment and medium to solve the problem that the existing main control disk software system has low execution efficiency due to large data volume, frequent synchronization and long blocking waiting time, especially in scenarios such as NSR, where a large amount of routing learning or neighbor oscillation occurs, which will cause the performance of the dual-master control system to be greatly reduced. It can not only realize a fast and efficient backup dual-master control system for the frequent transmission of large amounts of data.

[0007] To achieve the above object, an embodiment of the present invention provides a data differential identification code synchronization method, which is applied to a main control disk and includes the following steps:

[0008] Map the data structure of the main control block to obtain a bitmap;

[0009] When the main control block is updated, the bitmap is set corresponding to the data structure change;

[0010] The bitmap is compressed to obtain compressed data, and the compressed data is sent to the standby control disk. The standby control disk decodes the compressed data to obtain differential update data, and updates the standby control block.

[0011] As a preferred embodiment, compressing the bitmap to obtain compressed data includes performing a first compression and a second compression on the bitmap, wherein the first compression includes:

[0012] Eliminate m consecutive 0s or 1s in the bitmap and then concatenate the remaining bits, and record the eliminated positions and numbers;

[0013] And the value of m is configured such that the bit to be eliminated is greater than the bit occupied by the record elimination position and the number.

[0014] As a preferred embodiment, the second compression comprises:

[0015] Taking n bits as units, count the value and occurrence times of each unit in the bitmap;

[0016] Extract the unit whose occurrence times are greater than a preset value, record the extracted position and the corresponding unit, and splice the remaining positions to obtain compressed data, wherein m and n are both preset natural numbers.

[0017] As a preferred embodiment, before compressing the bitmap to obtain compressed data, the method further includes:

[0018] The bitmaps corresponding to the multiple updated main control blocks are merged to obtain a merged bitmap, and the main control blocks included in the merged bitmap are recorded.

[0019] As a preferred embodiment, compressing the bitmap to obtain compressed data includes:

[0020] The combined bitmap is compressed to obtain compressed data, and the compressed data is decoded by the standby control disk to obtain differential update data of multiple corresponding standby control cards, and the corresponding multiple standby control blocks are updated.

[0021] As a preferred implementation scheme, the master control disk creates at least one master control block and registers the master control block to a policy backup control chain, and the policy backup control chain triggers the backup of the updated master control block.

[0022] As a preferred implementation, the policy backup control chain triggers the backup after the main control block is updated, including:

[0023] After the main control disk updates the main control block, the policy backup control chain sends an update request and compressed data to the standby control disk through the hot backup RPC, and configures the backup control chain to enter an asynchronous waiting state;

[0024] After the standby control disk returns the update success information to the backup control chain through the hot backup RPC, the asynchronous waiting state of the backup control chain ends.

[0025] To achieve the above purpose, the embodiment of the present invention further proposes a data differential identification coding synchronization device, which includes:

[0026] A bitmap mapping module is used to map the data structure of the main control block to obtain a bitmap;

[0027] The setting module is used to set the bitmap corresponding to the data structure change when the main control block is updated;

[0028] The compression module is used to compress the bitmap to obtain compressed data and send it to the standby control disk. The compressed data is decoded by the standby control disk to obtain differential update data and update the standby control block.

[0029] To achieve the above objectives, an embodiment of the present invention further proposes a computer device, which includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the data differentiation identification coding synchronization method described in the above implementation scheme are implemented.

[0030] To achieve the above objectives, an embodiment of the present invention further proposes a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the data differentiation identification coding synchronization method described in the above implementation scheme are implemented.

[0031] The present application discloses a data differential identification coding synchronization method, device, equipment and readable storage medium, which records the bitmap of the corresponding control block data, and records the data changes at each update through the bitmap, and then transmits the compressed bitmap to the standby control disk. Finally, the standby control disk decompresses and updates the standby control block to complete the data update. This kind of update only carries the changed information, and no longer carries the full snapshot information, which can greatly improve the efficiency of data synchronization update. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0033] Figure 1 A flowchart of the steps of the data differential identification coding synchronization method provided in the embodiment of the present application;

[0034] Figure 2 A bitmap corresponding to the main control block provided in an embodiment of the present application;

[0035] Figure 3 for Figure 2 Schematic diagram of a part of the area after the bitmap structure in is set;

[0036] Figure 4 A schematic diagram of the first compression provided by an embodiment of the present application;

[0037] Figure 5 A schematic diagram of merging bitmaps corresponding to multiple main control blocks provided in an embodiment of the present application;

[0038] Figure 6 A flowchart of the steps of decoding and updating compressed data by a standby control disk provided in an embodiment of the present application;

[0039] Figure 7 A flowchart of the steps of performing master-slave update on the master control block and the standby control block provided in an embodiment of the present application;

[0040] Figure 8 A flowchart of the steps of the main control block and the standby control block in the embodiment of the present application to generate update data;

[0041] Fig. 9 A flow chart of the steps for data encoding synchronization between a main control block and a standby control block provided in an embodiment of the present application.

[0042] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0044] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0045] The embodiment of the present application provides a data differential identification code synchronization method, device, computer equipment and computer readable storage medium. The data differential identification code synchronization method can be applied to a computer equipment, which can be an electronic device such as a server.

[0046] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0047] See also Figure 1 , Figure 1 It is a schematic flow chart of a data differentiation identification coding synchronization method provided by an embodiment of the present application.

[0048] like Figure 1 As shown, this embodiment provides a data differentiation identification coding synchronization method, which is applied to a main control disk, and the method includes the following steps:

[0049] Step S101: Map the data structure of the main control block to obtain a bitmap;

[0050] The master control disk corresponds to the data structure of the master control block and maps the bitmap so that changes in the master control block can be monitored when they occur.

[0051] Exemplary, such as Figure 2 As shown, the master control disk confirms the master control block that needs to be backed up, and generates a mask bitmap structure corresponding to the master control block that needs to be backed up, and its mapping byte is bit.

[0052] Step S102: when the main control block is updated, the bitmap is set corresponding to the data structure change;

[0053] When the main control block is updated, the data in the bitmap is set corresponding to the change of the main control disk, and the setting indicates that the corresponding position of the main control block has changed, that is, the change of data in the main control block is directly monitored through the bitmap.

[0054] Exemplary, such as Figure 3 As shown, when the data in the original main control block changes, such as modification, replacement, deletion, etc., it is compared with the data in the original main control block to obtain the changed data, and the bit position of the data in the bitmap corresponding to the main control block to which it belongs is set to indicate that it has changed.

[0055] Step S103: compress the bitmap to obtain compressed data, and send it to the standby control disk. The compressed data is decoded by the standby control disk to obtain differential update data, and the standby control block is updated.

[0056] If the entire bitmap is directly sent to the standby control disk, the data volume is still huge. The present invention chooses to compress the bitmap and send it to the standby control disk, which decodes it and then updates the controlled block corresponding to the main control block.

[0057] The existing backup is a real-time synchronous backup, and the backup relationship between the main control block and the backup control block is a full backup. If the backup adopts the original data copy method, the transmission and backup efficiency is low when the number of control blocks is large. The solution of the embodiment of the present invention uses the method of collecting data change bitmaps to record change points, and only transmits change data with a small amount of data. At the same time, the present invention further uses a specific bitmap encoding algorithm to reduce data transmission, further realizing accurate positioning of change fields and efficient backup.

[0058] In one embodiment, compressing a bitmap to obtain compressed data includes performing a first compression and a second compression on the bitmap, wherein the first compression includes:

[0059] Eliminate m consecutive 0s or 1s in the bitmap and then concatenate the remaining bits, and record the eliminated positions and numbers;

[0060] And the value of m is configured such that the bit to be eliminated is greater than the bit occupied by the record elimination position and the number.

[0061] After the main control block is updated, since the data that changes are options and parameters, etc., the changed data structure is generally continuous and block-shaped. Therefore, after the corresponding bitmap is set, it generally presents continuous 0s and 1s. Therefore, the first compression selection will eliminate and record continuous 0s and 1s, which can achieve a higher compression rate.

[0062] Exemplary, such as Figure 4 As shown, polling starts from the first bit in the bitmap area. When continuous 0-valued bits or 1-valued bits are found, a merge decision is made. If the decision meets the preset conditions, the bits are eliminated and the eliminated positions and numbers are recorded.

[0063] Optionally, the preset condition may be:

[0064] Assume the number of bits extracted is usCbBitCutoffNmu, the maximum horizontal coordinate of the CB bitmap area is usCbBitXSize, and the maximum vertical coordinate of the CB bitmap area is usCbBitYSize, then it needs to satisfy

[0065] The merge and elimination operation is performed only when the number of bits occupied by usCbBitCutoffNmu>{usCbBitXSize+usCbBitYSize+usCbBitCutoffNmu};

[0066] The above conditions are used to determine the benefit of merging zero values. If the space occupied by the information to be recorded and restored after merging is greater than the total number of bits to be merged, it is equivalent to spending more storage space, and there is no need to merge.

[0067] For example, a matrix with a width of 32 bits and a maximum of 8 rows is used, in which two consecutive 0 bits with the starting point coordinates (X=30, Y=7) need to be merged.

[0068] usCbBitXSize is equal to 32; usCbBitYSize is equal to 8;

[0069] The number of consecutive 0 bits usCbBitCutoffNmu is equal to 2; then the number of bits required to store the complete information is: {32+8+2}_bits, which is equal to 6 bits;

[0070] The result calculated by the above formula is: 2bit<6bit, so there is no need to merge 0bit;

[0071] In one embodiment, the second compression includes:

[0072] Taking n bits as units, count the value and occurrence times of each unit in the bitmap;

[0073] Extract the units whose occurrence times are greater than a preset value, record the extracted positions and corresponding units, and concatenate the remaining positions to obtain compressed data, where n is a preset natural number.

[0074] Exemplarily, after the first compression is completed, there will be multiple combinations of 1 and 0 in the bitmap. By counting them with a certain number of digits, extracting the elements with more occurrences and recording them, the compression rate of the bitmap can be further improved. For example, taking 8 bits as a unit, it is found that 10010111 appears at least one thousand times, then all "10010111" in the bitmap after the first compression are extracted, and the extraction positions are recorded to achieve bitmap compression.

[0075] For example, for the bitmap after the first compression (after eliminating 0, 1 and concatenating and merging the remaining data), the maximum sequence number splitting calculation and filling are performed:

[0076] Calculate the number of repeated occurrences of data in the merged bit area: Arrange the value combinations and the number of occurrences in descending order, and fill the data in the original bit area according to the sequence number of each row value in the range table:

[0077] The table data is constructed and stored in the new bitmap area in sequence, and the bit width corresponding to the maximum occurrence sequence number is calculated.

[0078] Assume the maximum number of occurrences is usCbBitMaxNmu, the bit width of the maximum occurrence sequence number corresponding to the required storage is usCbBitMaxSn, the first sequence number is 0, the remaining original sequence numbers are usCbBitSerieal_x, and the sequence number filled in after the actual conversion is usCbBitSerieal_x2.

[0079] Next, the numerical sequence number that appears the most times is marked with only 0, occupying one bit;

[0080] The savings are: usCbBitMaxNmu*(usCbBitMaxSn-1)

[0081] All other values ​​are marked with non-zero serial numbers. It is necessary to add a bit as the first bit to the serial numbers of all other values, and this bit is fixed with '1'.

[0082] Let the sum of the numbers except the maximum number of occurrences be usCbBitTotolSum,

[0083] The number of bits added for this purpose is: usCbBitTotolSum

[0084] Analyze the relevant data. If the following conditions are met, split and fill them. Otherwise, fill them according to the original logic:

[0085] usCbBitMaxNmu*(usCbBitMaxSn-1)>usCbBitTotolSum

[0086] If the filling condition is met, except for the maximum value, the remaining values ​​are actually converted and filled in with the following serial numbers:

[0087] usCbBitSeriesal_2=(1< <usCbBitMaxSn)|usCbBitSerieal_x。

[0088] After the above compression, compressed data is obtained.

[0089] For example, if we take each 8 bits as a value and count the number of occurrences, we get the following table:

[0090] Serial number Numeric Occurrence 0 48 30 1 32 2 2 56 124 3 126 26

[0091] After the above steps, it is found that the values ​​​​"56" and "126" appear more times and meet the condition usCbBitMaxNmu*(usCbBitMaxSn-1)>usCbBitTotolSum, so they are split.

[0092] In one embodiment, if Figure 5As shown, before compressing the bitmap to obtain compressed data, the following steps are also included:

[0093] The bitmaps corresponding to the multiple updated main control blocks are merged to obtain a merged bitmap, and the main control blocks included in the merged bitmap are recorded.

[0094] When the master control disk updates multiple master control blocks, merging and compressing multiple bitmaps at one time can improve the data compression rate and enhance the backup efficiency.

[0095] In another example, compressing the bitmap to obtain compressed data includes:

[0096] The combined bitmap is compressed to obtain compressed data, and the compressed data is decoded by the standby control disk to obtain differential update data of multiple corresponding standby control cards, and the corresponding multiple standby control blocks are updated.

[0097] Exemplary, such as Figure 6 As shown in the figure, the standby control panel decodes the compressed data and updates it, including the following steps:

[0098] T101, bitmap table header corresponding to data position

[0099] According to the data length information contained in the carried bitmap description information header, the table is looked up to complete the data and the data is restored for the first time;

[0100] T102, restore data by filling with 0 values ​​from high address to low address;

[0101] Since the bit elimination of the same value is carried out from the low address to the high address, the filling position records the relative position after elimination, so when restoring, the corresponding length of bits and shifts are filled from the high address, and the coordinates of the original record will not be destroyed; according to this principle, the data is restored twice;

[0102] T103, complete the location and copying of backup data;

[0103] According to the lookup information contained in the BIT area description header, the corresponding original data is searched by sequence number, and the original data is filled back into the corresponding position in sequence to complete the data recovery of the BIT description area;

[0104] Find the backup control block according to the backup control block addressing header, find the corresponding byte and length that need to be assigned according to the set 1 mark in the BIT description area, obtain the data in the changed data area in sequence, and fill it into the local control block of the backup main control disk to complete the entire data backup and recovery process.

[0105] In one embodiment, the master control disk creates at least one master control block and registers the master control block to a policy backup control chain, and the policy backup control chain triggers the backup of the updated master control block.

[0106] Furthermore, the policy backup control chain triggers the backup of the updated master control block, including:

[0107] After the main control disk updates the main control block, the policy backup control chain sends an update request and compressed data to the standby control disk through the hot backup RPC, and configures the backup control chain to enter an asynchronous waiting state;

[0108] After the standby control disk returns the update success information to the backup control chain through the hot backup RPC, the asynchronous waiting state of the backup control chain ends.

[0109] Triggered by the backup control chain, and waiting asynchronously instead of the main control disk, it can effectively speed up the master-slave backup. When the main control disk completes the update, the backup control chain performs the corresponding asynchronous waiting, waiting for the backup control disk to return the success command, saving the waiting time of the main control disk. At the same time, the active triggering mode can ensure the effectiveness, security and accuracy of the backup.

[0110] For example, if Figure 7 As shown, the present invention comprises the following steps:

[0111] U101: The master control disk updates the required master control block information, uses the preset algorithm to record the change information of the control block data, registers the control block to the policy backup control chain, and the master control disk returns success

[0112] After the data is updated, an update mark is added to the description information of the main control block, the difference position is calculated and the CB bitmap is set.

[0113] U102: When the backup control chain triggers data backup, a new encoding method is used to encode the changed information;

[0114] The backup control chain triggers the polling control block, performs structured calculations, merges the mask bitmap data corresponding to all control blocks that need to be updated, extracts and processes the control block bitmap area data, and performs maximum sequence number split calculations and filling;

[0115] U103: After completing data encoding, the master disk carries the encoded data through the hot backup RPC channel and requests the backup master disk to update the control block, and the backup control chain enters the asynchronous waiting state;

[0116] U104: The standby control disk decodes and recovers the data;

[0117] U105: Based on the recovered difference description information, the standby control block finds the standby control block corresponding to the primary control block, copies and refreshes the difference data, and returns the RPC;

[0118] U106: The master control disk completes the refresh process of the control block, ends the asynchronous waiting of the backup control chain, and responds to the next backup.

[0119] Further, such as Figure 8 As shown, the present invention also includes detecting the behavior of first hanging into the backup control chain, and after the detection, performing the first compression, the second compression, or the direct update operation respectively.

[0120] Further, such as Fig. 9 As shown, the present invention increases the update price for the control block that triggers the backup control chain and updates it.

[0121] The embodiment of the present application also provides a data differential identification coding synchronization device, characterized in that it includes:

[0122] A bitmap mapping module is used to map the data structure of the main control block to obtain a bitmap;

[0123] The setting module is used to set the bitmap corresponding to the data structure change when the main control block is updated;

[0124] The compression module is used to compress the bitmap to obtain compressed data and send it to the standby control disk. The compressed data is decoded by the standby control disk to obtain differential update data and update the standby control block.

[0125] An embodiment of the present application also provides a computer device, wherein a computer program is stored on a computer-readable storage medium, wherein the computer program includes program instructions, and the method implemented when the program instructions are executed can refer to the various embodiments of the data differentiation identification coding synchronization method of the present application.

[0126] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the various embodiments of the data differentiation identification coding synchronization method of the present application.

[0127] Among them, the computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0128] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0129] The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0130] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0131] The serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific implementation mode of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A data differential identification coding synchronization method, characterized in that: It is applied to the main control panel, including: Map the data structure of the main control block to obtain a bitmap; When the main control block is updated, the bitmap is set corresponding to the data structure change; Compressing the bitmap to obtain compressed data, and sending it to the standby control disk, the compressed data is decoded by the standby control disk to obtain differential update data, and the standby control block is updated; The step of compressing the bitmap to obtain compressed data includes performing a first compression and a second compression on the bitmap, wherein the first compression includes: Eliminate m consecutive 0s or 1s in the bitmap and then concatenate the remaining bits, and record the eliminated positions and numbers; And the value of m is configured such that the bit number to be eliminated is greater than the bit number occupied by the position to be eliminated and the number; The second compression includes: Taking n bits as units, count the value and occurrence times of each unit in the bitmap; Extract the unit whose number of occurrences is greater than a preset value, record the extracted position and the corresponding unit, and concatenate the remaining positions to obtain compressed data, where m and n are both preset natural numbers; Before compressing the bitmap to obtain compressed data, the method further includes: Merge the bitmaps corresponding to the multiple updated main control blocks to obtain a merged bitmap, and record the main control blocks included in the merged bitmap; The step of compressing the bitmap to obtain compressed data includes: The combined bitmap is compressed to obtain compressed data, and the compressed data is decoded by the standby control disk to obtain differential update data of multiple corresponding standby control cards, and the corresponding multiple standby control blocks are updated.

2. The data differential identification coding synchronization method according to claim 1, characterized in that: The master control disk creates at least one master control block and registers the master control block to a policy backup control chain, and the policy backup control chain triggers the backup of the updated master control block.

3. The data differential identification coding synchronization method according to claim 2, characterized in that: The policy backup control chain triggers the backup of the updated main control block, including: After the main control disk updates the main control block, the policy backup control chain sends an update request and compressed data to the standby control disk through the hot backup RPC, and configures the backup control chain to enter an asynchronous waiting state; After the standby control disk returns the update success information to the backup control chain through the hot backup RPC, the asynchronous waiting state of the backup control chain ends.

4. A data differential identification coding synchronization device, characterized in that: It includes: A bitmap mapping module is used to map the data structure of the main control block to obtain a bitmap; The setting module is used to set the bitmap corresponding to the data structure change when the main control block is updated; A compression module, used to compress the bitmap to obtain compressed data, and send it to the standby control disk, the compressed data is decoded by the standby control disk to obtain differential update data, and update the standby control block; The step of compressing the bitmap to obtain compressed data includes performing a first compression and a second compression on the bitmap, wherein the first compression includes: Eliminate m consecutive 0s or 1s in the bitmap and then concatenate the remaining bits, and record the eliminated positions and numbers; And the value of m is configured such that the bit number to be eliminated is greater than the bit number occupied by the position to be eliminated and the number; The second compression includes: Taking n bits as units, count the value and occurrence times of each unit in the bitmap; Extract the unit whose number of occurrences is greater than a preset value, record the extracted position and the corresponding unit, and concatenate the remaining positions to obtain compressed data, where m and n are both preset natural numbers; Before compressing the bitmap to obtain compressed data, the method further includes: Merge the bitmaps corresponding to the multiple updated main control blocks to obtain a merged bitmap, and record the main control blocks included in the merged bitmap; The step of compressing the bitmap to obtain compressed data includes: The combined bitmap is compressed to obtain compressed data, and the compressed data is decoded by the standby control disk to obtain differential update data of multiple corresponding standby control cards, and the corresponding multiple standby control blocks are updated.

5. A computer device, characterized in that: The computer device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the data differentiation identification coding synchronization method as described in any one of claims 1 to 3 are implemented.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the data differentiation identification coding synchronization method as described in any one of claims 1 to 3 are implemented.

Citation Information

Patent Citations

  • Bitmap compression and decompression method in RLC data retransmission system

    CN103944690A

  • Data compression apparatus and data compression program

    JP2005260408A