WO2018126390A1 - 基于触发器的数据库同步系统 - Google Patents

基于触发器的数据库同步系统 Download PDF

Info

Publication number
WO2018126390A1
WO2018126390A1 PCT/CN2017/070251 CN2017070251W WO2018126390A1 WO 2018126390 A1 WO2018126390 A1 WO 2018126390A1 CN 2017070251 W CN2017070251 W CN 2017070251W WO 2018126390 A1 WO2018126390 A1 WO 2018126390A1
Authority
WO
WIPO (PCT)
Prior art keywords
trigger
database
module
synchronization system
database synchronization
Prior art date
Application number
PCT/CN2017/070251
Other languages
English (en)
French (fr)
Inventor
王志全
Original Assignee
深圳市前海中康汇融信息技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市前海中康汇融信息技术有限公司 filed Critical 深圳市前海中康汇融信息技术有限公司
Priority to PCT/CN2017/070251 priority Critical patent/WO2018126390A1/zh
Publication of WO2018126390A1 publication Critical patent/WO2018126390A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor

Definitions

  • the present invention relates to the field of database synchronization, and in particular to a trigger-based database synchronization system.
  • databases often come in many forms, including distributed and centralized, as well as cloud databases.
  • Data synchronization between multiple databases has become a key technology.
  • front-end databases for example, for users and applications, etc.
  • back-end databases for example, for storage and backup, etc.
  • database synchronization is usually performed by obtaining an operation log of the source database and then performing the same operation on the target database according to the operation log.
  • database synchronization is usually performed by obtaining an operation log of the source database and then performing the same operation on the target database according to the operation log.
  • the real-time requirements for synchronization are very high.
  • the real-time performance of data synchronization is not high, but it is desirable to reduce bandwidth consumption and other overhead.
  • the present invention provides a trigger-based database synchronization system, including: a trigger module for configuring a trigger event, a trigger condition, a trigger object, and a trigger operation; and a monitoring module coupled to the trigger module for Monitoring an operation log of the source database; a determination module coupled to the monitoring module for determining whether the trigger is triggered; and an execution module coupled to the determination module for operating the log according to the source database when the trigger is triggered , perform the corresponding trigger operation on the target database.
  • the triggering event includes a plurality of operations in the operational log.
  • the trigger condition is related to time.
  • the trigger condition is related to the operation count.
  • the trigger condition is related to the amount of data.
  • the target database is a cloud database.
  • the monitoring module sets a start tag in the operational log.
  • the triggering operation is an operation in an operation log from a start tag to a trigger being triggered.
  • the database synchronization system further includes an operation processing module coupled between the determination module and the execution module for combining one or more operational actions in the operation log when the trigger is triggered, thereby Get the trigger action.
  • the database synchronization system provided by the invention can synchronize the database according to different requirements of real-time and bandwidth consumption and other overheads according to user configuration.
  • FIG. 1 is a block diagram of a trigger-based database synchronization system in accordance with an embodiment of the present invention.
  • FIG. 2 is a block diagram of a trigger-based database synchronization system in accordance with another embodiment of the present invention.
  • database synchronization system 100 can include the following components:
  • Trigger 102 for configuring a trigger event, a trigger condition, a trigger object, and a trigger operation.
  • the trigger condition is related to time. For example, you can set the hourly, daily, weekly, etc. to synchronize the database.
  • the trigger condition is related to the operation count.
  • the database can be synchronized after a number of operational counts.
  • the trigger condition is related to the amount of data.
  • the database can be synchronized after processing a certain amount of data.
  • a monitoring module 104 coupled to the trigger module 102 for monitoring an operational log of the source database.
  • a decision module 106 coupled to the monitoring module 104 for determining whether the trigger is triggered
  • the execution module 108 is coupled to the determination module 106 for performing a corresponding triggering operation on the target database according to the operation log of the source database when the trigger is triggered.
  • the triggering event includes a plurality of operations in the operational log.
  • the target database is a cloud database.
  • the monitoring module 106 sets a start tag in the operational log.
  • the triggering operation is an operation from a start tag to a trigger being triggered The operation in the log.
  • FIG. 2 is a block diagram of a trigger-based database synchronization system 200 in accordance with another embodiment of the present invention.
  • the database synchronization system 200 of FIG. 2 is similar to the database synchronization system 100 of FIG. 1 except for the operation processing module 207. For the sake of brevity, similar parts are not described again.
  • the operational processing module 207 is coupled between the decision module 106 and the execution module 108.
  • the operation processing module 207 performs a merge process on one or more operational actions in the operation log to obtain a corresponding trigger operation.
  • Execution module 108 then performs the triggering operation on the target database to effect database synchronization.
  • the database synchronization system provided by the present invention is capable of synchronizing the database for different requirements of real-time and bandwidth consumption and other overhead according to user configuration.

Abstract

一种基于触发器的数据库同步系统,包括:触发器模块(102),用于配置触发事件、触发条件、触发对象以及触发操作;监测模块(104),耦合到触发器模块(102),用于监测源数据库的操作日志;判断模块(106),耦合到监测模块(104),用于判断触发器是否被触发;以及执行模块(108),耦合到判断模块(106),用于当触发器被触发时,根据所述源数据库的操作日志,对目标数据库执行对应的触发操作。该数据库同步系统能够根据用户配置,针对实时性和带宽消耗及其它开销的不同要求来对数据库进行同步。

Description

基于触发器的数据库同步系统 技术领域
本发明涉及数据库同步领域,并且特别涉及一种基于触发器的数据库同步系统。
背景技术
当今,随着各种电子设备及互联网的发展,数据量也在急剧增长,尤其近年来,大数据已经成为一个热门领域。由于数据量的急剧增加,对数据的存储、管理等各种操作带来越来越大的挑战。其中,作为数据处理的基础,对于数据库的各种操作是核心问题之一。
随着网络的发展,数据库通常以多种形式出现,包括分布式和集中式,以及云数据库。在多个数据库之间的数据同步成为了关键的技术。通常,需要将前端数据库(例如,面向用户和应用等)与后台数据库(例如,用于存储和备份等)的数据进行同步。
在进行数据库同步时,需要考虑多种指标,包括实时性、带宽消耗以及各种开销,等等。在现有技术中,通常通过获得源数据库的操作日志,然后根据操作日志来对目标数据库进行相同操作来进行数据库同步。但是,在不同的数据库应用场景中,往往对数据库的同步存在不同需求,或者,所考虑的指标不同。例如,在一些应用中,对同步的实时性要求非常高。而在另一些应用中,对于数据同步的实时性要求不高,但是,希望减少带宽消耗及其它开销。
因此,需要一种能够根据应用需求而进行数据库同步的系统。
发明内容
本发明的目的在于提供一种基于触发器的数据库同步系统。
为实现本目的,本发明提供一种基于触发器的数据库同步系统,包括:触发器模块,用于配置触发事件、触发条件、触发对象以及触发操作;监测模块,耦合到触发器模块,用于监测源数据库的操作日志;判断模块,耦合到监测模块,用于判断触发器是否被触发;以及执行模块,耦合到判断模块,用于当触发器被触发时,根据所述源数据库的操作日志,对目标数据库执行对应的触发操作。
在一个实施例中,其中触发事件包括操作日志中的多个操作。
在一个实施例中,触发条件与时间有关。
在一个实施例中,触发条件与操作计数有关。
在一个实施例中,触发条件与数据量有关。
在一个实施例中,所述目标数据库是云数据库。
在一个实施例中,监测模块在操作日志中设置起始标记。
在一个实施例中,所述触发操作是从起始标记到触发器被触发之间的操作日志中的操作。
在一个实施例中,数据库同步系统还包括操作处理模块,耦合到判断模块与执行模块之间,用于当触发器被触发时,对操作日志中的一个或多个操作行为进行合并处理,从而获得触发操作。
本发明提供的数据库同步系统能够根据用户配置,针对实时性和带宽消耗及其它开销的不同要求来对数据库进行同步。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付 出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1所示是根据本发明实施例的基于触发器的数据库同步系统的框图。
图2所示是根据本发明另一实施例的基于触发器的数据库同步系统的框图。
具体实施方式
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
图1所示是根据本发明实施例的基于触发器的数据库同步系统100的框图。如图1所示,数据库同步系统100可包括以下部件:
-触发器102,用于配置触发事件、触发条件、触发对象以及触发操作。
在一个实施例中,触发条件与时间有关。例如,可设置为每小时,每天,每周等来对数据库进行同步。
在一个实施例中,触发条件与操作计数有关。例如,可在若干的操作计数之后,对数据库进行同步。
在一个实施例中,触发条件与数据量有关。例如,可在处理一定量的数据之后,对数据库进行同步。
-监测模块104,耦合到触发器模块102,用于监测源数据库的操作日志。
-判断模块106,耦合到监测模块104,用于判断触发器是否被触发;以及
-执行模块108,耦合到判断模块106,用于当触发器被触发时,根据所述源数据库的操作日志,对目标数据库执行对应的触发操作。
在一个实施例中,其中触发事件包括操作日志中的多个操作。
在一个实施例中,所述目标数据库是云数据库。
在一个实施例中,监测模块106在操作日志中设置起始标记。
在一个实施例中,所述触发操作是从起始标记到触发器被触发之间的操作 日志中的操作。
图2所示是根据本发明另一实施例的基于触发器的数据库同步系统200的框图。除了操作处理模块207之外,图2中的数据库同步系统200类似于图1中的数据库同步系统100。为简洁起见,相似部分不另赘述。
在一个实施例中,操作处理模块207耦合于判断模块106与执行模块108之间。当触发器被触发时,操作处理模块207对操作日志中的一个或多个操作行为进行合并处理,从而获得对应的触发操作。然后,执行模块108对目标数据库进行所述触发操作,以便实现数据库同步。
有利地,本发明提供的数据库同步系统能够根据用户配置,针对实时性和带宽消耗及其它开销的不同要求来对数据库进行同步。
以上所述仅作为本发明的优选实施例,并不用于限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。

Claims (9)

  1. 一种基于触发器的数据库同步系统,包括:
    触发器模块,用于配置触发事件、触发条件、触发对象以及触发操作;
    监测模块,耦合到触发器模块,用于监测源数据库的操作日志;
    判断模块,耦合到监测模块,用于判断触发器是否被触发;以及
    执行模块,耦合到判断模块,用于当触发器被触发时,根据所述源数据库的操作日志,对目标数据库执行对应的触发操作。
  2. 如权利要求1所述的数据库同步系统,其中:
    触发事件包括操作日志中的多个操作。
  3. 如权利要求1所述的数据库同步系统,其中:
    触发条件与时间有关。
  4. 如权利要求1所述的数据库同步系统,其中:
    触发条件与操作计数有关。
  5. 如权利要求1所述的数据库同步系统,其中:
    触发条件与数据量有关。
  6. 如权利要求1所述的数据库同步系统,其特征在于,所述目标数据库是云数据库。
  7. 如权利要求1所述的数据库同步系统,其中:
    监测模块在操作日志中设置起始标记。
  8. 如权利要求7所述的数据库同步系统,其中:
    所述触发操作是从起始标记到触发器被触发之间的操作日志中的操作。
  9. 如权利要求1-8中任一项所述的数据库同步系统,还包括:
    操作处理模块,耦合到判断模块与执行模块之间,用于当触发器被触发时,对操作日志中的一个或多个操作行为进行合并处理,从而获得触发操作。
PCT/CN2017/070251 2017-01-05 2017-01-05 基于触发器的数据库同步系统 WO2018126390A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/070251 WO2018126390A1 (zh) 2017-01-05 2017-01-05 基于触发器的数据库同步系统

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/070251 WO2018126390A1 (zh) 2017-01-05 2017-01-05 基于触发器的数据库同步系统

Publications (1)

Publication Number Publication Date
WO2018126390A1 true WO2018126390A1 (zh) 2018-07-12

Family

ID=62788885

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/070251 WO2018126390A1 (zh) 2017-01-05 2017-01-05 基于触发器的数据库同步系统

Country Status (1)

Country Link
WO (1) WO2018126390A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6212557B1 (en) * 1990-01-29 2001-04-03 Compaq Computer Corporation Method and apparatus for synchronizing upgrades in distributed network data processing systems
CN101719149A (zh) * 2009-12-03 2010-06-02 联动优势科技有限公司 数据同步方法及装置
CN102724295A (zh) * 2012-05-24 2012-10-10 中国电子科技集团公司第十五研究所 数据同步方法及系统
CN103268351A (zh) * 2013-05-31 2013-08-28 网易(杭州)网络有限公司 一种数据同步方法和设备
CN104572978A (zh) * 2014-12-31 2015-04-29 国家电网公司 基于日志的电力调度自动化系统用户行为统计方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6212557B1 (en) * 1990-01-29 2001-04-03 Compaq Computer Corporation Method and apparatus for synchronizing upgrades in distributed network data processing systems
CN101719149A (zh) * 2009-12-03 2010-06-02 联动优势科技有限公司 数据同步方法及装置
CN102724295A (zh) * 2012-05-24 2012-10-10 中国电子科技集团公司第十五研究所 数据同步方法及系统
CN103268351A (zh) * 2013-05-31 2013-08-28 网易(杭州)网络有限公司 一种数据同步方法和设备
CN104572978A (zh) * 2014-12-31 2015-04-29 国家电网公司 基于日志的电力调度自动化系统用户行为统计方法

Similar Documents

Publication Publication Date Title
US9984140B1 (en) Lease based leader election system
CN110309161B (zh) 一种数据同步方法、装置及服务器
CN104699541B (zh) 同步数据的方法、装置、数据传输组件及系统
WO2019084104A1 (en) CORRELATION OF WORKLOAD PERFORMANCE PERFORMANCE AND INTER-OCCUPANT RECOMMENDATION
US8683268B2 (en) Key based cluster log coalescing
WO2021203979A1 (zh) 运维处理方法、装置及计算机设备
CN107656705B (zh) 一种计算机存储介质和一种数据迁移方法、装置及系统
US11860849B2 (en) Watermark-based techniques for change-data-capture
US11487648B2 (en) System and method for fully integrated regression and system testing analytics
US10474185B2 (en) Timestamp alignment across a plurality of computing devices
CN112306700A (zh) 一种异常rpc请求的诊断方法和装置
US20160253370A1 (en) Hyperlink-induced topic search algorithm lock analysis
TWI652621B (zh) 產生虛擬機器訊息佇列應用程式之相依關係的方法與系統
US9552235B2 (en) Using pagerank algorithm-based lock analysis to identify key processes for improving computing system efficiency
US10394682B2 (en) Graphical lock analysis
CN106792825B (zh) 一种分布式网络设备的管理方法
JP2022521412A (ja) 分散システムにおける非同期ストレージ管理
WO2018188607A1 (zh) 流处理方法及装置
WO2018126390A1 (zh) 基于触发器的数据库同步系统
WO2018126391A1 (zh) 基于触发器的数据库同步方法
CN108154343B (zh) 一种企业级信息系统的应急处理方法及系统
CN115269719A (zh) 数据同步方法及装置
US20190057114A1 (en) Two phase retrieval using named graphs
CN115525666A (zh) 一种实时数据更新方法、装置、电子设备及存储介质
US10713103B2 (en) Lightweight application programming interface (API) creation and management

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17890696

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 08/11/2019)

122 Ep: pct application non-entry in european phase

Ref document number: 17890696

Country of ref document: EP

Kind code of ref document: A1