Data synchronization method and device for non-relational database

By compressing and filtering the log information of the HBase database twice and transmitting the target log information, the problem of low data synchronization efficiency in the existing technology is solved, efficient data synchronization is achieved, and network overhead and synchronization time costs are reduced.

CN118535641APending Publication Date: 2024-08-23CHINA TELECOM BESTPAY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410379967.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-29
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

The data synchronization efficiency between HBase databases in the existing technology is low, resulting in huge network overhead and low synchronization efficiency. In particular, the full data replication and log continuous replication methods have problems with duplicate data and log backlog.

Method used

By collecting log information from the source database, performing the first and second compressions, the target log information is obtained, and transferred to the destination database to achieve data synchronization. Specific steps include sending playback instructions to the source database for virtual playback, merging the log information of the same key-value pair, obtaining the update time of multiple initial log information, filtering out the log information of the updated key-value pair, and updating the log information within the previous synchronization cycle. Compare and filter out the log information to be deleted, and finally package and transmit the target log information.

Benefits of technology

By secondary compression of log information, data to be synchronized is reduced, data synchronization efficiency is improved, network overhead and synchronization time costs are reduced, and synchronization performance between HBase clusters is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535641A
    Figure CN118535641A
Patent Text Reader

Abstract

The invention discloses a data synchronization method and device for a non-relational database. The method comprises the following steps: in response to a data synchronization instruction, acquiring first log information from a source end database; performing first compression on update data belonging to the lower value of the same key value pair in the first log information to obtain second log information; compressing the second log information for the second time to obtain target log information; and transmitting the target log information to a destination end database. The problem of low data synchronization efficiency in related technologies is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of database technology, and in particular to a data synchronization method and device for a non-relational database. Background Art

[0002] HBase is a columnar, open source, distributed relational database that can be used to read and write large amounts of data in real time. In many scenarios such as disaster recovery and multi-active, synchronization between multiple HBase databases is required. In related technologies, the main solutions for data synchronization between HBase databases are: full data replication-based synchronization, log replication-based synchronization, and incremental logs. However, these methods all have shortcomings. For example, full data replication generates a large amount of duplicate data, occupying storage and network resources; continuous log replication will cause log backlog problems, and the backup cluster has poor log replay performance. In particular, these technical solutions have a common problem: regardless of whether the data is updated (the new value is different from the old value), synchronization is required, although sometimes data is copied and sometimes logs are copied. This causes huge network overhead and low synchronization efficiency.

[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0004] The embodiments of the present application provide a method and device for synchronizing data in a non-relational database, so as to at least solve the problem of low data synchronization efficiency in the related art.

[0005] According to one aspect of an embodiment of the present application, a data synchronization method for a non-relational database is provided, including: in response to a data synchronization instruction, collecting first log information from a source database; performing a first compression on update data belonging to a same key-value pair in the first log information to obtain second log information; performing a second compression on the second log information to obtain target log information; and transmitting the target log information to a destination database.

[0006] Optionally, the updated data belonging to the same key-value pair in the first log information is compressed for the first time to obtain the second log information, including: sending a play instruction to the source database, the play instruction is used to instruct the source database to virtually play the first log information; during the virtual playback of the first log information, the log information belonging to the same key-value pair in the first log information is merged to obtain the second log information.

[0007] Optionally, the log information belonging to the same key-value pair in the first log information is merged to obtain the second log information, including: determining the log information belonging to the same key-value pair as the initial log information; obtaining the update time of multiple initial log information, and determining the initial log information with the latest update time of multiple initial log information as the second log information.

[0008] Optionally, the second log information is compressed for a second time to obtain target log information, including: obtaining log information in a previous synchronization cycle, comparing the log information in the previous synchronization cycle with the second log information one by one, and filtering out the target log information, wherein the target log information is the log information that updates the value of the key-value pair.

[0009] Optionally, the log information in the previous synchronization cycle is compared with the second log information one by one to filter out the target log information, including: obtaining the target key corresponding to the second log information, and obtaining the operation information corresponding to the target key from the second log information; obtaining the target value corresponding to the target key from the operation information; obtaining the value of the target key in the previous synchronization cycle from the log information in the previous synchronization cycle; when the target value is equal to the value of the target key in the previous synchronization cycle, determining that the log information corresponding to the target value is the log information to be deleted; deleting the log information to be deleted from the second log information to obtain the target log information.

[0010] Optionally, transmitting the target log information to a destination database includes: acquiring a storage path of the target log information; extracting the target log information according to the storage path, and packaging the target log information and sending it to the destination database.

[0011] Optionally, after transmitting the target log information to the destination database, the method further includes: sending a playback instruction to the destination database, wherein the playback instruction is used to instruct the destination database to play back the target log information to complete synchronization of the target log information.

[0012] According to another aspect of an embodiment of the present application, a data synchronization device for a non-relational database is also provided, including: an acquisition module, used to collect first log information from a source database in response to a data synchronization instruction; a first compression module, used to perform a first compression on the updated data belonging to the same key-value pair in the first log information to obtain second log information; a second compression module, used to perform a second compression on the second log information to obtain target log information; and a transmission module, used to transmit the target log information to a destination database.

[0013] According to another aspect of the embodiment of the present application, a computer device is also provided, including: a memory for storing program instructions; a processor, connected to the memory, for executing the following program instructions: in response to a data synchronization instruction, collecting first log information from a source database; performing a first compression on updated data belonging to the same key-value pair in the first log information to obtain second log information; performing a second compression on the second log information to obtain target log information; and transmitting the target log information to a destination database.

[0014] According to another aspect of an embodiment of the present application, a non-volatile storage medium is provided, the non-volatile storage medium includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the above-mentioned non-relational database data synchronization method by running the computer program.

[0015] According to another aspect of the embodiments of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the data synchronization method of the non-relational database is implemented.

[0016] In an embodiment of the present application, in response to a data synchronization instruction, first log information is collected from a source database; updated data belonging to the same key-value pair in the first log information is compressed for a first time to obtain second log information; the second log information is compressed for a second time to obtain target log information; and the target log information is transmitted to a destination database. By performing a secondary compression on the log information, the purpose of reducing the data to be synchronized is achieved, thereby achieving the technical effect of improving data synchronization efficiency, and further solving the problem of low data synchronization efficiency in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0018] Figure 1 It is a hardware structure block diagram of a computer terminal for implementing a data synchronization method for a non-relational database according to an embodiment of the present application;

[0019] Figure 2 is a flow chart of a data synchronization method for a non-relational database according to an embodiment of the present application;

[0020] Figure 3 is a flow chart of another method for synchronizing data in a non-relational database according to an embodiment of the present application;

[0021] Figure 4It is a structural diagram of a data synchronization device for a non-relational database according to an embodiment of the present application. DETAILED DESCRIPTION

[0022] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution 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. Obviously, the described embodiments are only 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 should fall within the scope of protection of the present application.

[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0024] The data synchronization method embodiment of the non-relational database provided in the embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 The hardware structure block diagram of a computer terminal for implementing a data synchronization method for a non-relational database is shown. Figure 1 As shown, the computer terminal 10 may include one or more (102a, 102b, ..., 102n are used to illustrate) processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions. In addition, it may also include: a display, a keyboard, a cursor control device, an input / output interface (I / O interface), a universal serial bus (USB) port (which can be used as one of the ports of the I / O interface), a network interface, and a BUS bus. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0025] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10. As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0026] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the data synchronization method of the non-relational database in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the data synchronization method of the non-relational database described above is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0027] The transmission module 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission module 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission module 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0028] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 .

[0029] It should be noted that, in some optional embodiments, the above Figure 1 The computer device shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of hardware elements and software elements. It should be noted that Figure 1 This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the computer device described above.

[0030] In the above-mentioned operating environment, an embodiment of the present application provides an embodiment of a data synchronization method for a non-relational database. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0031] Figure 2 is a flow chart of a data synchronization method for a non-relational database according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:

[0032] Step S202, in response to the data synchronization instruction, collecting first log information from the source database;

[0033] In the above step S202, the first log information includes: an operation log of the table, for example: an update log of the key value.

[0034] Step S204, compressing the updated data belonging to the same key-value pair in the first log information for the first time to obtain second log information;

[0035] In the above step S204, the operation contents in the log files may be analyzed one by one, and the operation logs for the same key may be merged.

[0036] Step S206, compressing the second log information for the second time to obtain target log information;

[0037] Step S208: transmitting the target log information to the destination database.

[0038] Through the data synchronization method of the non-relational database in the above steps S202 to S208, in response to the data synchronization instruction, the first log information is collected from the source database; the updated data belonging to the same key-value pair in the first log information is compressed for the first time to obtain the second log information; the second log information is compressed for the second time to obtain the target log information; the target log information is transmitted to the destination database. By performing secondary compression on the log information, the purpose of reducing the data to be synchronized is achieved, thereby achieving the technical effect of improving the data synchronization efficiency, and further solving the problem of low data synchronization efficiency in the related technology. The following is a detailed description.

[0039] In some embodiments of the present application, the updated data belonging to the same key-value pair in the first log information is compressed for the first time, and the specific process of obtaining the second log information is as follows: a play instruction is sent to the source database, and the play instruction is used to instruct the source database to virtually play the first log information; during the virtual playback of the first log information, the log information belonging to the same key-value pair in the first log information is merged to obtain the second log information.

[0040] Among them, the log information belonging to the same key-value pair in the first log information is merged to obtain the second log information as follows: the log information belonging to the same key-value pair is determined as the initial log information; the update time of multiple initial log information is obtained, and the initial log information with the last update time of multiple initial log information is determined as the second log information.

[0041] For example, the operations of a certain key are: 1. Update value to 10; 2. Update value to 20; 3. Update value to 30. Only the third corresponding log information needs to be retained, which is the second log information.

[0042] In some embodiments of the present application, the second log information is compressed for a second time, and the process of obtaining the target log information is as follows: obtain the log information in the previous synchronization cycle, compare the log information in the previous synchronization cycle with the second log information one by one, and filter out the target log information, where the target log information is the log information that updates the value in the key-value pair.

[0043] The specific comparison process is as follows: obtain the target key corresponding to the second log information, and obtain the operation information corresponding to the target key from the second log information; obtain the target value corresponding to the target key from the operation information; obtain the value of the target key in the previous synchronization cycle from the log information in the previous synchronization cycle; when the target value is equal to the value of the target key in the previous synchronization cycle, determine that the log information corresponding to the target value is the log information to be deleted; delete the log information to be deleted from the second log information to obtain the target log information.

[0044] It can be understood that the target value corresponding to the target key is the value of the target key of the current period.

[0045] After obtaining the target log, the storage path of the target log information is obtained; the target log information is extracted according to the storage path, and the target log information is packaged and sent to the destination database.

[0046] After the target log information is transmitted to the destination database, a playback instruction is sent to the destination database, where the playback instruction is used to instruct the destination database to play back the target log information to complete synchronization of the target log information.

[0047] It is understandable that the data synchronization method of the non-relational database provided in the embodiment of the present application optimizes the synchronization data stream and excludes redundant log records by adopting a compression technology updated according to the value change corresponding to the log file to ensure that only the most critical data is transmitted and processed. This effective compression and data selection process helps to reduce the time cost of synchronization operations and improves the synchronization efficiency between HBase clusters, especially in the scenario of large-scale data processing and high-frequency synchronization. By adopting operations such as HLog virtual playback and log merging, the processing volume of the synchronization log file at the destination end HBase cluster is effectively compressed. Through effective data screening and merging, unnecessary calculation and transmission operations are reduced during the synchronization process, and the resource utilization of the system is improved.

[0048] Figure 3 Another method for synchronizing data in a non-relational database is shown. Figure 3 As shown, the log collection module: This module is responsible for capturing HLog (first log information) from the source HBase cluster (source database); log virtual playback module: This module performs HLog virtual playback on the source HBase cluster, forward reads the log files within the synchronization cycle, merges the operations of the same key-value pair, and removes unnecessary log information. For example: if there are two updates to the same key, only the last log is retained to complete the first log compression; log screening module: This module is responsible for comparing and analyzing the merged log HLog' (second log information) with the log file of the previous synchronization cycle to determine the data that has actually changed. Keep the logs that will actually cause value changes, and remove those that do not cause value changes. Complete the second log compression; log synchronization module: This module packages the log HLog" (target log information) that has been compressed twice and transmits it to the destination HBase cluster to ensure that the data is consistent between different clusters; log playback module: The destination HBase cluster replays the logs transmitted from the source end to complete the application of the logs at the destination end.

[0049] Figure 4 is a structural diagram of a data synchronization device for a non-relational database according to an embodiment of the present application, such as Figure 4 , as shown, the device comprises:

[0050] An acquisition module 40, configured to collect first log information from a source database in response to a data synchronization instruction;

[0051] A first compression module 42, configured to perform a first compression on the update data belonging to the same key-value pair in the first log information to obtain second log information;

[0052] A second compression module 44 is used to perform a second compression on the second log information to obtain target log information;

[0053] The transmission module 46 is used to transmit the target log information to the destination database.

[0054] In the first compression module 42 of the data synchronization device of the above-mentioned non-relational database, it includes: a compression submodule, which is used to send a playback instruction to the source database, and the playback instruction is used to instruct the source database to virtually play the first log information; in the process of virtual playback of the first log information, the log information belonging to the same key-value pair in the first log information is merged to obtain the second log information.

[0055] The compression submodule includes: a compression unit, which is used to determine the log information belonging to the same key-value pair as the initial log information; obtain the update time of multiple initial log information, and determine the initial log information with the latest update time of multiple initial log information as the second log information.

[0056] The second compression module 44 includes: a screening submodule, which is used to obtain the log information in the previous synchronization cycle, compare the log information in the previous synchronization cycle with the second log information one by one, and screen out the target log information, which is the log information that updates the value in the key-value pair.

[0057] The screening submodule includes: a screening unit, used to obtain a target key corresponding to the second log information, and obtain operation information corresponding to the target key from the second log information; obtain a target value corresponding to the target key from the operation information; obtain the value of the target key in the previous synchronization cycle from the log information in the previous synchronization cycle; when the target value is equal to the value of the target key in the previous synchronization cycle, determine that the log information corresponding to the target value is the log information to be deleted; delete the log information to be deleted from the second log information to obtain the target log information.

[0058] The transmission module 46 includes: a transmission submodule, which is used to obtain the storage path of the target log information; extract the target log information according to the storage path, and send the target log information to the destination database after packaging.

[0059] The transmission submodule includes: a synchronization unit, which is used to send a playback instruction to the target database, and the playback instruction is used to instruct the target database to play back the target log information to complete the synchronization of the target log information.

[0060] It should be noted that Figure 4 The data synchronization device of the non-relational database shown is used to execute Figure 2 The data synchronization method of the non-relational database shown in the figure, therefore the relevant explanations in the above-mentioned data synchronization method of the non-relational database are also applicable to the data synchronization device of this non-relational database, and will not be repeated here.

[0061] An embodiment of the present application also provides a computer device, including: a memory for storing program instructions; a processor, connected to the memory, for executing the program instructions of the following functions: in response to a data synchronization instruction, collecting first log information from a source database; performing a first compression on updated data belonging to the same key-value pair in the first log information to obtain second log information; performing a second compression on the second log information to obtain target log information; and transmitting the target log information to a destination database.

[0062] It should be noted that the above-mentioned computer equipment is used to execute Figure 2 The data synchronization method of the non-relational database shown in the figure, therefore the relevant explanations in the above-mentioned data synchronization method of the non-relational database are also applicable to the computer device, and will not be repeated here.

[0063] An embodiment of the present application also provides a non-volatile storage medium, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the following data synchronization method for a non-relational database by running the computer program: in response to a data synchronization instruction, collecting first log information from a source database; compressing the updated data belonging to the same key-value pair in the first log information for a first time to obtain second log information; compressing the second log information for a second time to obtain target log information; and transmitting the target log information to a destination database.

[0064] It should be noted that the above non-volatile storage medium is used to execute Figure 2 The data synchronization method of the non-relational database shown in the figure, therefore the relevant explanations in the above-mentioned data synchronization method of the non-relational database are also applicable to the non-volatile storage medium, and will not be repeated here.

[0065] The present application also provides a computer program product, including a computer program, which implements the steps of the data synchronization method of a non-relational database when the computer program is executed by a processor.

[0066] It should be noted that the above-mentioned computer program product is used to execute Figure 2 The data synchronization method of the non-relational database shown in the figure, therefore, the relevant explanations in the above-mentioned data synchronization method of the non-relational database are also applicable to the computer program product, and will not be repeated here.

[0067] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0068] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0069] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, 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 interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0070] 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 over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

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

[0072] 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 storage medium. 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, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc., which can store program code.

[0073] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A data synchronization method for a non-relational database, It is characterized in that include: In response to the data synchronization instruction, collecting first log information from the source database; Compressing the updated data belonging to the same key-value pair in the first log information for the first time to obtain the second log information; Compressing the second log information for the second time to obtain target log information; The target log information is transmitted to the destination database.

2. The method according to claim 1, It is characterized in that The updated data belonging to the same key-value pair in the first log information is compressed for the first time to obtain the second log information, including: Sending a play instruction to the source database, wherein the play instruction is used to instruct the source database to virtually play the first log information; During the virtual playback of the first log information, log information belonging to the same key-value pair in the first log information is merged to obtain the second log information.

3. The method according to claim 2, It is characterized in that The log information belonging to the same key-value pair in the first log information is merged to obtain the second log information, including: Determine the log information belonging to the same key-value pair as the initial log information; The update times of the multiple initial log information are obtained, and the initial log information with the latest update time among the multiple initial log information is determined as the second log information.

4. The method according to claim 1, It is characterized in that The second log information is compressed for the second time to obtain target log information, including: The log information in the previous synchronization cycle is obtained, and the log information in the previous synchronization cycle is compared with the second log information one by one to filter out the target log information, where the target log information is the log information that updates the value in the key-value pair.

5. The method according to claim 4, It is characterized in that Comparing the log information in the previous synchronization cycle with the second log information one by one to filter out the target log information includes: Obtaining a target key corresponding to the second log information, and obtaining operation information corresponding to the target key from the second log information; Obtaining a target value corresponding to the target key from the operation information; Obtaining the value of the target key in the previous synchronization cycle from the log information in the previous synchronization cycle; In a case where the target value is equal to the value of the target key in the previous synchronization cycle, determining that the log information corresponding to the target value is the log information to be deleted; The log information to be deleted is deleted from the second log information to obtain the target log information.

6. The method according to claim 1, It is characterized in that Transmitting the target log information to a destination database includes: Obtaining the storage path of the target log information; The target log information is extracted according to the storage path, and the target log information is packaged and sent to the destination database.

7. The method according to claim 6, It is characterized in that After transmitting the target log information to the destination database, the method further includes: A playback instruction is sent to the target database, where the playback instruction is used to instruct the target database to play back the target log information to complete synchronization of the target log information.

8. A data synchronization device for a non-relational database, It is characterized in that include: An acquisition module, configured to collect first log information from a source database in response to a data synchronization instruction; A first compression module, used for compressing the update data belonging to the same key-value pair in the first log information for the first time to obtain second log information; A second compression module, used for performing a second compression on the second log information to obtain target log information; The transmission module is used to transmit the target log information to the destination database.

9. A computer device, It is characterized in that include: A memory for storing program instructions; A processor connected to the memory and configured to execute the following program instructions: in response to a data synchronization instruction, collect first log information from a source database; and perform a first compression on update data belonging to a same key-value pair in the first log information to obtain second log information; Compressing the second log information for the second time to obtain target log information; The target log information is transmitted to the destination database.

10. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method according to claim 1 are implemented.

Citation Information

Patent Citations

  • Data increment synchronization method and device and terminal equipment

    CN113641753A

  • Data synchronization method and device based on Binlog, storage medium and electronic equipment

    CN114625809A

  • Data synchronization method and system

    CN114661820A