CN117149907A - Data synchronization method, device, equipment and medium - Google Patents
Data synchronization method, device, equipment and medium Download PDFInfo
- Publication number
- CN117149907A CN117149907A CN202311116143.4A CN202311116143A CN117149907A CN 117149907 A CN117149907 A CN 117149907A CN 202311116143 A CN202311116143 A CN 202311116143A CN 117149907 A CN117149907 A CN 117149907A
- Authority
- CN
- China
- Prior art keywords
- data
- data synchronization
- information
- target
- synchronization
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2228—Indexing structures
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
- G06F16/258—Data format conversion from or to a database
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Software Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
技术领域Technical field
本发明涉及数据处理技术领域,尤其涉及数据同步方法、装置、设备及介质。The present invention relates to the field of data processing technology, and in particular to data synchronization methods, devices, equipment and media.
背景技术Background technique
在开源软件及信息技术路线多样化发展潮流下,企业中数据库种类越来越丰富,造成了企业数据需要频繁的搬迁,同一份数据在多个数据场景里需要多次数据复制并且保存保存多份数据副本。并且频繁的数据复制和搬迁过程中,数据质量难以保证。Under the diversified development trend of open source software and information technology lines, the types of databases in enterprises are becoming more and more abundant, resulting in the need for frequent relocation of enterprise data. The same data needs to be copied and saved multiple times in multiple data scenarios. Data copy. And during the frequent data copying and relocation process, data quality is difficult to guarantee.
现有的技术方案通过将源端数据库中的数据格式转换为目标端数据库对应的格式,并同步至目标端数据库,并且在同步过程中进行比对以保证数据同步的准确性。Existing technical solutions convert the data format in the source database into the format corresponding to the target database, synchronize it to the target database, and perform comparisons during the synchronization process to ensure the accuracy of data synchronization.
但是现有的数据同步方案通用性差,多种同构、异构数据同步之间需要一对一的开发大量代码;数据质量难以管理,传统的数据比对方案需要用过全表扫描两端数据库的全量数据逐条数据比对,数据比对时间长、数据差异难以修复,大数据量场景下对比时间长,难以满足用户高一致性数据质量要求;同一份数据在不同的数据使用场景下需要频繁搬迁和转换数据,每次数据同步都需要占用大量时间和资源。However, the existing data synchronization solutions have poor versatility. Synchronization of multiple homogeneous and heterogeneous data requires one-to-one development of a large amount of code. Data quality is difficult to manage. The traditional data comparison solution requires full table scanning of both databases. Comparing the entire amount of data one by one, the data comparison takes a long time and the data differences are difficult to repair. In scenarios with large data volumes, the comparison time is long and it is difficult to meet users’ high consistency data quality requirements; the same data needs to be used frequently in different data usage scenarios. Moving and converting data requires a lot of time and resources for each data synchronization.
发明内容Contents of the invention
本发明提供了一种数据同步方法、装置、设备及介质,以实现对同构、异构数据源之间的数据同步。The invention provides a data synchronization method, device, equipment and medium to realize data synchronization between homogeneous and heterogeneous data sources.
根据本发明的第一方面,提供了一种数据同步方法,包括:According to a first aspect of the present invention, a data synchronization method is provided, including:
获取数据同步任务及对应的数据同步规则,其中,所述数据同步规则是根据选择的预设规则模版生成;Obtain the data synchronization task and the corresponding data synchronization rules, wherein the data synchronization rules are generated according to the selected preset rule template;
当所述数据同步任务及所述数据同步规则满足同步预检条件时,从所述数据同步任务对应的源数据库获取待同步数据信息;When the data synchronization task and the data synchronization rules meet the synchronization pre-check condition, obtain the data information to be synchronized from the source database corresponding to the data synchronization task;
根据预设统一格式及所述待同步数据信息,确定转换后的目标数据信息并进行数据储存;According to the preset unified format and the data information to be synchronized, determine the converted target data information and store the data;
根据所述数据同步规则,将所述目标数据信息同步至所述数据同步任务对应的目标数据库。According to the data synchronization rules, the target data information is synchronized to the target database corresponding to the data synchronization task.
根据本发明的第二方面,提供了一种数据同步装置,包括:According to a second aspect of the present invention, a data synchronization device is provided, including:
规则获取模块,用于获取数据同步任务及对应的数据同步规则,其中,所述数据同步规则是根据选择的预设规则模版生成;A rule acquisition module, used to obtain data synchronization tasks and corresponding data synchronization rules, wherein the data synchronization rules are generated according to the selected preset rule template;
第一确定模块,用于当所述数据同步任务及所述数据同步规则满足同步预检条件时,从所述数据同步任务对应的源数据库获取待同步数据信息;A first determination module, configured to obtain the data information to be synchronized from the source database corresponding to the data synchronization task when the data synchronization task and the data synchronization rule satisfy the synchronization pre-check condition;
第二确定模块,用于根据预设统一格式及所述待同步数据信息,确定转换后的目标数据信息并进行数据储存;The second determination module is used to determine the converted target data information and store the data according to the preset unified format and the data information to be synchronized;
信息同步模块,用于根据所述数据同步规则,将所述目标数据信息同步至所述数据同步任务对应的目标数据库。An information synchronization module, configured to synchronize the target data information to the target database corresponding to the data synchronization task according to the data synchronization rules.
根据本发明的另一方面,提供了一种电子设备,所述电子设备包括:According to another aspect of the present invention, an electronic device is provided, the electronic device including:
至少一个处理器;以及at least one processor; and
与所述至少一个处理器通信连接的存储器;其中,a memory communicatively connected to the at least one processor; wherein,
所述存储器存储有可被所述至少一个处理器执行的计算机程序,所述计算机程序被所述至少一个处理器执行,以使所述至少一个处理器能够执行本发明任一实施例所述的数据同步方法。The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor, so that the at least one processor can execute the method described in any embodiment of the present invention. Data synchronization method.
根据本发明的另一方面,提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,所述计算机指令用于使处理器执行时实现本发明任一实施例所述的数据同步方法。According to another aspect of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores computer instructions. The computer instructions are used to enable a processor to implement any embodiment of the present invention when executed. Data synchronization method.
本发明实施例的技术方案,通过获取数据同步任务及对应的数据同步规则,其中,数据同步规则是根据选择的预设规则模版生成;当数据同步任务及数据同步规则满足同步预检条件时,从数据同步任务对应的源数据库获取待同步数据信息;根据预设统一格式及待同步数据信息,确定转换后的目标数据信息并进行数据储存;根据数据同步规则,将目标数据信息同步至数据同步任务对应的目标数据库。通过预设统一格式将待同步数据信息进行转换,并储存统一格式数据,按照数据同步规则将目标数据信息同步至目标数据库。实现了不同类型数据库间数据同步的通用性及高效性,无需手工配置同步,降低了对数据同步配置人员的技术要求。The technical solution of the embodiment of the present invention is to obtain the data synchronization task and the corresponding data synchronization rule, wherein the data synchronization rule is generated according to the selected preset rule template; when the data synchronization task and the data synchronization rule satisfy the synchronization pre-check condition, Obtain the data information to be synchronized from the source database corresponding to the data synchronization task; determine the converted target data information and store the data according to the preset unified format and the data information to be synchronized; synchronize the target data information to the data synchronization according to the data synchronization rules The target database corresponding to the task. Convert the data information to be synchronized through the preset unified format, store the unified format data, and synchronize the target data information to the target database according to the data synchronization rules. It achieves the versatility and efficiency of data synchronization between different types of databases, eliminating the need for manual configuration of synchronization and reducing the technical requirements for data synchronization configuration personnel.
应当理解,本部分所描述的内容并非旨在标识本发明的实施例的关键或重要特征,也不用于限制本发明的范围。本发明的其它特征将通过以下的说明书而变得容易理解。It should be understood that what is described in this section is not intended to identify key or important features of the embodiments of the invention, nor is it intended to limit the scope of the invention. Other features of the present invention will become easily understood from the following description.
附图说明Description of the drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without exerting creative efforts.
图1是根据本发明实施例一提供的一种数据同步方法的流程图;Figure 1 is a flow chart of a data synchronization method provided according to Embodiment 1 of the present invention;
图2是根据本发明实施例一提供的一种数据同步方法的示例流程图;Figure 2 is an example flow chart of a data synchronization method provided according to Embodiment 1 of the present invention;
图3是根据本发明实施例二提供的一种数据同步装置的结构示意图;Figure 3 is a schematic structural diagram of a data synchronization device provided according to Embodiment 2 of the present invention;
图4是实现本发明实施例的电子设备的结构示意图。Figure 4 is a schematic structural diagram of an electronic device implementing an embodiment of the present invention.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only These are some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts should fall within the scope of protection of the present invention.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments of the invention described herein are capable of being practiced in sequences other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, e.g., a process, method, system, product, or apparatus that encompasses a series of steps or units and need not be limited to those explicitly listed. Those steps or elements may instead include other steps or elements not expressly listed or inherent to the process, method, product or apparatus.
实施例一Embodiment 1
图1为本发明实施例一提供了一种数据同步方法的流程图,本实施例可适用于多源同构、异构数据库间的数据同步情况,该方法可以由数据同步装置来执行,该数据同步装置可以采用硬件和/或软件的形式实现,该数据同步装置可配置于电子设备中。如图1所示,该方法包括:Figure 1 is a flow chart of a data synchronization method provided by Embodiment 1 of the present invention. This embodiment can be applied to data synchronization between multi-source homogeneous and heterogeneous databases. The method can be executed by a data synchronization device. The data synchronization device can be implemented in the form of hardware and/or software, and the data synchronization device can be configured in electronic equipment. As shown in Figure 1, the method includes:
S110、获取数据同步任务及对应的数据同步规则,其中,数据同步规则是根据选择的预设规则模版生成。S110. Obtain the data synchronization task and the corresponding data synchronization rules, where the data synchronization rules are generated according to the selected preset rule template.
在本实施例中,数据同步任务可以理解为使用者通过图形化界面建立的用于将源端数据库及目标端数据库的数据进行同步的任务。可以通过在图形化界面的拖拽、点击等方式创建数据同步任务和编辑数据同步规则。使用者可以通过任务调度创建异构同步任务,提供任务启动、任务停止、任务删除、自动化任务启停、任务队列排队等。In this embodiment, the data synchronization task can be understood as a task established by the user through a graphical interface for synchronizing data in the source database and the target database. You can create data synchronization tasks and edit data synchronization rules by dragging and clicking on the graphical interface. Users can create heterogeneous synchronization tasks through task scheduling, providing task start, task stop, task deletion, automated task start and stop, task queue queuing, etc.
在本实施例中,数据同步规则可以理解为异构数据同步时所采取的规则。其中可以包括库表对应关系、字段对应关系、字段增减规则、空字段填值、数据脱敏规则、字段类型转换、字段值转换规则、异常数据处理规则、同步异常后响应规则等。使用者可以按照提供的预设规则模板进行选择或自定义生成对应的数据同步规则。其中,预设规则模板包括了常见的数据同步需求所生成的模板。处理器还可以对使用者的数据同步规则进行管理及保存。使用者可以将自定义的数据同步规则可以分享到模板中心。In this embodiment, data synchronization rules can be understood as rules adopted when synchronizing heterogeneous data. These can include library table correspondence, field correspondence, field addition and subtraction rules, empty field filling in values, data desensitization rules, field type conversion, field value conversion rules, exception data processing rules, response rules after synchronization exceptions, etc. Users can choose from the provided preset rule templates or customize and generate corresponding data synchronization rules. Among them, the preset rule templates include templates generated for common data synchronization requirements. The processor can also manage and save the user's data synchronization rules. Users can share customized data synchronization rules to the template center.
具体的,处理器可以获取使用者通过图形化界面创建的数据同步任务及对应的数据同步规则。Specifically, the processor can obtain the data synchronization task and corresponding data synchronization rules created by the user through the graphical interface.
S120、当数据同步任务及数据同步规则满足同步预检条件时,从数据同步任务对应的源数据库获取待同步数据信息。S120. When the data synchronization task and the data synchronization rules meet the synchronization pre-check conditions, obtain the data information to be synchronized from the source database corresponding to the data synchronization task.
在本实施例中,同步预检条件可以理解为用于在数据同步前对任务执行的风险及源端及目标端影响风险进行检查的条件。源数据库可以理解为需要数据转换的关系型数据库。待同步数据信息可以理解为源数据库需要进行同步的数据信息。In this embodiment, the synchronization pre-check condition can be understood as a condition used to check the risk of task execution and the risk of impact on the source end and the target end before data synchronization. The source database can be understood as a relational database that requires data conversion. The data information to be synchronized can be understood as the data information that the source database needs to synchronize.
具体的,在获取到数据同步任务及数据同步规则后,处理器可以按照设定的流程自动检查数据同步规则配置的合规性,根据源数据库及目标端的依赖条件确定是否合规,以及对源数据库及目标端的影响程度,当预检通过时,处理器可以将数据同步任务加入任务队列,添加任务监控,加载数据同步规则,当数据同步任务及数据同步规则满足同步预检条件时,处理器可以对源数据库的数据库结构、数据库对象及数据进行全量抽取和增量抽取,并提供断点续传能力,得到待同步数据信息。Specifically, after obtaining the data synchronization task and data synchronization rules, the processor can automatically check the compliance of the data synchronization rule configuration according to the set process, determine whether it is compliant according to the dependency conditions of the source database and the target end, and check the source database. The degree of impact on the database and the target end. When the preflight passes, the processor can add the data synchronization task to the task queue, add task monitoring, and load the data synchronization rules. When the data synchronization task and data synchronization rules meet the synchronization preflight conditions, the processor It can fully extract and incrementally extract the database structure, database objects and data of the source database, and provides the ability to resume transmission at breakpoints to obtain data information to be synchronized.
S130、根据预设统一格式及待同步数据信息,确定转换后的目标数据信息并进行数据储存。S130. According to the preset unified format and the data information to be synchronized, determine the converted target data information and store the data.
在本实施例中,预设统一格式可以理解为预设的标准数据格式,用于将不同类型数据库中的数据库转换为预设统一格式下的数据。包括库表结构信息、主键信息、事务操作类型、事务执行时间、数据采集时间、源端执行的原始SQL、SQL执行前受影响行的数据信息、SQL执行后影响行的数据信息、日志信息等。目标数据信息可以理解为转换后的预设统一格式下的数据。In this embodiment, the preset unified format can be understood as a preset standard data format, which is used to convert databases in different types of databases into data in a preset unified format. Including database table structure information, primary key information, transaction operation type, transaction execution time, data collection time, original SQL executed at the source, data information of affected rows before SQL execution, data information of affected rows after SQL execution, log information, etc. . The target data information can be understood as converted data in a preset unified format.
具体的,处理器可以按照预设统一格式对待同步数据信息进行转换,还可以提供数据持久化、数据加密、数据压缩等数据处理,得到转换后的目标数据信息,并进行数据储存。Specifically, the processor can convert the data information to be synchronized according to a preset unified format, and can also provide data processing such as data persistence, data encryption, and data compression to obtain the converted target data information and store the data.
S140、根据数据同步规则,将目标数据信息同步至数据同步任务对应的目标数据库。S140. According to the data synchronization rules, synchronize the target data information to the target database corresponding to the data synchronization task.
需要知道的是,使用者需提供源端数据库的访问权限,包含连接,查询等权限;需提供目标端数据库的访问权限,包含连接,查询等权限;需提供源端数据库的事务日志访问,使其能够读取数据库事务日志,并解析其中的事务记录。What needs to be known is that users need to provide access rights to the source database, including connection, query, etc.; they need to provide access rights to the target database, including connection, query, etc.; they need to provide transaction log access to the source database, so that It can read the database transaction log and parse the transaction records in it.
在本实施例中,目标数据库可以理解为需要写入的数据库。可以为关系型数据库、非关系型数据库、分布式数据库、大数据组件及数据存储等。In this embodiment, the target database can be understood as the database that needs to be written. It can be a relational database, a non-relational database, a distributed database, big data components and data storage, etc.
具体的,处理器可以根据数据同步规则将目标数据信息转换成目标数据库的SQL语句,按照数据同步规则批量或实时加载到目标数据库中。Specifically, the processor can convert the target data information into SQL statements of the target database according to the data synchronization rules, and load them into the target database in batches or real-time according to the data synchronization rules.
本发明实施例的技术方案,通过获取数据同步任务及对应的数据同步规则,其中,数据同步规则是根据选择的预设规则模版生成;当数据同步任务及数据同步规则满足同步预检条件时,从数据同步任务对应的源数据库获取待同步数据信息;根据预设统一格式及待同步数据信息,确定转换后的目标数据信息并进行数据储存;根据数据同步规则,将目标数据信息同步至数据同步任务对应的目标数据库。通过预设统一格式将待同步数据信息进行转换,并储存统一格式数据,按照数据同步规则将目标数据信息同步至目标数据库。实现了不同类型数据库间数据同步的通用性及高效性,无需手工配置同步,降低了对数据同步配置人员的技术要求。The technical solution of the embodiment of the present invention is to obtain the data synchronization task and the corresponding data synchronization rule, wherein the data synchronization rule is generated according to the selected preset rule template; when the data synchronization task and the data synchronization rule satisfy the synchronization pre-check condition, Obtain the data information to be synchronized from the source database corresponding to the data synchronization task; determine the converted target data information and store the data according to the preset unified format and the data information to be synchronized; synchronize the target data information to the data synchronization according to the data synchronization rules The target database corresponding to the task. Convert the data information to be synchronized through the preset unified format, store the unified format data, and synchronize the target data information to the target database according to the data synchronization rules. It achieves the versatility and efficiency of data synchronization between different types of databases, eliminating the need for manual configuration of synchronization and reducing the technical requirements for data synchronization configuration personnel.
进一步地,在上述实施例的基础上,可以将根据数据同步规则,将目标数据信息同步至数据同步任务对应的目标数据库的步骤优化为:Further, based on the above embodiment, the steps of synchronizing the target data information to the target database corresponding to the data synchronization task according to the data synchronization rules can be optimized as follows:
a1、根据数据同步规则,将目标数据信息转换为结构化查询语言SQL语句。a1. According to the data synchronization rules, convert the target data information into structured query language SQL statements.
在本实施例中,SQL语句可以理解为用于储存数据的语句。In this embodiment, SQL statements can be understood as statements used to store data.
具体的,处理器可以按照数据同步规则中记载的转换方式将目标数据信息转换为SQL语句。Specifically, the processor can convert the target data information into SQL statements according to the conversion method recorded in the data synchronization rules.
b1、将SQL语句同步至数据同步任务对应的目标数据库。b1. Synchronize the SQL statement to the target database corresponding to the data synchronization task.
具体的,处理器可以将SQL语句同步传输至对应的目标数据库。Specifically, the processor can synchronously transmit the SQL statement to the corresponding target database.
本发明实施例的技术方案,通过简单的页面编辑操作就可以选定所要配置的数据同步规则,基于数据同步规则实现复杂的异构数据转换,实现了同构、异构数据源之间同步迁移的通用性,实现了同构或异构数据同步过程中需要的数据转换、处理及加载能力,保证了稳定高效的数据同步能力。通过使用简单的SQL查询或低代码即可实现实时或流式数据的获取。According to the technical solution of the embodiment of the present invention, the data synchronization rules to be configured can be selected through simple page editing operations, complex heterogeneous data conversion is realized based on the data synchronization rules, and synchronous migration between homogeneous and heterogeneous data sources is realized. Its versatility realizes the data conversion, processing and loading capabilities required in the process of homogeneous or heterogeneous data synchronization, ensuring stable and efficient data synchronization capabilities. Acquisition of real-time or streaming data can be achieved by using simple SQL queries or low-code.
作为本实施例一的第一可选实施例,在根据数据同步规则,将目标数据信息写入数据同步任务对应的目标数据库之后,还包括:As a first optional embodiment of Embodiment 1, after writing the target data information into the target database corresponding to the data synchronization task according to the data synchronization rules, it also includes:
当数据同步任务满足数据管理条件时,根据目标数据信息生成数据指纹信息,并存入数据指纹库。When the data synchronization task meets the data management conditions, data fingerprint information is generated based on the target data information and stored in the data fingerprint database.
在本实施例中,数据管理条件可以理解为用于进行数据质量校验的条件。数据指纹信息可以理解为表示数据的唯一标识,用于进行数据校验及快速查询。数据指纹库可以理解为用于存放数据指纹信息的库。In this embodiment, the data management conditions can be understood as conditions used for data quality verification. Data fingerprint information can be understood as a unique identifier representing data, which is used for data verification and quick query. The data fingerprint library can be understood as a library used to store data fingerprint information.
具体的,使用者可以在提供的图形化界面中选择是否进行数据管理,当使用者选择进行数据管理时,数据同步任务同时包括了数据管理指令,处理器可以对数据同步任务进行解析确定其中包括数据管理指令时,数据同步任务满足数据管理条件,处理器可以根据转换为预设统一格式下的目标数据信息记录的行数据主键、行核心字段、整行全量数据等生成数据指纹信息。Specifically, the user can choose whether to perform data management in the provided graphical interface. When the user chooses to perform data management, the data synchronization task also includes data management instructions, and the processor can parse the data synchronization task to determine which includes When the data management instruction is issued, the data synchronization task meets the data management conditions, and the processor can generate data fingerprint information based on the row data primary key, row core field, entire row full data, etc. converted into the target data information record in the preset unified format.
本实施例一的第一可选实施例,通过这样的设置,当数据同步任务满足数据管理条件时,自动将目标数据转换成数据指纹信息并存入数据指纹库,为后续数据质量管理提供了基础,形成数据指纹信息的方式也可以减少数据比对时所需的数据扫描时间及数据占用。In the first optional embodiment of Embodiment 1, through such settings, when the data synchronization task meets the data management conditions, the target data is automatically converted into data fingerprint information and stored in the data fingerprint database, which provides a basis for subsequent data quality management. Basically, the method of forming data fingerprint information can also reduce the data scanning time and data occupation required for data comparison.
作为本实施例一的第二可选实施例,在上述实施例的基础上,还包括:As a second optional embodiment of Embodiment 1, based on the above embodiment, it also includes:
获取相对源端数据库的数据库管理请求,根据数据库管理请求,确定管理后的目标信息。Obtain the database management request relative to the source database, and determine the managed target information based on the database management request.
在本实施例中,数据库管理请求可以理解为用于进行数据获取的请求。目标信息可以理解为相对数据库管理请求确定的信息。In this embodiment, a database management request can be understood as a request for data acquisition. Target information can be understood as information determined relative to the database management request.
具体的,处理器可以获取使用者通过简单的SQL、低代码或SDK组件方式生成的相对源端数据库的数据库管理请求,根据数据库管理请求调用预设数据服务及DataAPI能力,确定管理后的目标信息。Specifically, the processor can obtain the database management request relative to the source database generated by the user through simple SQL, low-code or SDK components, call the preset data service and DataAPI capabilities according to the database management request, and determine the managed target information. .
进一步地,在上述实施例的基础上,可以将根据数据库管理请求,确定管理后的目标信息的步骤优化为:Further, based on the above embodiment, the step of determining the managed target information according to the database management request can be optimized as follows:
a2、在已储存数据中确定与数据库管理请求相匹配的待管理数据信息,其中,待管理数据信息为按照预设统一格式转换后的数据。a2. Determine the data information to be managed that matches the database management request in the stored data, where the data information to be managed is data converted according to a preset unified format.
在本实施例中,待管理数据信息可以理解为已经存储的经过预设统一格式转换后得到的数据,可以在源端数据库同步过程中进行储存。In this embodiment, the data information to be managed can be understood as stored data that has been converted to a preset unified format, and can be stored during the synchronization process of the source database.
具体的,处理器可以在已储存数据中查找与数据库管理请求相匹配的待管理数据信息。Specifically, the processor can search the stored data for data information to be managed that matches the database management request.
b2、通过预设数据服务或预设数据应用程序接口对待管理数据信息进行管理,得到目标管理数据。b2. Manage the data information to be managed through the preset data service or the preset data application interface to obtain the target management data.
在本实施例中,预设数据服务可以理解为以应用程序形式提供的统一数据流式或批量处理能力。预设数据应用程序接口可以理解为以应用程序接口的形式提供统一数据流式或批量处理能力,对外提供统一的数据查询接口,如DataAPI。目标管理数据可以理解为满足数据库管理请求的数据。In this embodiment, the preset data service can be understood as a unified data streaming or batch processing capability provided in the form of an application program. The default data application program interface can be understood as providing unified data streaming or batch processing capabilities in the form of an application program interface, and providing a unified data query interface to the outside world, such as DataAPI. Target management data can be understood as data that satisfies database management requests.
具体的,处理器可以通过预设数据服务或预设数据应用程序接口提供满足数据库管理请求的数据处理功能,如数据报表分析等数据处理功能,对待管理数据信息进行管理,得到目标管理数据。Specifically, the processor can provide data processing functions that meet database management requests through a preset data service or a preset data application interface, such as data report analysis and other data processing functions, manage the data information to be managed, and obtain target management data.
本实施例一的第二可选实施例,通过这样的设置,在接收到数据库管理请求时,通过调用预设数据服务或预设应用程序接口,对已储存数据中的统一格式下的数据进行管理。通过存储统一格式数据并提供数据服务,实现一份数据多次使用,同一份数据只需要一次复制迁移就可以实现数据服务,减少了在数据服务时仍需从源数据库提取数据并进行转换所需的时间。A second optional embodiment of the first embodiment, through such a setting, when receiving a database management request, the data in the unified format in the stored data is processed by calling the default data service or the default application interface. manage. By storing data in a unified format and providing data services, a piece of data can be used multiple times. The same data only needs one copy and migration to implement data services, which reduces the need to extract data from the source database and convert it during data services. time.
作为本实施例一的第三可选实施例,在上述实施例的基础上,还包括:As a third optional embodiment of Embodiment 1, based on the above embodiment, it also includes:
当数据同步任务满足质量管理条件时,对数据同步任务对应的源端数据库进行质量管理,确定源端数据库的质量管理结果。When the data synchronization task meets the quality management conditions, quality management is performed on the source database corresponding to the data synchronization task to determine the quality management results of the source database.
在本实施例中,质量管理条件可以理解为用于数据质量确定的条件,如可以以设定的周期等方式,定时进行质量管理。质量管理结果可以理解为是否用于确定源端数据库中的数据与同步后的数据是否一致的结果。In this embodiment, quality management conditions can be understood as conditions for determining data quality. For example, quality management can be performed regularly in a set period or other manner. Quality management results can be understood as the results used to determine whether the data in the source database is consistent with the synchronized data.
具体的,使用者可以预先选定是否进行质量管理,选择结果可以通过指令的方式添加至数据同步任务中,当数据同步任务中包括质量管理指令时,在处理器开始执行数据同步任务的过程中,当执行的时长满足质量管理条件时,处理器可以对数据同步任务对应的源端数据库中的数据及已经转换的数据进行质量管理,确定源端数据库的质量管理结果。Specifically, the user can pre-select whether to perform quality management, and the selection result can be added to the data synchronization task through instructions. When the data synchronization task includes quality management instructions, the processor starts to execute the data synchronization task. , when the execution duration meets the quality management conditions, the processor can perform quality management on the data in the source database corresponding to the data synchronization task and the converted data, and determine the quality management results of the source database.
进一步地,可以将对数据同步任务对应的源端数据库进行质量管理,确定源端数据库的质量管理结果的步骤优化为:Furthermore, quality management can be performed on the source database corresponding to the data synchronization task, and the steps for determining the quality management results of the source database are optimized as follows:
a3、确定源端数据库中的待管理质量数据。a3. Determine the quality data to be managed in the source database.
具体的,处理器可以从源端数据库中查询未经过质量管理的待管理质量数据。Specifically, the processor can query the quality data to be managed that has not undergone quality management from the source database.
b3、生成各待管理质量数据对应的各待管理数据指纹信息。b3. Generate fingerprint information of each data to be managed corresponding to each quality data to be managed.
具体的,处理器可以按照设定的方式依次对各待管理质量数据进行数据指纹的生成,得到各待管理质量数据所对应的各待管理数据指纹信息。Specifically, the processor can sequentially generate data fingerprints for each quality data to be managed according to a set method, and obtain fingerprint information of each data to be managed corresponding to each quality data to be managed.
c3、在数据指纹库中确定是否包括与各待管理数据指纹信息相匹配数据指纹信息。c3. Determine whether the data fingerprint information matching the data fingerprint information to be managed is included in the data fingerprint database.
需要知道的是,在数据同步过程中会将转换为统一格式的源库数据进行数据指纹的生成,并将生成的数据指纹写入指纹数据库中,以便于后续通过数据指纹的比对进行数据质量管理。What you need to know is that during the data synchronization process, the source database data will be converted into a unified format to generate data fingerprints, and the generated data fingerprints will be written into the fingerprint database to facilitate subsequent data quality through comparison of data fingerprints. manage.
具体的,处理器可以在指纹数据库中进行比对,确定是否包括各待管理数据指纹信息相匹配的数据指纹信息,即可确定该待管理数据是否已经同步至目标数据库或同步的数据指纹是否正确。Specifically, the processor can perform a comparison in the fingerprint database to determine whether it includes data fingerprint information that matches the fingerprint information of the data to be managed, thereby determining whether the data to be managed has been synchronized to the target database or whether the synchronized data fingerprint is correct. .
d3、若是,则将数据一致作为源端数据库的质量管理结果。d3. If yes, data consistency will be regarded as the quality management result of the source database.
具体的,如果指纹数据库中有与待管理数据指纹信息相匹配的数据指纹信息,即该待管理数据指纹信息所对应的数据已经同步至目标数据库,则将数据一致作为源端数据库的质量管理结果。Specifically, if there is data fingerprint information in the fingerprint database that matches the fingerprint information of the data to be managed, that is, the data corresponding to the fingerprint information of the data to be managed has been synchronized to the target database, then the data consistency will be regarded as the quality management result of the source database. .
e3、若否,则将不一致的待管理数据指纹信息作为质量管理结果。e3. If not, use the inconsistent fingerprint information of the data to be managed as the quality management result.
具体的,如果指纹数据库中没有与待管理数据指纹信息相匹配的数据指纹信息,即该待管理数据指纹信息所对应的数据没有同步至目标数据库或同步时发生了错误,则将不一致的待管理数据指纹信息作为源端数据库的质量管理结果。Specifically, if there is no data fingerprint information matching the fingerprint information of the data to be managed in the fingerprint database, that is, the data corresponding to the fingerprint information of the data to be managed is not synchronized to the target database or an error occurs during synchronization, then the inconsistent data to be managed will be Data fingerprint information is used as the quality management result of the source database.
本实施例一的第三可选实施例,通过这样的设置,当数据同步任务满足质量管理条件时,将源端数据库中的数据进行转换与指纹数据库中的指纹信息进行比对,确定源端数据库的质量管理结果,相对于现有技术中的比对方法,通过指纹信息的比对减少了数据扫描的时间和资源占用,快速实现数据比对和数据修复能力,满足用户对于高质量数据的要求。In the third optional embodiment of the first embodiment, with such a setting, when the data synchronization task meets the quality management conditions, the data in the source database is converted and compared with the fingerprint information in the fingerprint database to determine the source The quality management results of the database, compared with the comparison methods in the existing technology, reduce the time and resource occupation of data scanning through the comparison of fingerprint information, quickly achieve data comparison and data repair capabilities, and satisfy users' requirements for high-quality data. Require.
示例性的,为了便于理解本发明,通过一个具体事例进行展示,图2是根据本发明实施例一提供的一种数据同步方法的示例流程图。如图2所示,步骤可以包括:Illustratively, in order to facilitate understanding of the present invention, a specific example is used to illustrate. FIG. 2 is an example flow chart of a data synchronization method provided according to Embodiment 1 of the present invention. As shown in Figure 2, steps may include:
S201、获取数据同步任务及对应的数据同步规则,其中,所述数据同步规则是根据选择的预设规则模版生成;S201. Obtain the data synchronization task and the corresponding data synchronization rules, wherein the data synchronization rules are generated according to the selected preset rule template;
S202、根据数据同步任务及数据同步规则进行任务预检,判断预检是否通过;若是,则跳转至步骤S203,若否,则跳转至步骤S201;S202. Perform task pre-check according to the data synchronization task and data synchronization rules, and determine whether the pre-check passes; if yes, jump to step S203; if not, jump to step S201;
S203、将数据同步任务加入任务队列,添加任务监控,加载数据同步规则;S203. Add the data synchronization task to the task queue, add task monitoring, and load data synchronization rules;
S204、获取源数据库的待同步数据信息;S204. Obtain the data information to be synchronized from the source database;
S205、将待同步数据信息转换为预设统一格式下的目标数据信息;S205. Convert the data information to be synchronized into target data information in a preset unified format;
S206、按照数据同步规则将目标数据信息写入到目标数据库;S206. Write the target data information into the target database according to the data synchronization rules;
S207、是否开启数据质量管理功能;若是,则跳转至步骤S208,若否,则跳转至步骤S201;S207. Whether to enable the data quality management function; if yes, jump to step S208; if not, jump to step S201;
S208、根据目标数据信息生成数据指纹信息并存入数据指纹库,对目标数据信息进行数据存储;S208. Generate data fingerprint information according to the target data information and store it in the data fingerprint database, and store the target data information;
S209、判断是否满足数据质量管理条件;若是,则跳转至步骤S210,若否,则结束;S209. Determine whether the data quality management conditions are met; if so, jump to step S210; if not, end;
S210、读取源数据库的待管理数据信息,根据待管理数据信息生成待管理数据指纹信息;S210. Read the data information to be managed from the source database, and generate fingerprint information of the data to be managed based on the data information to be managed;
S211、基于待管理数据指纹信息在指纹数据库中进行查询;S211. Query the fingerprint database based on the fingerprint information of the data to be managed;
S212、判断是否存在相匹配的数据指纹信息;若是,则跳转至步骤S209,若否,则跳转至步骤S213;S212. Determine whether there is matching data fingerprint information; if so, jump to step S209; if not, jump to step S213;
S213、记录不一致数据并触发数据修复功能;S213. Record inconsistent data and trigger the data repair function;
S214、基于不一致数据对应的数据同步规则修复数据。S214. Repair the data based on the data synchronization rules corresponding to the inconsistent data.
实施例二Embodiment 2
图3为本发明实施例二提供的一种数据同步装置的结构示意图。如图3所示,该装置包括:规则获取模块31、第一确定模块32、第二确定模块33及信息同步模块34。其中,Figure 3 is a schematic structural diagram of a data synchronization device provided in Embodiment 2 of the present invention. As shown in FIG. 3 , the device includes: a rule acquisition module 31 , a first determination module 32 , a second determination module 33 and an information synchronization module 34 . in,
规则获取模块31,用于获取数据同步任务及对应的数据同步规则,其中,所述数据同步规则是根据选择的预设规则模版生成;The rule acquisition module 31 is used to acquire data synchronization tasks and corresponding data synchronization rules, wherein the data synchronization rules are generated according to the selected preset rule template;
第一确定模块32,用于当所述数据同步任务及所述数据同步规则满足同步预检条件时,从所述数据同步任务对应的源数据库获取待同步数据信息;The first determination module 32 is configured to obtain the data information to be synchronized from the source database corresponding to the data synchronization task when the data synchronization task and the data synchronization rule satisfy the synchronization pre-check condition;
第二确定模块33,用于根据预设统一格式及所述待同步数据信息,确定转换后的目标数据信息并进行数据储存;The second determination module 33 is used to determine the converted target data information and store the data according to the preset unified format and the data information to be synchronized;
信息同步模块34,用于根据所述数据同步规则,将所述目标数据信息同步至所述数据同步任务对应的目标数据库。The information synchronization module 34 is configured to synchronize the target data information to the target database corresponding to the data synchronization task according to the data synchronization rules.
本发明实施例的技术方案,通过获取数据同步任务及对应的数据同步规则,其中,数据同步规则是根据选择的预设规则模版生成;当数据同步任务及数据同步规则满足同步预检条件时,从数据同步任务对应的源数据库获取待同步数据信息;根据预设统一格式及待同步数据信息,确定转换后的目标数据信息并进行数据储存;根据数据同步规则,将目标数据信息同步至数据同步任务对应的目标数据库。通过预设统一格式将待同步数据信息进行转换,并储存统一格式数据,按照数据同步规则将目标数据信息同步至目标数据库。实现了不同类型数据库间数据同步的通用性及高效性,无需手工配置同步,降低了对数据同步配置人员的技术要求。The technical solution of the embodiment of the present invention is to obtain the data synchronization task and the corresponding data synchronization rule, wherein the data synchronization rule is generated according to the selected preset rule template; when the data synchronization task and the data synchronization rule satisfy the synchronization pre-check condition, Obtain the data information to be synchronized from the source database corresponding to the data synchronization task; determine the converted target data information and store the data according to the preset unified format and the data information to be synchronized; synchronize the target data information to the data synchronization according to the data synchronization rules The target database corresponding to the task. Convert the data information to be synchronized through the preset unified format, store the unified format data, and synchronize the target data information to the target database according to the data synchronization rules. It achieves the versatility and efficiency of data synchronization between different types of databases, eliminating the need for manual configuration of synchronization and reducing the technical requirements for data synchronization configuration personnel.
进一步地,信息同步模块34具体用于:Further, the information synchronization module 34 is specifically used to:
根据所述数据同步规则,将所述目标数据信息转换为结构化查询语言SQL语句;Convert the target data information into a structured query language SQL statement according to the data synchronization rules;
将所述SQL语句同步至所述数据同步任务对应的目标数据库。Synchronize the SQL statement to the target database corresponding to the data synchronization task.
可选地,该装置还包括:第三确定模块。Optionally, the device further includes: a third determining module.
所述第三确定模块,用于在所述根据所述数据同步规则,将所述目标数据信息写入所述数据同步任务对应的目标数据库之后,当数据同步任务满足数据管理条件时,根据所述目标数据信息生成数据指纹信息,并存入数据指纹库。The third determination module is configured to write the target data information into the target database corresponding to the data synchronization task according to the data synchronization rule, and when the data synchronization task satisfies the data management condition, determine the target data information according to the data synchronization rule. The target data information is used to generate data fingerprint information and stored in the data fingerprint database.
可选地,该装置还包括:第四确定模块。Optionally, the device further includes: a fourth determining module.
所述第四确定模块,用于获取相对源端数据库的数据库管理请求,根据所述数据库管理请求,确定管理后的目标信息。The fourth determination module is used to obtain a database management request relative to the source database, and determine the managed target information according to the database management request.
进一步地,第四确定模块具体用于:Further, the fourth determination module is specifically used for:
在已储存数据中确定与所述数据库管理请求相匹配的待管理数据信息,其中,所述待管理数据信息为按照预设统一格式转换后的数据;Determine the data information to be managed that matches the database management request in the stored data, where the data information to be managed is data converted according to a preset unified format;
通过预设数据服务或预设数据应用程序接口对所述待管理数据信息进行管理,得到目标管理数据。The data information to be managed is managed through a preset data service or a preset data application interface to obtain target management data.
可选地,该装置还包括:结果确定模块。Optionally, the device further includes: a result determination module.
所述结果确定模块,用于当所述数据同步任务满足质量管理条件时,对所述数据同步任务对应的源端数据库进行质量管理,确定所述源端数据库的质量管理结果。The result determination module is configured to perform quality management on the source database corresponding to the data synchronization task and determine the quality management result of the source database when the data synchronization task meets quality management conditions.
进一步地,结果确定模块具体用于:Further, the result determination module is specifically used to:
确定所述源端数据库中的待管理质量数据;Determine the quality data to be managed in the source database;
生成各所述待管理质量数据对应的各待管理数据指纹信息;Generate fingerprint information of each data to be managed corresponding to each of the quality data to be managed;
在数据指纹库中确定是否包括与各所述待管理数据指纹信息相匹配数据指纹信息;Determine whether the data fingerprint information matching each of the data fingerprint information to be managed is included in the data fingerprint database;
若是,则将数据一致作为所述源端数据库的质量管理结果;If so, then data consistency is regarded as the quality management result of the source database;
若否,则将不一致的所述待管理数据指纹信息作为质量管理结果。If not, the inconsistent fingerprint information of the data to be managed is used as the quality management result.
本发明实施例所提供的数据同步装置可执行本发明任意实施例所提供的数据同步方法,具备执行方法相应的功能模块和有益效果。The data synchronization device provided by the embodiment of the present invention can execute the data synchronization method provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method.
实施例三Embodiment 3
图4示出了可以用来实施本发明的实施例的电子设备40的结构示意图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备(如头盔、眼镜、手表等)和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本发明的实现。FIG. 4 shows a schematic structural diagram of an electronic device 40 that can be used to implement embodiments of the present invention. Electronic devices are intended to refer to various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (eg, helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are examples only and are not intended to limit the implementation of the invention described and/or claimed herein.
如图4所示,电子设备40包括至少一个处理器41,以及与至少一个处理器41通信连接的存储器,如只读存储器(ROM)42、随机访问存储器(RAM)43等,其中,存储器存储有可被至少一个处理器执行的计算机程序,处理器41可以根据存储在只读存储器(ROM)42中的计算机程序或者从存储单元48加载到随机访问存储器(RAM)43中的计算机程序,来执行各种适当的动作和处理。在RAM 43中,还可存储电子设备40操作所需的各种程序和数据。处理器41、ROM 42以及RAM 43通过总线44彼此相连。输入/输出(I/O)接口45也连接至总线44。As shown in Figure 4, the electronic device 40 includes at least one processor 41, and a memory communicatively connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., where the memory stores There is a computer program that can be executed by at least one processor. The processor 41 can perform the operation according to the computer program stored in the read-only memory (ROM) 42 or loaded from the storage unit 48 into the random access memory (RAM) 43. Perform various appropriate actions and processing. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, ROM 42 and RAM 43 are connected to each other through a bus 44. An input/output (I/O) interface 45 is also connected to bus 44 .
电子设备40中的多个部件连接至I/O接口45,包括:输入单元46,例如键盘、鼠标等;输出单元47,例如各种类型的显示器、扬声器等;存储单元48,例如磁盘、光盘等;以及通信单元49,例如网卡、调制解调器、无线通信收发机等。通信单元49允许电子设备40通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。Multiple components in the electronic device 40 are connected to the I/O interface 45, including: input unit 46, such as keyboard, mouse, etc.; output unit 47, such as various types of displays, speakers, etc.; storage unit 48, such as magnetic disk, optical disk etc.; and communication unit 49, such as network card, modem, wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information/data with other devices through computer networks such as the Internet and/or various telecommunications networks.
处理器41可以是各种具有处理和计算能力的通用和/或专用处理组件。处理器41的一些示例包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的处理器、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。处理器41执行上文所描述的各个方法和处理,例如数据同步方法。Processor 41 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processing processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 41 performs various methods and processes described above, such as the data synchronization method.
在一些实施例中,数据同步方法可被实现为计算机程序,其被有形地包含于计算机可读存储介质,例如存储单元48。在一些实施例中,计算机程序的部分或者全部可以经由ROM 42和/或通信单元49而被载入和/或安装到电子设备40上。当计算机程序加载到RAM 43并由处理器41执行时,可以执行上文描述的数据同步方法的一个或多个步骤。备选地,在其他实施例中,处理器41可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行数据同步方法。In some embodiments, the data synchronization method may be implemented as a computer program, which is tangibly embodied in a computer-readable storage medium, such as the storage unit 48. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 40 via the ROM 42 and/or the communication unit 49 . When the computer program is loaded into RAM 43 and executed by processor 41, one or more steps of the data synchronization method described above may be performed. Alternatively, in other embodiments, the processor 41 may be configured to perform the data synchronization method in any other suitable manner (eg, by means of firmware).
本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、芯片上系统的系统(SOC)、负载可编程逻辑设备(CPLD)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。Various implementations of the systems and techniques described above may be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip implemented in a system (SOC), load programmable logic device (CPLD), computer hardware, firmware, software, and/or a combination thereof. These various embodiments may include implementation in one or more computer programs executable and/or interpreted on a programmable system including at least one programmable processor, the programmable processor The processor, which may be a special purpose or general purpose programmable processor, may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device. An output device.
用于实施本发明的方法的计算机程序可以采用一个或多个编程语言的任何组合来编写。这些计算机程序可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器,使得计算机程序当由处理器执行时使流程图和/或框图中所规定的功能/操作被实施。计算机程序可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。Computer programs for implementing the methods of the invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that the computer program, when executed by the processor, causes the functions/operations specified in the flowcharts and/or block diagrams to be implemented. A computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
在本发明的上下文中,计算机可读存储介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的计算机程序。计算机可读存储介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。备选地,计算机可读存储介质可以是机器可读信号介质。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of this invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. Computer-readable storage media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media would include one or more wire-based electrical connections, laptop disks, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
为了提供与用户的交互,可以在电子设备上实施此处描述的系统和技术,该电子设备具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给电子设备。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having a display device (eg, a CRT (cathode ray tube) or LCD (liquid crystal display)) for displaying information to the user monitor); and a keyboard and pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and may be provided in any form, including Acoustic input, voice input or tactile input) to receive input from the user.
可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)、区块链网络和互联网。The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., A user's computer having a graphical user interface or web browser through which the user can interact with implementations of the systems and technologies described herein), or including such backend components, middleware components, or any combination of front-end components in a computing system. The components of the system may be interconnected by any form or medium of digital data communication (eg, a communications network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.
计算系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。服务器可以是云服务器,又称为云计算服务器或云主机,是云计算服务体系中的一项主机产品,以解决了传统物理主机与VPS服务中,存在的管理难度大,业务扩展性弱的缺陷。Computing systems may include clients and servers. Clients and servers are generally remote from each other and typically interact over a communications network. The relationship of client and server is created by computer programs running on corresponding computers and having a client-server relationship with each other. The server can be a cloud server, also known as cloud computing server or cloud host. It is a host product in the cloud computing service system to solve the problems of difficult management and weak business scalability in traditional physical hosts and VPS services. defect.
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本发明中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本发明的技术方案所期望的结果,本文在此不进行限制。It should be understood that various forms of the process shown above may be used, with steps reordered, added or deleted. For example, each step described in the present invention can be executed in parallel, sequentially, or in different orders. As long as the desired results of the technical solution of the present invention can be achieved, there is no limitation here.
上述具体实施方式,并不构成对本发明保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本发明的精神和原则之内所作的修改、等同替换和改进等,均应包含在本发明保护范围之内。The above-mentioned specific embodiments do not constitute a limitation on the scope of the present invention. It will be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions are possible depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention shall be included in the protection scope of the present invention.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311116143.4A CN117149907A (en) | 2023-08-31 | 2023-08-31 | Data synchronization method, device, equipment and medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311116143.4A CN117149907A (en) | 2023-08-31 | 2023-08-31 | Data synchronization method, device, equipment and medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN117149907A true CN117149907A (en) | 2023-12-01 |
Family
ID=88898304
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202311116143.4A Pending CN117149907A (en) | 2023-08-31 | 2023-08-31 | Data synchronization method, device, equipment and medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN117149907A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118626566A (en) * | 2024-06-25 | 2024-09-10 | 北京优特捷信息技术有限公司 | Data synchronization method, device, electronic device and storage medium |
| CN118626549A (en) * | 2024-07-18 | 2024-09-10 | 迪思杰(北京)数据管理技术有限公司 | A universal data device method based on database replication software development |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101741569A (en) * | 2009-12-24 | 2010-06-16 | 中兴通讯股份有限公司 | Data synchronization method, data synchronization system, client and server |
| CN103761318A (en) * | 2014-01-27 | 2014-04-30 | 中国工商银行股份有限公司 | Method and system for data synchronization of relational heterogeneous databases |
| CN109933630A (en) * | 2019-03-19 | 2019-06-25 | 武汉达梦数据库有限公司 | Database data real-time synchronization method and equipment |
| CN111400408A (en) * | 2020-04-13 | 2020-07-10 | 上海东普信息科技有限公司 | Data synchronization method, device, equipment and storage medium |
| WO2020232884A1 (en) * | 2019-05-20 | 2020-11-26 | 平安科技(深圳)有限公司 | Data table migration method, apparatus, computer device and storage medium |
| CN114238506A (en) * | 2021-12-15 | 2022-03-25 | 中国平安人寿保险股份有限公司 | Data synchronization method and device, computer equipment and storage medium |
-
2023
- 2023-08-31 CN CN202311116143.4A patent/CN117149907A/en active Pending
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101741569A (en) * | 2009-12-24 | 2010-06-16 | 中兴通讯股份有限公司 | Data synchronization method, data synchronization system, client and server |
| CN103761318A (en) * | 2014-01-27 | 2014-04-30 | 中国工商银行股份有限公司 | Method and system for data synchronization of relational heterogeneous databases |
| CN109933630A (en) * | 2019-03-19 | 2019-06-25 | 武汉达梦数据库有限公司 | Database data real-time synchronization method and equipment |
| WO2020232884A1 (en) * | 2019-05-20 | 2020-11-26 | 平安科技(深圳)有限公司 | Data table migration method, apparatus, computer device and storage medium |
| CN111400408A (en) * | 2020-04-13 | 2020-07-10 | 上海东普信息科技有限公司 | Data synchronization method, device, equipment and storage medium |
| CN114238506A (en) * | 2021-12-15 | 2022-03-25 | 中国平安人寿保险股份有限公司 | Data synchronization method and device, computer equipment and storage medium |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118626566A (en) * | 2024-06-25 | 2024-09-10 | 北京优特捷信息技术有限公司 | Data synchronization method, device, electronic device and storage medium |
| CN118626549A (en) * | 2024-07-18 | 2024-09-10 | 迪思杰(北京)数据管理技术有限公司 | A universal data device method based on database replication software development |
| CN118626549B (en) * | 2024-07-18 | 2024-11-05 | 迪思杰(北京)数据管理技术有限公司 | Universal data device method based on database replication software development |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN113220710B (en) | Data query method, device, electronic device and storage medium | |
| CN113392974B (en) | Model training method, device, electronic equipment and storage medium | |
| CN111966677A (en) | Data report processing method and device, electronic equipment and storage medium | |
| CN117149907A (en) | Data synchronization method, device, equipment and medium | |
| CN117574868A (en) | Chart generation method, device, equipment and storage medium | |
| CN115454971A (en) | Data migration method, device, electronic device and storage medium | |
| CN114428674A (en) | Task scheduling method, device, equipment and storage medium | |
| CN111444158A (en) | Long-short term user portrait generation method, device, equipment and readable storage medium | |
| CN115146000A (en) | A database data synchronization method, device, electronic device and storage medium | |
| CN116303013A (en) | Source code analysis method, device, electronic equipment and storage medium | |
| CN116821217A (en) | Data distribution and conversion methods, devices, equipment and storage media | |
| CN116383207A (en) | A data label management method, device, electronic equipment and storage medium | |
| WO2021143199A1 (en) | Method and apparatus for searching log, computer device, and storage medium | |
| CN115454964A (en) | Data migration method and system | |
| CN112948461B (en) | Method, apparatus, storage medium and program product for calendar data processing | |
| CN115511085A (en) | Model data processing method, device, equipment and storage medium | |
| CN115357641A (en) | Data query method and device, electronic equipment and storage medium | |
| CN115168361A (en) | Label management method and device | |
| CN114942955A (en) | A data export method, device, export node, medium and system | |
| CN118467631A (en) | Data synchronization method, device, equipment and storage medium | |
| CN118467644A (en) | SQL Server database transaction log analysis DDL operation method, device, equipment and medium | |
| CN118069613A (en) | Log storage method, device, electronic device and storage medium | |
| CN116595110A (en) | Data storage method and device, electronic equipment and storage medium | |
| CN115599863A (en) | Bank data synchronization method and device based on Hudi, electronic equipment and medium | |
| CN115994192A (en) | Method, device and system for implementing Elasticsearch retrieval in relational database retrieval system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |