CN102724295A - Data synchronization method and system - Google Patents

Data synchronization method and system Download PDF

Info

Publication number
CN102724295A
CN102724295A CN2012101646360A CN201210164636A CN102724295A CN 102724295 A CN102724295 A CN 102724295A CN 2012101646360 A CN2012101646360 A CN 2012101646360A CN 201210164636 A CN201210164636 A CN 201210164636A CN 102724295 A CN102724295 A CN 102724295A
Authority
CN
China
Prior art keywords
data
client
information
synchronization
maintenance server
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.)
Granted
Application number
CN2012101646360A
Other languages
Chinese (zh)
Other versions
CN102724295B (en
Inventor
高敏
尹海玲
施睿
孟德地
陈雪松
郑扬飞
张立松
栾明君
王安泽
张宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CETC 15 Research Institute
Original Assignee
CETC 15 Research Institute
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 CETC 15 Research Institute filed Critical CETC 15 Research Institute
Priority to CN201210164636.0A priority Critical patent/CN102724295B/en
Publication of CN102724295A publication Critical patent/CN102724295A/en
Application granted granted Critical
Publication of CN102724295B publication Critical patent/CN102724295B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明公开了一种数据同步方法及系统,所述方法包括:数据维护服务器在触发条件满足时,根据数据使用客户端的数据需求信息,确定该数据使用客户端的待同步更新数据;并根据数据使用客户端的数据库连接信息建立链接后,将所述待同步更新数据存入到数据使用客户端的数据库中,实现数据同步;其中,所述数据需求信息和数据库连接信息是由数据使用客户端通过数据维护服务器发布的数据需求申请网页发送到数据维护服务器的。由于数据使用客户端通过数据维护服务器发布的数据同步需求申请网页向数据维护服务器发送数据需求信息和数据库连接信息,而不必在数据使用客户端安装专用软件,大大减少了在增加数据使用客户端时,维护人员的工作量。

Figure 201210164636

The invention discloses a data synchronization method and system. The method includes: when the trigger condition is met, the data maintenance server determines the data to be updated synchronously of the data usage client according to the data demand information of the data usage client; and according to the data usage After the database connection information of the client is linked, store the data to be updated synchronously in the database of the data user client to realize data synchronization; wherein, the data requirement information and the database connection information are maintained by the data user client through data The data request application webpage released by the server is sent to the data maintenance server. Since the data usage client sends the data requirement information and database connection information to the data maintenance server through the data synchronization requirement application web page released by the data maintenance server, it is not necessary to install special software on the data usage client, which greatly reduces the time spent on increasing the data usage client. , The workload of maintenance personnel.

Figure 201210164636

Description

数据同步方法及系统Data Synchronization Method and System

技术领域 technical field

本发明涉及计算机通信技术,尤其涉及数据同步方法及系统。The invention relates to computer communication technology, in particular to a data synchronization method and system.

背景技术 Background technique

随着信息化在政府、机关、企业、高校等单位的不断深化,信息系统的集成逐渐成为一个关键点。数据的集成是软件系统集成的基础,数据共享是数据集成的主要手段,而数据同步是数据在不同业务系统之间进行共享的常用技术手段之一。With the continuous deepening of informatization in government, government agencies, enterprises, universities and other units, the integration of information systems has gradually become a key point. Data integration is the basis of software system integration, data sharing is the main means of data integration, and data synchronization is one of the common technical means for data sharing between different business systems.

一个进行数据同步的数据同步系统包括:数据维护服务器和数据使用客户端。其中,数据维护服务器用以提供数据;而需要这些数据的业务系统称为数据使用客户端。数据维护服务器根据数据使用客户端对这些数据的需求将数据推送到数据使用客户端中。A data synchronization system for data synchronization includes: a data maintenance server and a data usage client. Among them, the data maintenance server is used to provide data; and the business system that needs these data is called a data usage client. The data maintenance server pushes the data to the data usage client according to the requirements of the data usage client for the data.

通常,一个数据维护服务器需要通过数据同步为多个数据使用客户端提供数据(如图1所示)。在现有技术中,通常采有第三方厂商提供的数据同步软件进行数据同步。例如,Oracle公司的GoldenGate、Quest公司的SharePlex、DSG公司的RealSync等。这些软件进行数据同步的原理是数据维护服务器端的软件读取数据维护服务器端数据库的日志,分析日志获取变更操作,并将变更操作发送到数据使用客户端中,再由数据使用客户端的软件将源端传输过来的变更操作应用在数据使用客户端的数据库中,完成数据同步。Usually, a data maintenance server needs to provide data for multiple data usage clients through data synchronization (as shown in Figure 1). In the prior art, data synchronization software usually provided by a third-party manufacturer is used for data synchronization. For example, Oracle's GoldenGate, Quest's SharePlex, DSG's RealSync, etc. The principle of data synchronization by these software is that the software on the data maintenance server reads the log of the database on the data maintenance server, analyzes the log to obtain the change operation, and sends the change operation to the data usage client, and then the software of the data usage client sends the source The change operation transmitted from the terminal is applied to the database of the data user client to complete data synchronization.

但是,现有技术的数据同步方法除了需要在数据维护服务器安装软件,还要在数据使用客户端安装相应软件。因此,在数据使用客户端较多的情况下,软件安装工作量会非常大、系统维护人员的工作量会很大。However, in the data synchronization method of the prior art, in addition to installing software on the data maintenance server, corresponding software also needs to be installed on the data usage client. Therefore, in the case of many clients using data, the software installation workload will be very heavy, and the workload of system maintenance personnel will be heavy.

另外,当数据使用客户端的数据同步需求发生变更时,例如,某个数据使用客户端需要增加数据表W的数据同步需求,那么,还需要对数据维护服务器端及该数据使用客户端安装的软件重新做一次同步配置,影响数据维护服务器端与该数据使用客户端之间数据的正常同步,而且变更过程中维护人员工作量较大。In addition, when the data synchronization requirements of the data usage client change, for example, a data usage client needs to increase the data synchronization requirements of the data table W, then the data maintenance server and the software installed on the data usage client are also required. Re-doing the synchronization configuration will affect the normal synchronization of data between the data maintenance server and the data usage client, and the workload of the maintenance personnel will be heavy during the change process.

此外,现有技术的数据同步方法中确定数据使用客户端所需要的同步数据是否超越权限的功能也有待完善。In addition, in the data synchronization method in the prior art, the function of determining whether the synchronization data required by the data usage client exceeds the authority also needs to be improved.

综上所述,现有技术的数据同步方法,在数据使用客户端较多的情况下,软件安装工作量很大,导致系统维护人员的工作量大;数据使用客户端的数据同步需求发生变更时,影响数据的正常同步,维护人员工作量较大;判断同步数据是否超越权限的功能有待完善。To sum up, in the data synchronization method of the prior art, when there are many clients using data, the workload of software installation is very heavy, resulting in a heavy workload for system maintenance personnel; when the data synchronization requirements of clients using data change , affects the normal synchronization of data, and the workload of maintenance personnel is heavy; the function of judging whether the synchronization data exceeds the authority needs to be improved.

发明内容 Contents of the invention

本发明的实施例提供了一种数据同步方法及系统,不必在数据使用客户端安装相应软件,减少系统维护人员的工作量。The embodiment of the present invention provides a data synchronization method and system, without installing corresponding software on the data usage client, reducing the workload of system maintenance personnel.

根据本发明的一个方面,提供了一种数据同步方法,包括:According to one aspect of the present invention, a data synchronization method is provided, including:

数据维护服务器在触发条件满足时,根据数据使用客户端的数据需求信息,确定该数据使用客户端的待同步更新数据;When the trigger condition is satisfied, the data maintenance server determines the data to be updated synchronously of the data user client according to the data demand information of the data user client;

所述数据维护服务器根据所述数据使用客户端的数据库连接信息,与所述数据使用客户端的数据库建立链接后,将所述待同步更新数据存入到所述数据使用客户端的数据库中,进行所述数据使用客户端的数据同步;After the data maintenance server establishes a link with the database of the data usage client according to the database connection information of the data usage client, the data to be updated synchronously is stored in the database of the data usage client, and the The data is synchronized with the data of the client;

其中,所述数据需求信息和数据库连接信息包括在数据需求申请信息中,所述数据需求申请信息是由所述数据使用客户端通过所述数据维护服务器发布的数据需求申请网页发送到所述数据维护服务器的。Wherein, the data requirement information and database connection information are included in the data requirement application information, and the data requirement application information is sent to the data by the data usage client through the data requirement application webpage published by the data maintenance server. maintenance server.

进一步,所述数据需求申请信息中还包括数据使用客户端的标识信息;以及,Further, the data requirement application information also includes identification information of the data usage client; and,

在所述数据使用客户端通过所述数据维护服务器发布的数据需求申请网页将所述数据需求申请信息发送到所述数据维护服务器后,还包括:After the data usage client sends the data demand application information to the data maintenance server through the data demand application webpage issued by the data maintenance server, it also includes:

所述数据维护服务器根据该数据使用客户端的标识信息所对应的数据同步权限,对所述数据需求信息进行权限审核;若权限审核通过,所述数据维护服务器将所述数据需求信息标志为审核通过的数据需求信息;以及The data maintenance server performs a permission review on the data requirement information according to the data synchronization permission corresponding to the identification information of the data usage client; if the permission review passes, the data maintenance server marks the data requirement information as approved information on data requirements; and

所述根据数据使用客户端的数据需求信息,确定该数据使用客户端的待同步更新数据具体为:根据该数据使用客户端的标志为审核通过的数据需求信息,确定该数据使用客户端的待同步更新数据。According to the data requirement information of the data usage client, determining the data to be updated synchronously of the data usage client is specifically: according to the data requirement information whose flag of the data usage client is approved, determining the data to be updated synchronously of the data usage client.

其中,所述数据需求信息具体包括同步对象的信息以及针对每个同步对象记录的前次同步时间信息;以及Wherein, the data requirement information specifically includes the information of the synchronization object and the previous synchronization time information recorded for each synchronization object; and

所述根据数据使用客户端的数据需求信息,确定该数据使用客户端的待同步更新数据具体包括:According to the data demand information of the data usage client, determining the data to be updated synchronously of the data usage client specifically includes:

所述数据维护服务器根据所述数据需求信息中的各同步对象的信息以及各同步对象的前次同步时间信息,分别针对每个同步对象,确定该同步对象的待同步更新数据;以及The data maintenance server, according to the information of each synchronization object in the data requirement information and the previous synchronization time information of each synchronization object, respectively, for each synchronization object, determines the data to be updated for synchronization of the synchronization object; and

在所述确定该同步对象的待同步更新数据之后,还包括:After the determination of the synchronization update data of the synchronization object, it also includes:

根据该同步对象的待同步更新数据的时间信息,更新所述数据需求信息中针对该同步对象记录的前次同步时间信息。The previous synchronization time information recorded for the synchronization object in the data requirement information is updated according to the time information of the synchronization object's data to be updated synchronously.

所述同步对象的信息具体包括需进行数据同步的数据表的名称或需进行数据同步的视图的名称。The information of the synchronization object specifically includes the name of the data table to be synchronized or the name of the view to be synchronized.

所述同步对象的信息还包括:所述数据表中需进行数据同步的列的名称或所述数据表中需进行数据同步的行的名称。The information of the synchronization object further includes: the name of the column in the data table that needs to be synchronized or the name of the row in the data table that needs to be synchronized.

所述数据库连接信息包括:所述数据使用客户端的IP地址、端口号、数据库名称、数据库用户名、数据库密码。The database connection information includes: the data user's IP address, port number, database name, database user name, and database password.

所述触发条件具体为:The trigger conditions are specifically:

设定的数据同步周期到达;或者,The set data synchronization cycle arrives; or,

所述数据维护服务器的数据库中有更新的数据;或者,There is updated data in the database of the data maintenance server; or,

在本次数据同步周期之内所述数据维护服务器的数据库中有更新的数据,且本次数据同步周期到达。There is updated data in the database of the data maintenance server within this data synchronization period, and this data synchronization period arrives.

根据本发明的另一个方面,还提供了一种数据同步系统,包括:数据维护服务器和至少一个数据使用客户端;According to another aspect of the present invention, a data synchronization system is also provided, including: a data maintenance server and at least one data usage client;

所述数据维护服务器用于在触发条件满足时,根据各数据使用客户端的数据需求信息,确定各数据使用客户端的待同步更新数据;并根据各数据使用客户端的数据库连接信息,分别与每个数据使用客户端的数据库建立链接后,将该数据使用客户端的待同步更新数据存入到该数据使用客户端的数据库中,进行该数据使用客户端的数据同步;The data maintenance server is used to determine the data to be updated synchronously of each data user client according to the data demand information of each data user client when the trigger condition is met; After the database of the client is used to establish a link, the data to be updated by the client of the data is stored in the database of the client of the data, and the data of the client of the data is synchronized;

其中,每个数据使用客户端的数据需求信息和数据库连接信息包括在该数据使用客户端的数据需求申请信息中,该数据使用客户端的数据需求申请信息是由该数据使用客户端通过所述数据维护服务器发布的数据需求申请网页发送到所述数据维护服务器的。Wherein, the data requirement information and database connection information of each data usage client are included in the data requirement application information of the data usage client, and the data requirement application information of the data usage client is provided by the data usage client through the data maintenance server The published web page of data demand application is sent to the data maintenance server.

其中,所述数据需求申请信息中还包括数据使用客户端的标识信息;以及,Wherein, the data requirement application information also includes the identification information of the data usage client; and,

所述数据维护服务器还用于根据该数据使用客户端的标识信息所对应的数据同步权限,对所述数据需求信息进行权限审核;若权限审核通过,所述数据维护服务器确定该数据使用客户端为审核通过的数据使用客户端;以及The data maintenance server is further configured to perform permission review on the data requirement information according to the data synchronization permission corresponding to the identification information of the data usage client; if the permission review is passed, the data maintenance server determines that the data usage client is Approved data usage clients; and

所述数据维护服务器根据各数据使用客户端的数据需求信息,确定各数据使用客户端的待同步更新数据具体为:According to the data demand information of each data user client, the data maintenance server determines that the data to be updated synchronously of each data user client is specifically:

所述数据维护服务器根据各审核通过的数据使用客户端的数据需求信息,分别确定各审核通过的数据使用客户端的待同步更新数据。The data maintenance server respectively determines the data to be updated synchronously of each approved data usage client according to the data requirement information of each approved data usage client.

所述数据维护服务器根据各数据使用客户端的数据库连接信息,分别与每个数据使用客户端的数据库建立链接后,将该数据使用客户端的待同步更新数据存入到该数据使用客户端的数据库具体为:According to the database connection information of each data user client, the data maintenance server establishes a link with the database of each data user client respectively, and stores the data to be updated synchronously of the data user client into the database of the data user client. Specifically:

所述数据维护服务器根据各审核通过的数据使用客户端的数据库连接信息,分别与每个审核通过的数据使用客户端的数据库建立链接后,将该数据使用客户端的待同步更新数据存入到该数据使用客户端的数据库中。The data maintenance server, according to the database connection information of each approved data user client, respectively establishes a link with the database of each approved data user client, and stores the data to be updated synchronously of the data user client into the data user in the client's database.

本发明实施例由于数据使用客户端通过数据维护服务器发布的数据同步需求申请网页向数据维护服务器发送数据需求信息和数据库连接信息,而数据维护服务器可以根据数据使用客户端发送的数据需求信息和数据库连接信息,对数据使用客户端进行数据同步,而不必在数据使用客户端安装专用软件,大大减少了在增加数据使用客户端时,维护人员的工作量;当数据使用客户端需要变更同步数据需求时,也不必更改数据使用客户端的软件,而是通过数据同步需求申请网页修改相关信息即可,更进一步减少了维护人员的工作量。In the embodiment of the present invention, since the data usage client sends data requirement information and database connection information to the data maintenance server through the data synchronization requirement application web page released by the data maintenance server, the data maintenance server can send the data requirement information and database connection information according to the data usage client. Connection information, data synchronization on the data client, without installing special software on the data client, greatly reducing the workload of maintenance personnel when increasing the data client; when the data client needs to change the synchronization data requirements At the same time, it is not necessary to change the software of the data usage client, but to modify the relevant information through the data synchronization requirement application webpage, which further reduces the workload of maintenance personnel.

进一步,数据维护服务器通过数据同步需求申请网页获取了数据使用客户端发送的数据需求申请信息后还可以对该数据需求申请信息进行权限审核,审核通过后才向该数据使用客户端同步数据。更加完善了数据同步系统的审核功能,保证了数据使用客户端按权按需获取数据,从而确保了数据的使用安全。并且,方便了对数据使用客户端的审核,减少了维护人员的审核工作。Furthermore, after the data maintenance server obtains the data request application information sent by the data user client through the data synchronization request application web page, it can also perform an authority review on the data request application information, and only after the review is passed, the data is synchronized to the data user client. The auditing function of the data synchronization system has been further improved to ensure that data users can obtain data according to their rights and needs, thus ensuring the safety of data use. In addition, it facilitates the auditing of data usage clients and reduces the auditing work of maintenance personnel.

进一步,当数据使用客户端的需要进行同步的同步对象发生改变时,只需在数据同步需求申请网页修改相关信息,重新向数据维护服务器发送数据需求申请信息进行审核即可,而不必更改数据使用客户端的任何软件,或对数据使用客户端的任何软件重新配置,进一步提高了使用效率。Furthermore, when the synchronization object that needs to be synchronized by the data user client changes, it is only necessary to modify the relevant information on the data synchronization requirement application webpage, and resend the data requirement application information to the data maintenance server for review without changing the data usage client. Any software on the client side, or any software reconfiguration on the client side for data usage, further improves usage efficiency.

附图说明 Description of drawings

图1为本发明实施例的数据同步系统示意图;FIG. 1 is a schematic diagram of a data synchronization system according to an embodiment of the present invention;

图2为本发明实施例的数据使用客户端通过数据维护服务器发布的网页向数据维护服务器发送数据需求申请信息的方法流程图;Fig. 2 is a flow chart of a method for sending data request application information to a data maintenance server by a data usage client through a web page issued by a data maintenance server according to an embodiment of the present invention;

图3为本发明实施例的数据维护服务器对数据使用客户端进行数据同步的方法流程图。Fig. 3 is a flowchart of a method for data synchronization performed by a data maintenance server to a data usage client according to an embodiment of the present invention.

具体实施方式 Detailed ways

为使本发明的目的、技术方案及优点更加清楚明白,以下参照附图并举出优选实施例,对本发明进一步详细说明。然而,需要说明的是,说明书中列出的许多细节仅仅是为了使读者对本发明的一个或多个方面有一个透彻的理解,即便没有这些特定的细节也可以实现本发明的这些方面。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be described in further detail below with reference to the accompanying drawings and preferred embodiments. However, it should be noted that many of the details listed in the specification are only for readers to have a thorough understanding of one or more aspects of the present invention, and these aspects of the present invention can be implemented even without these specific details.

本申请使用的“模块”、“系统”等术语旨在包括与计算机相关的实体,例如但不限于硬件、固件、软硬件组合、软件或者执行中的软件。例如,模块可以是,但并不仅限于:处理器上运行的进程、处理器、对象、可执行程序、执行的线程、程序和/或计算机。举例来说,计算设备上运行的应用程序和此计算设备都可以是模块。一个或多个模块可以位于执行中的一个进程和/或线程内,一个模块也可以位于一台计算机上和/或分布于两台或更多台计算机之间。As used herein, terms such as "module" and "system" are intended to include computer-related entities such as, but not limited to, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a module may be, but is not limited to being limited to being, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and/or a computer. For example, both an application running on a computing device and the computing device could be modules. One or more modules can reside within a process and/or thread of execution and a module can be localized on one computer and/or distributed between two or more computers.

本发明提供的技术方案中数据维护服务器与多个数据使用客户端之间采用B/S结构。数据维护服务器发布数据同步需求申请网页,各数据使用客户端的用户通过访问该数据同步需求申请网页,向数据维护服务器发送数据需求申请信息,也就是说,数据维护服务器通过数据同步需求申请网页获取各数据使用客户端的数据需求申请信息。数据使用客户端发送的数据需求申请信息中可以包括数据需求信息和数据库连接信息。数据需求信息中主要包括数据使用客户端需要进行数据同步的同步对象的信息,例如需要进行数据同步的数据表的名称,或者需要进行数据同步的视图的名称;数据库连接信息中具体可以包括数据使用客户端的IP地址、端口号、数据库名称、数据库用户名、数据库密码;根据该数据库连接信息数据维护服务器可以链接到数据使用客户端的数据库,并将同步数据写入到数据使用客户端的数据库中。In the technical solution provided by the invention, a B/S structure is adopted between the data maintenance server and multiple data usage clients. The data maintenance server publishes the data synchronization requirement application webpage, and the users of each data usage client send the data requirement application information to the data maintenance server by accessing the data synchronization requirement application webpage, that is to say, the data maintenance server obtains each Data usage client's data requirements application information. The data requirement application information sent by the data usage client may include data requirement information and database connection information. The data requirement information mainly includes the information of the synchronization object that the data user client needs to perform data synchronization, such as the name of the data table that needs to be synchronized, or the name of the view that needs to be synchronized; the database connection information can specifically include data usage IP address, port number, database name, database user name, database password of the client; according to the database connection information, the data maintenance server can link to the database of the data usage client, and write the synchronous data into the database of the data usage client.

数据维护服务器在获取了数据使用客户端的数据需求信息和数据库连接信息后,可以在预先设定的某个触发条件满足时,比如该触发条件可以预设为“设定的数据同步周期到达”,则当设定的数据同步周期到达时,根据数据使用客户端的数据需求信息,确定出该数据使用客户端的待同步更新数据。例如,数据使用客户端的数据需求信息中包括数据表W的名称,则表明数据表W需要进行数据同步,则数据维护服务器根据本地数据库中的数据表W的数据更新情况,确定出该数据使用客户端的待同步更新数据,也就是数据使用客户端的数据表W需要同步的数据。数据维护服务器根据该数据使用客户端的数据库连接信息将待同步更新数据存入到该数据使用客户端的数据库的相应数据表或视图中,实现该数据使用客户端的数据同步。在此过程中,由于数据使用客户端通过数据维护服务器发布的数据同步需求申请网页向数据维护服务器发送数据需求信息和数据库连接信息,而数据维护服务器可以根据数据使用客户端发送的数据需求信息和数据库连接信息,对数据使用客户端进行数据同步,而不必在数据使用客户端安装专用软件,大大减少了在增加数据使用客户端时,维护人员的工作量;当数据使用客户端需要变更同步数据需求时,也不必更改数据使用客户端的软件,而是通过数据同步需求申请网页修改相关信息即可,更进一步减少了维护人员的工作量。After the data maintenance server obtains the data demand information and database connection information of the data user client, when a preset trigger condition is met, for example, the trigger condition can be preset as "the set data synchronization cycle arrives", Then, when the set data synchronization period arrives, according to the data demand information of the data usage client, the data to be updated synchronously of the data usage client is determined. For example, if the data request information of the data user client includes the name of the data table W, it indicates that the data table W needs to be synchronized with data, and the data maintenance server determines that the data user needs to update the data of the data table W in the local database. The data to be updated synchronously at the end, that is, the data using the data table W of the client needs to be synchronized. The data maintenance server stores the data to be updated synchronously into the corresponding data table or view of the database of the data user client according to the database connection information of the data user client, so as to realize the data synchronization of the data user client. During this process, since the data usage client sends the data requirement information and database connection information to the data maintenance server through the data synchronization requirement application webpage issued by the data maintenance server, the data maintenance server can send the data requirement information and database connection information according to the data usage client. Database connection information, data synchronization on the data client, without installing special software on the data client, greatly reducing the workload of maintenance personnel when increasing the data client; when the data client needs to change the synchronization data When required, there is no need to change the software of the data usage client, but to modify the relevant information through the data synchronization requirement application webpage, which further reduces the workload of maintenance personnel.

下面结合附图详细说明本发明实施例的技术方案。如图1所示的数据同步系统中包括:数据维护服务器101和至少一个数据使用客户端102。在数据维护服务器101端维护一个维护服务器101的本地数据库,各数据使用客户端102也都分别具有一个数据库,各数据使用客户端102中的数据库需要与数据维护服务器101的数据库进行数据同步的同步对象可能不一定相同。例如,数据使用客户端102中的数据使用客户端A的数据库中需要进行数据同步的同步对象为数据表A,则数据使用客户端A需要从数据维护服务器101获取数据表A的同步数据。也就是说,若数据维护服务器101的数据库的数据表A中有更新数据,则数据维护服务器101需要将更新数据发送给数据使用客户端A的数据表A,从而数据使用客户端A的数据库的数据表A实现数据同步。再如,数据使用客户端102中的数据使用客户端B的数据库中需要进行数据同步的同步对象为数据表B,则数据使用客户端B需要从数据维护服务器101获取数据表B的同步数据。也就是说,若数据维护服务器101的数据库的数据表B中有更新数据,则数据维护服务器101需要将更新数据发送给数据使用客户端B的数据表B,从而数据使用客户端B的数据库的数据表B实现数据同步。The technical solutions of the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. The data synchronization system shown in FIG. 1 includes: a data maintenance server 101 and at least one data usage client 102 . The local database of a maintenance server 101 is maintained at the data maintenance server 101 end, and each data usage client 102 also has a database respectively, and the database in each data usage client 102 needs to carry out data synchronization with the database of the data maintenance server 101 Objects may not necessarily be the same. For example, if the synchronization object in the database of the data usage client A in the data usage client 102 needs to be synchronized with data table A, then the data usage client A needs to obtain the synchronization data of the data table A from the data maintenance server 101 . That is to say, if there is updated data in the data table A of the database of the data maintenance server 101, then the data maintenance server 101 needs to send the updated data to the data table A of the data usage client A, so that the data usage of the database of the client A Data table A implements data synchronization. For another example, the data usage client B in the data usage client 102 needs to synchronize the data table B in the database of the data usage client B, then the data usage client B needs to obtain the synchronization data of the data table B from the data maintenance server 101 . That is to say, if there is updated data in the data table B of the database of the data maintenance server 101, the data maintenance server 101 needs to send the updated data to the data table B of the data usage client B, so that the data usage of the data table B of the client B's database Data table B implements data synchronization.

各数据使用客户端102通过数据维护服务器101发布的数据需求申请网页向数据维护服务器101发送本数据使用客户端102的数据需求申请信息。在数据使用客户端102发送的数据需求申请信息中包括了本数据使用客户端102的数据需求信息和数据库连接信息。Each data usage client 102 sends the data requirement application information of the data usage client 102 to the data maintenance server 101 through the data requirement application webpage issued by the data maintenance server 101 . The data requirement application information sent by the data usage client 102 includes the data requirement information and database connection information of the data usage client 102 .

数据维护服务器101获得了各数据使用客户端102的数据需求信息和数据库连接信息后,在触发条件满足时,根据各数据使用客户端102的数据需求信息,确定各数据使用客户端102的待同步更新数据;并根据各数据使用客户端102的数据库连接信息,分别与每个数据使用客户端102的数据库建立链接后,将该数据使用客户端102的待同步更新数据存入到该数据使用客户端102的数据库中,进行该数据使用客户端102的数据同步。After the data maintenance server 101 has obtained the data requirement information and the database connection information of each data usage client 102, when the trigger condition is satisfied, according to the data requirement information of each data usage client 102, determine each data usage client 102 to be synchronized. Update data; And use the database connection information of client 102 according to each data, after using the database of each data client 102 to set up a link respectively, this data uses client 102 to be stored in this data using client synchronously updated data In the database of the client 102, the data is synchronized using the client 102.

作为更优的实施方式,数据使用客户端102发送的数据需求申请信息中还可以包括本数据使用客户端102的标识信息。数据维护服务器101可以根据该数据使用客户端102的标识信息所对应的数据同步权限,对所述数据需求信息进行权限审核;若权限审核通过,数据维护服务器101将该数据使用客户端102标志为审核通过的数据使用客户端102,将该数据需求信息标志为审核通过的数据需求信息。那么,在触发条件满足时,数据维护服务器101根据各审核通过的数据使用客户端102的数据需求信息,分别确定各审核通过的数据使用客户端102的待同步更新数据;并根据各审核通过的数据使用客户端102的数据库连接信息,分别与每个审核通过的数据使用客户端102的数据库建立链接后,将该数据使用客户端102的待同步更新数据存入到该数据使用客户端102的数据库中,进行该数据使用客户端102的数据同步。As a more optimal implementation manner, the data request application information sent by the data usage client 102 may also include the identification information of the data usage client 102 . The data maintenance server 101 can perform permission review on the data requirement information according to the data synchronization permission corresponding to the identification information of the data usage client 102; if the permission review is passed, the data maintenance server 101 marks the data usage client 102 as The approved data usage client 102 marks the data requirement information as approved data requirement information. Then, when the trigger condition is satisfied, the data maintenance server 101 determines the data to be updated synchronously of each approved data usage client 102 according to the data demand information of each approved data usage client 102; The data uses the database connection information of the client 102, after setting up a link with the database of each approved data using the client 102 respectively, the data to be updated synchronously of the data using the client 102 is stored in the data using the client 102. In the database, the data is synchronized using the client 102 .

下面以其中一个数据使用客户端102为例,详细介绍该数据使用客户端102通过数据维护服务器101发布的数据同步需求申请网页向数据维护服务器101发送数据需求信息、数据维护服务器101根据该数据使用客户端102的数据需求信息对该数据使用客户端102进行数据同步的过程。图2所示的流程图显示了该数据使用客户端102通过数据维护服务器101发布的数据同步需求申请网页向数据维护服务器101发送数据需求信息、数据维护服务器101对该数据需求信息进行审核的方法流程,具体包括如下步骤:Taking one of the data usage clients 102 as an example below, the data usage client 102 sends the data requirement information to the data maintenance server 101 through the data synchronization demand application webpage issued by the data maintenance server 101, and the data maintenance server 101 uses the data according to the data maintenance server 101. The data requirement information of the client 102 uses the data synchronization process of the client 102 for the data. The flow chart shown in Fig. 2 has shown this data using client 102 to send data demand information to data maintenance server 101 through the data synchronization demand application webpage issued by data maintenance server 101, and the method that data maintenance server 101 checks this data demand information The process includes the following steps:

S201:数据使用客户端102通过数据维护服务器101发布的数据同步需求申请网页向数据维护服务器101发送数据需求申请信息。S201: The data usage client 102 sends data requirement application information to the data maintenance server 101 through the data synchronization requirement application webpage published by the data maintenance server 101 .

数据维护服务器101发布的数据同步需求申请网页,数据使用客户端102的用户可以从网页中输入数据需求申请信息。数据需求申请信息可以包括该数据使用客户端102的数据需求信息和数据库连接信息。The data synchronization requirement application webpage issued by the data maintenance server 101 allows the user of the data usage client 102 to input data requirement application information from the webpage. The data requirement application information may include the data requirement information and database connection information of the data usage client 102 .

数据需求信息中具体包括了该数据使用客户端102需要进行数据同步的各同步对象的信息,比如同步对象的信息包括需要进行数据同步的数据表的名称或需进行数据同步的视图的名称;或者,同步对象的信息还可进一步包括需要进行数据同步的数据表之中需进行数据同步的列的名称,或需要进行数据同步的数据表之中需进行数据同步的行的名称;或者,同步对象的信息还可进一步包括需要进行数据同步的视图之中需进行数据同步的列的名称,或需要进行数据同步的视图之中需进行数据同步的行的名称。The data requirement information specifically includes the information of each synchronization object that the data user client 102 needs to perform data synchronization, for example, the information of the synchronization object includes the name of the data table that needs to be synchronized or the name of the view that needs to be synchronized; or , the information of the synchronization object can further include the name of the column that needs to be synchronized in the data table that needs to be synchronized, or the name of the row that needs to be synchronized in the data table that needs to be synchronized; or, the synchronization object The information may further include the name of the column to be synchronized in the view to be synchronized, or the name of the row to be synchronized in the view to be synchronized.

例如,数据维护服务器101中存储的单位数据表包括有单位1、单位2、...、单位n的单位名称、单位地址、单位电话、单位联系人的数据,数据使用客户端102需要对单位1和单位3的单位名称、单位地址进行数据同步,则该数据使用客户端102的数据需求信息的同步对象的信息包括:需要进行数据同步的数据表的名称——单位数据表、单位数据表之中需进行数据同步的行的名称——单位1和单位3、单位数据表之中需进行数据同步的列的名称——单位名称、单位地址。For example, the unit data table stored in the data maintenance server 101 includes unit 1, unit 2, ..., unit n's unit name, unit address, unit phone number, and unit contact data. 1 and unit 3's unit name and unit address for data synchronization, then the data uses the information of the synchronization object of the data demand information of the client 102 to include: the name of the data table that needs to be synchronized - unit data table, unit data table The name of the row that needs to be synchronized with data - unit 1 and unit 3, the name of the column that needs to be synchronized with data in the unit data table - unit name, unit address.

进一步,数据需求信息中还可以包括针对每个同步对象记录的前次同步时间信息,每个同步对象的前次同步时间信息用以指示该同步对象在进行上次数据同步时最新数据的更新时间。Further, the data requirement information may also include the previous synchronization time information recorded for each synchronization object, and the previous synchronization time information of each synchronization object is used to indicate the update time of the latest data of the synchronization object during the last data synchronization .

S202:数据维护服务器101根据数据使用客户端102发送的数据需求申请信息进行权限审核;若审核通过,执行步骤S203;否则,执行步骤S204。S202: The data maintenance server 101 performs authority verification according to the data requirement application information sent by the data usage client 102; if the verification is passed, execute step S203; otherwise, execute step S204.

在数据使用客户端102发送的数据需求申请信息中还包括该数据使用客户端102的标识信息,用以唯一标识出该数据使用客户端102,表明该数据使用客户端102的用户的身份。该数据使用客户端102的标识信息可以包括该数据使用客户端102的用户名、密码等信息。The data request application information sent by the data usage client 102 also includes the identification information of the data usage client 102 to uniquely identify the data usage client 102 and indicate the identity of the user of the data usage client 102 . The identification information of the data usage client 102 may include information such as the user name and password of the data usage client 102 .

对数据使用客户端102发送的数据需求申请信息进行权限审核既可以通过管理人员以人工方式进行审核,也可以是数据维护服务器101根据权限列表进行自动审核:The permission review of the data demand application information sent by the data usage client 102 can be manually reviewed by managers, or the data maintenance server 101 can automatically review according to the permission list:

在数据维护服务器101中维护一权限列表,该权限列表中针对每个数据使用客户端102的标识信息对应记录了该数据使用客户端102的数据同步权限,即该数据使用客户端102被授权允许进行数据同步的同步对象的权限。A permission list is maintained in the data maintenance server 101, and the identification information of each data usage client 102 is correspondingly recorded in the permission list as the data synchronization permission of the data usage client 102, that is, the data usage client 102 is authorized to allow The permission of the synchronization object for data synchronization.

数据维护服务器101根据权限列表对数据需求申请信息中的数据需求信息进行权限审核。具体地,数据维护服务器101根据该数据使用客户端102的标识信息在权限列表中查找到相应的数据同步权限,确定该数据使用客户端102的数据需求信息的同步对象是否在授权的数据同步权限范围内;如果在,则确定该数据使用客户端102发送的数据需求申请信息通过权限审核,执行步骤S203;否则,确定该数据使用客户端102发送的数据需求申请信息没通过权限审核,执行步骤S204。The data maintenance server 101 checks the authority of the data requirement information in the data requirement application information according to the authority list. Specifically, the data maintenance server 101 finds the corresponding data synchronization permission in the permission list according to the identification information of the data usage client 102, and determines whether the synchronization object of the data requirement information of the data usage client 102 is within the authorized data synchronization permission. within the scope; if yes, then determine that the data request information sent by the data usage client 102 has passed the authority review, and perform step S203; S204.

例如,上述的数据使用客户端102的数据需求信息的同步对象的信息包括:单位数据表、单位数据表的单位1和单位3、单位数据表的单位名称、单位地址。如果在权限列表中记录了该数据使用客户端102所被授权允许进行数据同步的同步对象的权限包括:单位数据表、单位数据表的单位1-5、单位数据表的单位名称、单位地址、单位电话。由此,可以确定该数据使用客户端102的数据需求信息具有数据同步的权限,该数据使用客户端102的数据需求申请信息通过权限审核。For example, the above-mentioned synchronization object information of the data requirement information of the data usage client 102 includes: unit data table, unit 1 and unit 3 in the unit data table, unit name and unit address in the unit data table. If it is recorded in the authority list that the authority of the synchronization object authorized by the client 102 to allow data synchronization includes: the unit data table, the unit 1-5 of the unit data table, the unit name of the unit data table, the unit address, work phone. Thus, it can be determined that the data requirement information of the data usage client 102 has the data synchronization authority, and the data requirement application information of the data usage client 102 has passed the authority review.

如果权限列表中记录了该数据使用客户端102所被授权允许进行数据同步的同步对象的权限仅包括:单位数据表、单位数据表的单位1、单位数据表的单位名称、单位地址。那么,可以确定该数据使用客户端102没有权限进行单位3的相关数据的同步,因此,确定该数据使用客户端102的数据需求申请信息不能通过权限审核。If the data is recorded in the permission list, the permission of the synchronization object authorized by the client 102 to perform data synchronization only includes: unit data table, unit 1 of the unit data table, unit name and unit address of the unit data table. Then, it can be determined that the data usage client 102 has no authority to synchronize the relevant data of the unit 3, therefore, it is determined that the data requirement application information of the data usage client 102 cannot pass the authority review.

在数据维护服务器101对该数据使用客户端102发送的数据需求申请信息进行权限审核的过程中,数据维护服务器101将该数据使用客户端102的状态标志为正在审核中。该数据使用客户端102可以通过数据维护服务器101发布的数据同步需求申请网页查询到该状态。In the process of the data maintenance server 101 checking the authority of the data requirement application information sent by the data usage client 102, the data maintenance server 101 marks the status of the data usage client 102 as under review. The data usage client 102 can query the status through the data synchronization demand application webpage published by the data maintenance server 101 .

S203:数据维护服务器101对数据使用客户端102发送的数据需求申请信息审核通过后,将该数据使用客户端102标志为审核通过的数据使用客户端102。S203: After the data maintenance server 101 approves the data demand application information sent by the data usage client 102, it marks the data usage client 102 as a data usage client 102 that has passed the review.

具体地,数据维护服务器101对数据使用客户端102发送的数据需求申请信息审核通过后,将该数据使用客户端102发送的数据需求申请信息标志为审核通过状态,将该数据使用客户端102标志为审核通过的数据使用客户端102,将该数据使用客户端102的数据需求信息标志为审核通过的数据需求信息。该数据使用客户端102可以通过数据维护服务器101发布的数据同步需求申请网页查询到审核通过的状态。Specifically, after the data maintenance server 101 approves the data requirement application information sent by the data usage client 102, it marks the data requirement application information sent by the data usage client 102 as approved status, and marks the data usage client 102 as approved. For the approved data use client 102, mark the data demand information of the data use client 102 as approved data demand information. The data usage client 102 can query the approval status through the data synchronization requirement application web page published by the data maintenance server 101 .

S204:数据维护服务器101确定数据使用客户端102发送的数据需求申请信息没有通过审核,则将数据使用客户端102发送的数据需求申请信息标志为审核未通过状态。该数据使用客户端102可以通过数据维护服务器101发布的数据同步需求申请网页查询到审核未通过的状态。S204: The data maintenance server 101 determines that the data requirement application information sent by the data usage client 102 has not passed the review, and then marks the data requirement application information sent by the data usage client 102 as a status of not passing the review. The data usage client 102 can inquire about the failed status through the data synchronization requirement application web page published by the data maintenance server 101 .

当数据使用客户端102需要修改数据需求信息时,也可以通过访问数据同步需求申请网页修改相关信息,重新向数据维护服务器101发送数据需求申请信息;之后的过程与上述步骤S201-S204的过程一样,此处不再赘述。因此,数据使用客户端102的需要进行同步的同步对象发生改变时,只需在数据同步需求申请网页修改相关信息,重新向数据维护服务器101发送数据需求申请信息进行审核即可,而不必更改数据使用客户端102的任何软件,或对数据使用客户端102的任何软件重新配置,进一步提高了使用效率。When the data usage client 102 needs to revise the data requirement information, it can also revise relevant information by accessing the data synchronization requirement application webpage, and resend the data requirement application information to the data maintenance server 101; the subsequent process is the same as that of the above-mentioned steps S201-S204 , which will not be repeated here. Therefore, when the synchronization object that needs to be synchronized by the data user client 102 changes, it is only necessary to modify the relevant information on the data synchronization requirement application webpage, and resend the data requirement application information to the data maintenance server 101 for review without changing the data. Using any software of the client 102, or reconfiguring the data using any software of the client 102, further improves usage efficiency.

在数据维护服务器101获得了数据使用客户端102的数据需求信息以及数据库连接信息后,对该数据使用客户端102进行数据同步。较优的是,数据维护服务器101获得了数据使用客户端102的数据需求信息以及数据库连接信息,并对获得的数据需求信息审核通过后,对该数据使用客户端102进行数据同步。图3示出了数据维护服务器101根据数据使用客户端102的数据需求信息以及数据库连接信息,对该数据使用客户端102进行数据同步的具体方法流程,包括如下步骤:After the data maintenance server 101 obtains the data requirement information and the database connection information of the data usage client 102 , it performs data synchronization on the data usage client 102 . Preferably, the data maintenance server 101 obtains the data requirement information and the database connection information of the data usage client 102, and performs data synchronization on the data usage client 102 after the obtained data requirement information is approved. Fig. 3 shows that the data maintenance server 101 performs data synchronization according to the data requirement information and the database connection information of the data usage client 102 by the data maintenance server 101, including the following steps:

S301:当预设的触发条件满足时,数据维护服务器101根据数据使用客户端102的数据需求信息,开始对数据使用客户端102数据进行同步。S301: When the preset trigger condition is satisfied, the data maintenance server 101 starts to synchronize the data of the data usage client 102 according to the data demand information of the data usage client 102 .

具体地,当预设的触发条件满足时,数据维护服务器101根据各数据使用客户端102的数据需求信息,开始对各数据使用客户端102数据进行同步。Specifically, when the preset trigger condition is satisfied, the data maintenance server 101 starts to synchronize the data of each data usage client 102 according to the data demand information of each data usage client 102 .

较佳地,当预设的触发条件满足时,数据维护服务器101根据各审核通过的数据使用客户端102的数据需求信息,开始对各审核通过的数据使用客户端102进行数据同步。下面各步骤以数据维护服务器101对其中一个数据使用客户端102进行数据同步为例讲述具体过程。Preferably, when the preset trigger condition is satisfied, the data maintenance server 101 starts data synchronization for each approved data usage client 102 according to the data requirement information of each approved data usage client 102 . The following steps take the data maintenance server 101 performing data synchronization on one of the data using the client 102 as an example to describe the specific process.

本领域技术人员可以根据具体情况预设触发条件。例如,预设的触发条件为:设定的数据同步周期到达;即设定的数据同步周期到达时,数据维护服务器101根据数据使用客户端102的数据需求信息,开始对数据使用客户端102数据进行同步。Those skilled in the art can preset trigger conditions according to specific situations. For example, the preset trigger condition is: the set data synchronization period arrives; that is, when the set data synchronization period arrives, the data maintenance server 101 starts to use the data of the data usage client 102 according to the data demand information of the data usage client 102. to sync.

或者,预设的触发条件为:数据维护服务器的数据库中有更新的数据;即数据维护服务器的数据库中有更新的数据时,将触发数据维护服务器101根据数据使用客户端102的数据需求信息,开始对数据使用客户端102数据进行同步。Or, the preset trigger condition is: there is updated data in the database of the data maintenance server; that is, when there is updated data in the database of the data maintenance server, the data maintenance server 101 will be triggered to use the data demand information of the client 102 according to the data, Synchronization of data using client 102 data begins.

或者,预设的触发条件为:在本次数据同步周期之内所述数据维护服务器的数据库中有更新的数据,且本次数据同步周期到达;即当数据同步周期到达时,若判断出本次数据同步周期之内数据维护服务器的数据库中有更新的数据,则触发数据维护服务器101根据数据使用客户端102的数据需求信息,开始对数据使用客户端102数据进行同步。Alternatively, the preset trigger condition is: there is updated data in the database of the data maintenance server within this data synchronization period, and this data synchronization period arrives; that is, when the data synchronization period arrives, if it is determined that this If there is updated data in the database of the data maintenance server within the second data synchronization period, the data maintenance server 101 is triggered to start synchronizing the data of the data usage client 102 according to the data requirement information of the data usage client 102 .

再或者,预设的触发条件还包括:确定数据使用客户端102发送的数据需求申请信息通过审核;即确定数据使用客户端102发送的数据需求申请信息通过审核时,触发数据维护服务器101根据该数据使用客户端102的数据需求信息,开始对该数据使用客户端102数据进行同步。Alternatively, the preset trigger condition also includes: determining that the data request application information sent by the data usage client 102 has passed the review; Based on the data requirement information of the data usage client 102, the data synchronization of the data usage client 102 starts.

S302:数据维护服务器101根据数据使用客户端102的数据需求信息,确定该数据使用客户端的待同步更新数据。S302: The data maintenance server 101 determines the data to be updated synchronously of the data usage client 102 according to the data demand information of the data usage client 102.

具体地,数据维护服务器101根据数据使用客户端102的数据需求信息中的各同步对象的信息以及各同步对象的前次同步时间信息,确定该数据使用客户端的待同步更新数据:Specifically, the data maintenance server 101 determines, according to the information of each synchronization object in the data demand information of the data usage client 102 and the previous synchronization time information of each synchronization object, the data to be updated by the data usage client:

数据维护服务器101根据数据使用客户端102的数据需求信息中的同步对象信息确定本地数据库中对应的数据表或视图;The data maintenance server 101 determines the corresponding data table or view in the local database according to the synchronization object information in the data demand information of the data usage client 102;

数据维护服务器101根据数据使用客户端102的数据需求信息中的同步对象的前次同步时间信息,可以从对应的数据表或视图中确定此次数据同步过程中需要向数据使用客户端102发送的新的同步数据,即待同步更新数据。According to the previous synchronization time information of the synchronization object in the data requirement information of the data usage client 102, the data maintenance server 101 can determine from the corresponding data table or view the information that needs to be sent to the data usage client 102 during this data synchronization process. New synchronous data, that is, the data to be updated synchronously.

例如,数据使用客户端102的数据需求信息中的一个同步对象的信息为单位数据表、单位数据表的单位1、单位数据表的单位名称、单位地址;该同步对象的前次同步时间信息为2012-3-15。数据维护服务器101根据同步对象的信息确定出本地数据库中对应的单位数据表;并根据该同步对象的前次同步时间信息将单位数据表中的在2012年3月15日以后更新的单位1的单位名称、单位地址数据作为该数据使用客户端102此次数据同步过程中的待同步更新数据。在实际应用中,数据维护服务器101可以根据数据的时间戳来确定该数据的更新时间。For example, the information of a synchronization object in the data demand information of the data user client 102 is the unit data table, the unit 1 of the unit data table, the unit name and the unit address of the unit data table; the previous synchronization time information of the synchronization object is 2012-3-15. The data maintenance server 101 determines the corresponding unit data table in the local database according to the information of the synchronization object; The unit name and unit address data are used as the data to be updated during the data synchronization process of the client 102 . In practical applications, the data maintenance server 101 may determine the update time of the data according to the time stamp of the data.

在确定了数据使用客户端的某个同步对象的待同步更新数据后,数据维护服务器101根据该待同步更新数据的时间信息更新该数据使用客户端102的数据需求信息中针对该同步对象记录的前次同步时间信息。例如,数据维护服务器101确定出某个同步对象的待同步更新数据的最新的时间戳为2012-5-15,则将该同步对象记录的前次同步时间信息更新为2012-5-15。那么在进行下次数据同步时,数据维护服务器101可以根据更新为2012-5-15的该同步对象记录的前次同步时间信息,而确定将2012年5月15日以后更新的数据作为该同步对象的待同步更新数据。After determining the data to be synchronized and updated of a synchronization object of the data usage client, the data maintenance server 101 updates the previous data recorded for the synchronization object in the data requirement information of the data usage client 102 according to the time information of the data to be synchronized and updated. Secondary synchronization time information. For example, the data maintenance server 101 determines that the latest timestamp of the data to be synchronized and updated for a certain synchronization object is 2012-5-15, and updates the previous synchronization time information recorded by the synchronization object to 2012-5-15. Then, when performing the next data synchronization, the data maintenance server 101 can determine the data updated after May 15, 2012 as the synchronization time information according to the previous synchronization time information of the synchronization object record updated to 2012-5-15. The object's data to be updated synchronously.

S303:数据维护服务器101根据该数据使用客户端102的数据库连接信息,与该数据使用客户端102的数据库建立链接。S303: The data maintenance server 101 establishes a link with the database of the data usage client 102 according to the database connection information of the data usage client 102 .

数据使用客户端102的数据库连接信息可以包括:该数据使用客户端102的IP地址、端口号、该数据使用客户端102的数据库名称、数据库用户名、数据库密码等。The database connection information of the data usage client 102 may include: the IP address and port number of the data usage client 102, the database name of the data usage client 102, the database user name, the database password, and the like.

数据维护服务器101可以根据数据使用客户端102的数据库连接信息与数据使用客户端102的数据库建立起dblink连接(数据库链接)。The data maintenance server 101 can establish a dblink connection (database link) with the database of the data usage client 102 according to the database connection information of the data usage client 102 .

S304:数据维护服务器101将待同步更新数据存入到该数据使用客户端102的数据库中,实现该数据使用客户端102的数据同步。S304: The data maintenance server 101 stores the data to be updated into the database of the data usage client 102, so as to realize the data synchronization of the data usage client 102.

数据维护服务器101与该数据使用客户端102的数据库建立链接后,将上述步骤S302中确定的待同步更新数据写入到该数据使用客户端102的数据库的对应的数据表中,从而实现了该数据使用客户端102的数据同步。After the data maintenance server 101 establishes a link with the database of the data usage client 102, it writes the data to be updated synchronously determined in the above step S302 into the corresponding data table of the database of the data usage client 102, thereby realizing the Data is synchronized using client 102 data.

本发明实施例由于数据使用客户端通过数据维护服务器发布的数据同步需求申请网页向数据维护服务器发送数据需求信息和数据库连接信息,而数据维护服务器可以根据数据使用客户端发送的数据需求信息和数据库连接信息,对数据使用客户端进行数据同步,而不必在数据使用客户端安装专用软件,大大减少了在增加数据使用客户端时,维护人员的工作量;当数据使用客户端需要变更同步数据需求时,也不必更改数据使用客户端的软件,而是通过数据同步需求申请网页修改相关信息即可,更进一步减少了维护人员的工作量。In the embodiment of the present invention, since the data usage client sends data requirement information and database connection information to the data maintenance server through the data synchronization requirement application web page released by the data maintenance server, the data maintenance server can send the data requirement information and database connection information according to the data usage client. Connection information, data synchronization on the data client, without installing special software on the data client, greatly reducing the workload of maintenance personnel when increasing the data client; when the data client needs to change the synchronization data requirements At the same time, it is not necessary to change the software of the data usage client, but to modify the relevant information through the data synchronization requirement application webpage, which further reduces the workload of maintenance personnel.

进一步,数据维护服务器通过数据同步需求申请网页获取了数据使用客户端发送的数据需求申请信息后还可以对该数据需求申请信息进行权限审核,审核通过后才向该数据使用客户端发送同步数据。完善了数据同步系统的审核功能,保证了数据使用客户端按权按需获取数据,从而确保了数据的使用安全。并且,方便了对数据使用客户端的审核,减少了维护人员的审核工作。Furthermore, after the data maintenance server obtains the data request application information sent by the data user client through the data synchronization request application web page, it can also perform permission review on the data request application information, and only after the review is passed, it sends the synchronization data to the data user client. The audit function of the data synchronization system has been improved to ensure that data users can obtain data according to their rights and needs, thereby ensuring the safety of data use. In addition, it facilitates the auditing of data usage clients and reduces the auditing work of maintenance personnel.

进一步,当数据使用客户端102的需要进行同步的同步对象发生改变时,只需在数据同步需求申请网页修改相关信息,重新向数据维护服务器101发送数据需求申请信息进行审核即可,而不必更改数据使用客户端102的任何软件,或对数据使用客户端102的任何软件重新配置,进一步提高了使用效率。Furthermore, when the synchronization object that needs to be synchronized by the data user client 102 changes, it is only necessary to modify the relevant information on the data synchronization requirement application webpage, and resend the data requirement application information to the data maintenance server 101 for review, without changing Any software of the data usage client 102, or any software reconfiguration of the data usage client 102, further improves usage efficiency.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读取存储介质中,如:ROM/RAM、磁碟、光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the method of the above-mentioned embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, such as: ROM/RAM, Diskettes, CDs, etc.

以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以作出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above is only a preferred embodiment of the present invention, it should be pointed out that for those of ordinary skill in the art, without departing from the principle of the present invention, some improvements and modifications can also be made, and these improvements and modifications should also be It is regarded as the protection scope of the present invention.

Claims (10)

1.一种数据同步方法,包括:1. A data synchronization method, comprising: 数据维护服务器在触发条件满足时,根据数据使用客户端的数据需求信息,确定该数据使用客户端的待同步更新数据;When the trigger condition is satisfied, the data maintenance server determines the data to be updated synchronously of the data user client according to the data demand information of the data user client; 所述数据维护服务器根据所述数据使用客户端的数据库连接信息,与所述数据使用客户端的数据库建立链接后,将所述待同步更新数据存入到所述数据使用客户端的数据库中,进行所述数据使用客户端的数据同步;After the data maintenance server establishes a link with the database of the data usage client according to the database connection information of the data usage client, the data to be updated synchronously is stored in the database of the data usage client, and the The data is synchronized with the data of the client; 其中,所述数据需求信息和数据库连接信息包括在数据需求申请信息中,所述数据需求申请信息是由所述数据使用客户端通过所述数据维护服务器发布的数据需求申请网页发送到所述数据维护服务器的。Wherein, the data requirement information and database connection information are included in the data requirement application information, and the data requirement application information is sent to the data by the data usage client through the data requirement application webpage published by the data maintenance server. maintenance server. 2.如权利要求1所述的方法,其特征在于,所述数据需求申请信息中还包括数据使用客户端的标识信息;以及,2. The method according to claim 1, wherein the data requirement application information further includes identification information of the data usage client; and, 在所述数据使用客户端通过所述数据维护服务器发布的数据需求申请网页将所述数据需求申请信息发送到所述数据维护服务器后,还包括:After the data usage client sends the data demand application information to the data maintenance server through the data demand application webpage issued by the data maintenance server, it also includes: 所述数据维护服务器根据该数据使用客户端的标识信息所对应的数据同步权限,对所述数据需求信息进行权限审核;若权限审核通过,所述数据维护服务器将所述数据需求信息标志为审核通过的数据需求信息;以及The data maintenance server performs a permission review on the data requirement information according to the data synchronization permission corresponding to the identification information of the data usage client; if the permission review passes, the data maintenance server marks the data requirement information as approved information on data requirements; and 所述根据数据使用客户端的数据需求信息,确定该数据使用客户端的待同步更新数据具体为:根据该数据使用客户端的标志为审核通过的数据需求信息,确定该数据使用客户端的待同步更新数据。According to the data requirement information of the data usage client, determining the data to be updated synchronously of the data usage client is specifically: according to the data requirement information whose flag of the data usage client is approved, determining the data to be updated synchronously of the data usage client. 3.如权利要求1或2所述的方法,其特征在于,所述数据需求信息具体包括同步对象的信息以及针对每个同步对象记录的前次同步时间信息;以及3. The method according to claim 1 or 2, wherein the data requirement information specifically includes the information of the synchronization object and the previous synchronization time information recorded for each synchronization object; and 所述根据数据使用客户端的数据需求信息,确定该数据使用客户端的待同步更新数据具体包括:According to the data demand information of the data usage client, determining the data to be updated synchronously of the data usage client specifically includes: 所述数据维护服务器根据所述数据需求信息中的各同步对象的信息以及各同步对象的前次同步时间信息,分别针对每个同步对象,确定该同步对象的待同步更新数据;以及The data maintenance server, according to the information of each synchronization object in the data requirement information and the previous synchronization time information of each synchronization object, respectively, for each synchronization object, determines the data to be updated for synchronization of the synchronization object; and 在所述确定该同步对象的待同步更新数据之后,还包括:After the determination of the synchronization update data of the synchronization object, it also includes: 根据该同步对象的待同步更新数据的时间信息,更新所述数据需求信息中针对该同步对象记录的前次同步时间信息。The previous synchronization time information recorded for the synchronization object in the data requirement information is updated according to the time information of the synchronization object's data to be updated synchronously. 4.如权利要求3所述的方法,其特征在于,所述同步对象的信息具体包括需进行数据同步的数据表的名称或需进行数据同步的视图的名称。4. The method according to claim 3, wherein the information of the synchronization object specifically includes a name of a data table to be synchronized or a name of a view to be synchronized. 5.如权利要求4所述的方法,其特征在于,所述同步对象的信息还包括:所述数据表中需进行数据同步的列的名称或所述数据表中需进行数据同步的行的名称。5. The method according to claim 4, wherein the information of the synchronization object further comprises: the name of the column to be synchronized in the data table or the row name of the row to be synchronized in the data table name. 6.如权利要求3所述的方法,其特征在于,所述数据库连接信息包括:所述数据使用客户端的IP地址、端口号、数据库名称、数据库用户名、数据库密码。6 . The method according to claim 3 , wherein the database connection information comprises: the IP address, port number, database name, database user name, and database password of the data user client. 7 . 7.如权利要求3所述的方法,其特征在于,所述触发条件具体为:7. The method according to claim 3, wherein the trigger condition is specifically: 设定的数据同步周期到达;或者,The set data synchronization cycle arrives; or, 所述数据维护服务器的数据库中有更新的数据;或者,There is updated data in the database of the data maintenance server; or, 在本次数据同步周期之内所述数据维护服务器的数据库中有更新的数据,且本次数据同步周期到达。There is updated data in the database of the data maintenance server within this data synchronization period, and this data synchronization period arrives. 8.一种数据同步系统,包括:数据维护服务器和至少一个数据使用客户端;8. A data synchronization system, comprising: a data maintenance server and at least one data usage client; 所述数据维护服务器用于在触发条件满足时,根据各数据使用客户端的数据需求信息,确定各数据使用客户端的待同步更新数据;并根据各数据使用客户端的数据库连接信息,分别与每个数据使用客户端的数据库建立链接后,将该数据使用客户端的待同步更新数据存入到该数据使用客户端的数据库中,进行该数据使用客户端的数据同步;The data maintenance server is used to determine the data to be updated synchronously of each data user client according to the data demand information of each data user client when the trigger condition is met; After the database of the client is used to establish a link, the data to be updated by the client of the data is stored in the database of the client of the data, and the data of the client of the data is synchronized; 其中,每个数据使用客户端的数据需求信息和数据库连接信息包括在该数据使用客户端的数据需求申请信息中,该数据使用客户端的数据需求申请信息是由该数据使用客户端通过所述数据维护服务器发布的数据需求申请网页发送到所述数据维护服务器的。Wherein, the data requirement information and database connection information of each data usage client are included in the data requirement application information of the data usage client, and the data requirement application information of the data usage client is provided by the data usage client through the data maintenance server The published web page of data demand application is sent to the data maintenance server. 9.如权利要求8所述的系统,其特征在于,所述数据需求申请信息中还包括数据使用客户端的标识信息;以及,9. The system according to claim 8, wherein the data requirement application information further includes identification information of the data usage client; and, 所述数据维护服务器还用于根据该数据使用客户端的标识信息所对应的数据同步权限,对所述数据需求信息进行权限审核;若权限审核通过,所述数据维护服务器确定该数据使用客户端为审核通过的数据使用客户端;以及The data maintenance server is further configured to perform permission review on the data requirement information according to the data synchronization permission corresponding to the identification information of the data usage client; if the permission review is passed, the data maintenance server determines that the data usage client is Approved data usage clients; and 所述数据维护服务器根据各数据使用客户端的数据需求信息,确定各数据使用客户端的待同步更新数据具体为:According to the data demand information of each data user client, the data maintenance server determines that the data to be updated synchronously of each data user client is specifically: 所述数据维护服务器根据各审核通过的数据使用客户端的数据需求信息,分别确定各审核通过的数据使用客户端的待同步更新数据。The data maintenance server respectively determines the data to be updated synchronously of each approved data usage client according to the data requirement information of each approved data usage client. 10.如权利要求9所述的系统,其特征在于,所述数据维护服务器根据各数据使用客户端的数据库连接信息,分别与每个数据使用客户端的数据库建立链接后,将该数据使用客户端的待同步更新数据存入到该数据使用客户端的数据库具体为:10. The system according to claim 9, wherein the data maintenance server establishes a link with the database of each data usage client according to the database connection information of each data usage client, and then the data usage client's standby Synchronous update data is stored in the database of the client using the data as follows: 所述数据维护服务器根据各审核通过的数据使用客户端的数据库连接信息,分别与每个审核通过的数据使用客户端的数据库建立链接后,将该数据使用客户端的待同步更新数据存入到该数据使用客户端的数据库中。According to the database connection information of each approved data user client, the data maintenance server establishes a link with the database of each approved data user client respectively, and stores the data to be updated synchronously of the data user client into the data user in the client's database.
CN201210164636.0A 2012-05-24 2012-05-24 Method of data synchronization and system Active CN102724295B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210164636.0A CN102724295B (en) 2012-05-24 2012-05-24 Method of data synchronization and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210164636.0A CN102724295B (en) 2012-05-24 2012-05-24 Method of data synchronization and system

Publications (2)

Publication Number Publication Date
CN102724295A true CN102724295A (en) 2012-10-10
CN102724295B CN102724295B (en) 2016-05-18

Family

ID=46949956

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210164636.0A Active CN102724295B (en) 2012-05-24 2012-05-24 Method of data synchronization and system

Country Status (1)

Country Link
CN (1) CN102724295B (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104166820A (en) * 2013-05-16 2014-11-26 北京畅游天下网络技术有限公司 Data management method and system
CN104252452A (en) * 2013-06-25 2014-12-31 腾讯科技(深圳)有限公司 Data management method and device
CN104796389A (en) * 2014-01-21 2015-07-22 上海联影医疗科技有限公司 Basic data sharing system and method thereof
CN105025110A (en) * 2015-07-31 2015-11-04 中冶南方工程技术有限公司 Multi-client data modification message accurate push method
CN105117423A (en) * 2015-07-31 2015-12-02 中冶南方工程技术有限公司 Independent choice response method of database modification on the basis of intelligent agent
CN105468637A (en) * 2014-09-05 2016-04-06 北京联嘉众赢网络技术有限公司 Database updating method and apparatus
CN106202387A (en) * 2016-07-08 2016-12-07 陈光宇 A kind of data consistency concurrent maintenance method
CN107798038A (en) * 2017-05-05 2018-03-13 平安科技(深圳)有限公司 Data response method and data response apparatus
CN108093002A (en) * 2016-11-21 2018-05-29 腾讯科技(深圳)有限公司 Based on the synchronous method and device of the information to be synchronized that data mode determines
WO2018126390A1 (en) * 2017-01-05 2018-07-12 深圳市前海中康汇融信息技术有限公司 Trigger-based database synchronization system
WO2018126391A1 (en) * 2017-01-05 2018-07-12 深圳市前海中康汇融信息技术有限公司 Trigger-based database synchronization method
CN108664497A (en) * 2017-03-30 2018-10-16 大有秦鼎(北京)科技有限公司 The method and apparatus of Data Matching
CN111107145A (en) * 2019-12-17 2020-05-05 青岛希望鸟科技有限公司 Online synchronous communication system based on HTML5 webpage
CN117994884A (en) * 2024-01-09 2024-05-07 浩云科技股份有限公司 Method and system for changing access control authority information

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007075099A1 (en) * 2005-12-27 2007-07-05 Siemens Aktiengesellschaft Automation network, access service proxy for automation network method for transmitting operating between programmable controller remote computer
CN102057354A (en) * 2008-06-08 2011-05-11 苹果公司 Obtain technology updates to the application
CN102202073A (en) * 2010-03-24 2011-09-28 杭州华三通信技术有限公司 Distributed system and data synchronization method thereof
CN102255967A (en) * 2011-07-11 2011-11-23 宇龙计算机通信科技(深圳)有限公司 Synchronizing method, device, server and synchronizing system
CN102469123A (en) * 2010-11-09 2012-05-23 腾讯科技(深圳)有限公司 System and method for synchronizing online game data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007075099A1 (en) * 2005-12-27 2007-07-05 Siemens Aktiengesellschaft Automation network, access service proxy for automation network method for transmitting operating between programmable controller remote computer
CN102057354A (en) * 2008-06-08 2011-05-11 苹果公司 Obtain technology updates to the application
CN102202073A (en) * 2010-03-24 2011-09-28 杭州华三通信技术有限公司 Distributed system and data synchronization method thereof
CN102469123A (en) * 2010-11-09 2012-05-23 腾讯科技(深圳)有限公司 System and method for synchronizing online game data
CN102255967A (en) * 2011-07-11 2011-11-23 宇龙计算机通信科技(深圳)有限公司 Synchronizing method, device, server and synchronizing system

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104166820A (en) * 2013-05-16 2014-11-26 北京畅游天下网络技术有限公司 Data management method and system
CN104166820B (en) * 2013-05-16 2017-09-29 北京畅游天下网络技术有限公司 A kind of data managing method and system
CN104252452A (en) * 2013-06-25 2014-12-31 腾讯科技(深圳)有限公司 Data management method and device
CN104252452B (en) * 2013-06-25 2019-03-15 腾讯科技(深圳)有限公司 The method and device of data management
CN104796389A (en) * 2014-01-21 2015-07-22 上海联影医疗科技有限公司 Basic data sharing system and method thereof
CN105468637A (en) * 2014-09-05 2016-04-06 北京联嘉众赢网络技术有限公司 Database updating method and apparatus
CN105117423A (en) * 2015-07-31 2015-12-02 中冶南方工程技术有限公司 Independent choice response method of database modification on the basis of intelligent agent
CN105025110B (en) * 2015-07-31 2018-05-08 中冶南方工程技术有限公司 A kind of multi-client data changes the accurate method for pushing of message
CN105117423B (en) * 2015-07-31 2018-08-21 中冶南方工程技术有限公司 A kind of autonomous Response to selection method of databases comparison based on intelligent body
CN105025110A (en) * 2015-07-31 2015-11-04 中冶南方工程技术有限公司 Multi-client data modification message accurate push method
CN106202387B (en) * 2016-07-08 2019-05-21 苏州超块链信息科技有限公司 A kind of data consistency concurrent maintenance method
CN106202387A (en) * 2016-07-08 2016-12-07 陈光宇 A kind of data consistency concurrent maintenance method
CN108093002B (en) * 2016-11-21 2020-09-25 腾讯科技(深圳)有限公司 Synchronization method and device of information to be synchronized based on data state determination
CN108093002A (en) * 2016-11-21 2018-05-29 腾讯科技(深圳)有限公司 Based on the synchronous method and device of the information to be synchronized that data mode determines
WO2018126390A1 (en) * 2017-01-05 2018-07-12 深圳市前海中康汇融信息技术有限公司 Trigger-based database synchronization system
WO2018126391A1 (en) * 2017-01-05 2018-07-12 深圳市前海中康汇融信息技术有限公司 Trigger-based database synchronization method
CN108664497A (en) * 2017-03-30 2018-10-16 大有秦鼎(北京)科技有限公司 The method and apparatus of Data Matching
CN108664497B (en) * 2017-03-30 2020-11-03 大有秦鼎(北京)科技有限公司 Data matching method and device
CN107798038B (en) * 2017-05-05 2020-02-14 平安科技(深圳)有限公司 Data response method and data response equipment
CN107798038A (en) * 2017-05-05 2018-03-13 平安科技(深圳)有限公司 Data response method and data response apparatus
CN111107145A (en) * 2019-12-17 2020-05-05 青岛希望鸟科技有限公司 Online synchronous communication system based on HTML5 webpage
CN117994884A (en) * 2024-01-09 2024-05-07 浩云科技股份有限公司 Method and system for changing access control authority information

Also Published As

Publication number Publication date
CN102724295B (en) 2016-05-18

Similar Documents

Publication Publication Date Title
CN102724295B (en) Method of data synchronization and system
CN110569309B (en) Apparatus, method, system, and medium for implementing blockchain
US9843577B2 (en) Revoking sessions using signaling
CN110019235B (en) Block chain based data storage and recovery method, device, equipment and medium
CN110417843B (en) System and method for decentralized management of device assets outside a computer network
WO2021203979A1 (en) Operation and maintenance processing method and apparatus, and computer device
US20190238550A1 (en) Permission control method, apparatus and system for block chain, and node device
CN102904927B (en) Distributed computer systems with time-dependent credentials
TW202036419A (en) Data isolation in blockchain networks
CN112075062A (en) Auto-commit transaction management in a blockchain network
CN111556120A (en) Data processing method and device based on block chain, storage medium and equipment
CN105704249A (en) Composite cloud desktop system
CN102866998A (en) Centralized password management method and centralized password management system in synchronous system
CN110678865A (en) High Integrity Logs for Distributed Software Services
US11979496B2 (en) Secret rotation in a cloud service
CN108881231A (en) The method, apparatus and storage medium of synchronous account information in a kind of group system
CN106911648A (en) One kind is environmentally isolated method and apparatus
CN104104582A (en) Data storage path management method, client and server
CN105933379B (en) A kind of method for processing business, equipment and system
CN108289074B (en) User account login method and device
JP2011205234A (en) Time stamp giving system, time stamp giving method, time stamp giving program
US9948632B2 (en) Sharing data between sandboxed applications with certificates
CN104468599A (en) Method and system for achieving session sharing among multiple applications
CN104468818B (en) A kind of internet of things service processing system and its method
CN115964720A (en) Confidential calculation method, device, equipment and medium based on FaaS platform

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant