WO2018120681A1 - 数据同步方法、装置、系统、数据处理服务器和存储介质 - Google Patents

数据同步方法、装置、系统、数据处理服务器和存储介质 Download PDF

Info

Publication number
WO2018120681A1
WO2018120681A1 PCT/CN2017/089484 CN2017089484W WO2018120681A1 WO 2018120681 A1 WO2018120681 A1 WO 2018120681A1 CN 2017089484 W CN2017089484 W CN 2017089484W WO 2018120681 A1 WO2018120681 A1 WO 2018120681A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
data synchronization
database
processing server
data processing
Prior art date
Application number
PCT/CN2017/089484
Other languages
English (en)
French (fr)
Inventor
王勇
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2018120681A1 publication Critical patent/WO2018120681A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Definitions

  • the present invention relates to the field of data processing, and in particular, to a data synchronization method, apparatus, system, data processing server, and storage medium.
  • the main object of the present invention is to provide a data synchronization method, apparatus, system data processing server and storage medium, which are aimed at solving the existing data synchronization method, the operation is cumbersome, and the overall efficiency of data synchronization is low.
  • a data synchronization method provided by the present invention is applied to a data processing server, and the data synchronization method includes:
  • the data processing server Upon receiving the data synchronization instruction, the data processing server determines a network storage associated with the data processing server;
  • the present invention further provides a data synchronization apparatus, which is applied to a data processing server, and the data synchronization apparatus includes:
  • a determining module configured to determine a network storage associated with the data processing server when receiving the data synchronization instruction
  • An acquiring module configured to acquire a preset data synchronization rule in the determined network storage
  • a processing module configured to determine, according to the acquired data synchronization rule, a database to be data synchronized in the database server associated with the data processing server, and perform a data synchronization operation according to the determined database.
  • the present invention also provides a data synchronization system including: a data processing server, a network storage, and a database server, the data processing server being the data synchronization device as described above.
  • the present invention further provides a data processing server, where the data processing server includes a processor, a network interface, and a memory, where the memory stores a data synchronization program;
  • the network interface is configured to connect to a network storage and a database server, and perform data communication with the network storage and the database server;
  • the processor is configured to execute the data synchronization program to implement the following steps:
  • the present invention also provides a storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the following steps:
  • the data synchronization method, apparatus, system, data processing server and storage medium provided by the present invention, when the data processing server receives the data synchronization instruction, first determines a network storage associated with the data processing server, and then determines the determined Obtaining a preset data synchronization rule in the network storage, and finally determining, according to the acquired data synchronization rule, a database to be data synchronized in the database server associated with the data processing server, and performing a data synchronization operation according to the determined database.
  • realizing synchronous data even if you want to extend the new data processing server for data synchronization, you do not need to add data synchronization rules to each data processing server. You only need to add data synchronization rules to the network storage, and subsequent data processing.
  • the server obtains the data synchronization rule from the network storage, the data can be synchronized to the database in the data processing server, and the data synchronization is very convenient.
  • the time for adding the data synchronization rule is shortened, thereby improving the overall efficiency of data synchronization.
  • FIG. 1 is a schematic flowchart of a first embodiment of a data synchronization method according to the present invention
  • FIG. 2 is a schematic diagram of a refinement process of step S30 in FIG. 1;
  • step S31 in FIG. 2 is a schematic diagram showing the refinement process of step S31 in FIG. 2;
  • FIG. 4 is a schematic flowchart of a second embodiment of a data synchronization method according to the present invention.
  • FIG. 5 is a schematic diagram of a preferred application scenario of a data synchronization process according to the present invention.
  • FIG. 6 is a schematic diagram of functional modules of a first embodiment of a data synchronization apparatus according to the present invention.
  • FIG. 7 is a schematic diagram of a refinement function module of the processing module 30 of FIG. 6;
  • FIG. 8 is a schematic diagram of a refinement function module of the analysis sub-module 31 of FIG. 7;
  • FIG. 9 is a schematic diagram of functional modules of a second embodiment of a data synchronization apparatus according to the present invention.
  • FIG. 10 is a schematic structural diagram of a data processing server related to a hardware operating environment according to an embodiment of the present invention.
  • the present invention provides a data synchronization method for use in a data processing server.
  • FIG. 1 is a schematic flowchart diagram of a first embodiment of a data synchronization method according to the present invention.
  • the data synchronization method includes:
  • Step S10 upon receiving the data synchronization instruction, the data processing server determines the network storage associated with the data processing server.
  • the method before the step S10, includes the steps of: associating the data processing server with the network storage, and storing the data synchronization rule into the network storage. It should be noted that the storing the data synchronization rule in the network server is actually storing the data synchronization rule in the shared disk corresponding to the network server, so as to be associated with each data processing server by using the shared disk technology. Use this data synchronization rule.
  • the data processing server is preferably a Kettle server, and the data processing servers in the following represent the Kettle server.
  • the Kettle server is actually an ETL that starts from open source ( Extract-Transform-Load tool for extracting, cleaning, converting, and loading data. It is written in pure Java and can be run on multiple platforms. Data extraction is efficient and stable.
  • the network storage is preferably a NAS (Network) Attached Storage, the same as the network storage in the following, also represents the NAS server.
  • a NAS server can establish an association relationship with multiple Kettle servers, and the association relationship is established according to the identification information of the Kettle server and the identification information of the NAS server. Since the data processing server in this embodiment is preferably a Kettle server, the data synchronization rule may also be referred to as Kettle program metadata.
  • the associated network storage can be directly determined according to the previously established association relationship.
  • Step S20 Acquire a preset data synchronization rule in the determined network storage.
  • a preset data synchronization rule may be acquired in the determined network storage, since it has been described above that the synchronization rule is stored in the The network server corresponds to the shared disk. Therefore, the preset data synchronization rule is obtained in the determined network storage, and the data synchronization rule is actually acquired in the shared disk corresponding to the network server.
  • the data synchronization rules in this embodiment include, but are not limited to, respective databases to be data synchronized, data types to be synchronized, and synchronization frequencies of data and the like.
  • the data is stored in the shared disk of the network storage, and the data is acquired by the other data processing servers through the shared disk technology, and the data synchronization rules are not separately stored in each data processing server, so that subsequent data synchronization is more convenient.
  • the data synchronization efficiency is also higher.
  • Step S30 Determine, according to the acquired data synchronization rule, a database to be data synchronized, and perform a data synchronization operation according to the determined database.
  • a database server after obtaining the data synchronization rule, first determining, according to the acquired data synchronization rule, a database to be data synchronized in the database server associated with the data processing server, where the data processing server and The establishment of the database server association relationship is the same as the above establishment of the network storage, and the same is true that a database server can be associated with multiple Kettle servers, and no redundant description is made here.
  • the database to be synchronized is a service database having data synchronization requirements, and the data processing server needs to complete synchronization of data, and the number of databases to be synchronized includes at least two.
  • the database to be data synchronized includes a first database and a second database, and after determining the first database and the second database, the data processing server can perform a data synchronization operation, wherein the data synchronization operation includes It is not limited to: synchronizing the data A in the first database to the second database, or synchronizing the data B in the second database to the first database.
  • the step S30 includes:
  • Step S31 the data processing server analyzes whether the operating system corresponding to the data processing server meets a data synchronization condition
  • Step S32 when the operating system corresponding to the data processing server meets the data synchronization condition, determine the database to be data synchronized in the associated database server according to the acquired data synchronization rule, and perform data synchronization operation according to the determined database.
  • the step S31 includes:
  • Step S311 the data processing server analyzes the resource status of the operating system corresponding to the data processing server by using a preset scheduling program, where the resource situation includes a CPU resource or a memory display program MEM resource;
  • Step S312 determining, according to the analyzed resource situation, whether the operating system corresponding to the data processing server meets a data synchronization condition, where, when the resource remaining utilization ratio of the CPU resource or the MEM resource is greater than a preset threshold, determining The operating system corresponding to the data processing server satisfies the data synchronization condition.
  • the data processing server first analyzes the resource status of the current operating system by using a preset scheduling program, where the preset scheduling program is preferably KEA (Kettle) Enterprise application, Kettle enterprise application) scheduler, the resource situation includes CPU (Central Processing Unit, central processor ) Resources or MEM (memory display program) resources. And determining, according to the analyzed resource situation, whether the operating system corresponding to the data processing server meets the data synchronization condition. In this embodiment, preferably, when the resource remaining utilization of the CPU resource or the MEM resource is greater than a preset threshold. And determining that the operating system corresponding to the data processing server meets the data synchronization condition, where the preset threshold is set according to an actual situation, which is not limited herein.
  • the preset scheduling program is preferably KEA (Kettle) Enterprise application, Kettle enterprise application) scheduler
  • the resource situation includes CPU (Central Processing Unit, central processor ) Resources or MEM (memory display program) resources.
  • MEM memory display program
  • the data processing server first analyzes whether the current operating system satisfies the data synchronization condition. If the current operating system satisfies the data synchronization condition, the data synchronization rule is determined according to the acquired data synchronization rule, and is determined according to the determination. The database performs data synchronization operations. If the current operating system does not satisfy the data synchronization condition, the data processing server does not perform the data synchronization process, and the data is synchronized by other data processing servers.
  • the data processing server analyzes whether the operating system corresponding to the data processing server meets the data synchronization condition, the data processing server displays the analyzed situation to the service user for viewing, so that the service user can understand the data synchronization situation.
  • Step A The data processing server records a synchronization process corresponding to the data synchronization operation
  • step B the recorded synchronization process is stored in a local text log and a database log of the database server, so as to view the data synchronization process.
  • the data processing server records the synchronization process corresponding to the data synchronization operation while performing the data synchronization operation according to the first database and the second database, and then stores the recorded synchronization process to the local text log.
  • the operation manager can view the data synchronization process to achieve the function of data synchronization monitoring.
  • the synchronization process mainly includes indicators such as an execution program, an execution parameter, an execution time, and an execution result.
  • the data synchronization process recorded in the database log of the database server is first displayed in the display interface
  • the local text log is called to display the synchronization process corresponding to the data synchronization operation.
  • the database log of the database server stores the synchronization process of data synchronization operations of all data processing servers, and data processing.
  • the local text log of the server stores the synchronization process of the data synchronization operation corresponding to the current data processing server. Then, when viewing the data synchronization process, it may be preferred to first view in the database log of the database server. When the database log is abnormal, the local text log is called to view the data synchronization process, instead of displaying both logs, The flexibility of data synchronization monitoring.
  • the data processing server a and the data processing server b both record the synchronization process of the data synchronization operation to the database server.
  • the data processing server a and the data processing server b will only synchronize the synchronization process of their own data in their own local text log, ie the data processing server a is stored in the local text log a, the data The processing server b is stored in the local text log b.
  • the data synchronization process of each data processing server can be viewed in the database log of the database server. If the database log is abnormal, the data processing server a calls the text log a to view the data synchronization process, and the data processing server b calls the text log b. View of the data synchronization process.
  • the data synchronization method in this embodiment is applied to a data processing server.
  • the data processing server When receiving the data synchronization instruction, the data processing server first determines a network storage associated with the data processing server, and then obtains the determined network storage.
  • the preset data synchronization rule finally determines a database to be data synchronized in the database server associated with the data processing server according to the acquired data synchronization rule, and performs a data synchronization operation according to the determined database.
  • realizing synchronous data even if you want to extend the new data processing server for data synchronization, you do not need to add data synchronization rules to each data processing server. You only need to add data synchronization rules to the network storage, and subsequent data processing.
  • the server obtains the data synchronization rule from the network storage, the data can be synchronized to the database in the data processing server, and the data synchronization is very convenient.
  • the time for adding the data synchronization rule is shortened, thereby improving the overall efficiency of data synchronization.
  • the data synchronization method further includes:
  • Step S40 if the data processing server detects that a data synchronization interruption occurs during data synchronization with respect to other data processing servers of the data processing server, determining respective databases of data synchronization interruption;
  • Step S50 re-executing the data synchronization operation on each database in which the data synchronization is interrupted;
  • step S60 if it is detected that part of the data has been synchronized by the other data processing server, the synchronized data is updated with the resynchronized data.
  • step S40 may be applied after step S30, and may also be applied before step S10, and the specific order is not limited.
  • each database that determines the data synchronization interruption for example, another data processing server is in the third database. Synchronizing data with the fourth database, and a synchronization interruption occurs.
  • the processing server re-executes the data synchronization operation on the two databases in which the data synchronization is interrupted, that is, re-executing the data synchronization operation on the third database and the fourth database.
  • the data synchronization operation at the time is the same as the above, and will not be described here.
  • the data processing server When the data processing server re-executes the data synchronization operation on each database interrupted by the data synchronization, if some data is detected to have been synchronized by other data processing servers during the data synchronization operation, at this time, in order to ensure the data The accuracy of the synchronization, the data processing server will complete the entire data synchronization process, and update the synchronized data with the resynchronized data, that is, update the data that has been synchronized by other data processing servers, thereby ensuring the accuracy of data synchronization.
  • Kettle enterprise application Kerttle Enterprise Application, referred to as KEA
  • Kettle enterprise application is a comprehensive application system based on Kettle community version, batch synchronization data, is a data synchronization ecosystem integrating storage, scheduling and monitoring, and can also realize database expansion. Convenience.
  • the Kettle Enterprise Application includes:
  • the NAS server stores the Kettle program metadata, which is used by the Kettle server of the entire platform through the shared disk storage technology.
  • the Kea scheduler analyzes the resources of the operating system to determine whether to perform service data synchronization (business data). After completion, it is accessed by the business application system and then presented to the business user), and then the information of the business data synchronization is recorded to the local text log and the database log of the database server (mainly including the execution program, execution parameters, execution time, and execution result).
  • the important indicators are recorded in the corresponding log library for analysis by the monitoring application and promptly presented to the operation engineer to maintain the stability of the data synchronization system.
  • KEA stores Kettle program metadata in file format on the NAS server, which is shared by the same Kettle platform;
  • Data synchronization is scheduled by Kettle's intelligent scheduling master program RunFileJob.sh to schedule the corresponding business synchronization program, and the results of the business synchronization program execution are recorded to the local text log and the database log of the database server;
  • Intelligent scheduling Determine whether to execute the program by analyzing the CPU and MEM resources of the operating system
  • the monitoring interface provided by the database log of the database server for the monitoring application system to customize various monitoring
  • the local text log is mainly used for system troubleshooting when there is a problem in the log library.
  • the log library monitoring platform is used under normal circumstances.
  • the data synchronization process of the invention realizes how to extend multiple Kettle tools in the platform, realizes the cluster mode application, and can stably synchronize data in the platform to ensure the continuity of data synchronization. And the data synchronization process can be monitored in the platform, and the data synchronization dynamics of the platform are realized.
  • the characteristics of data synchronization are that the metadata is read less and the data synchronization is large.
  • the NAS technology realizes the platform to share metadata, and realizes the distributed architecture of easy expansion;
  • KEA When scheduling the program, KEA first evaluates the CPU and MEM resources of the machine through the self-developed program, determines whether and when the program is executed, and ensures the data synchronization function and the stability of the system;
  • this embodiment describes the implementation process of the data synchronization method of the present invention again in a specific application scenario.
  • FIG. 5 is a schematic diagram of a specific scenario of data synchronization according to the present invention.
  • the NAS server stores the Kettle program metadata, which is used by the Kettle server of the entire platform through the shared disk storage technology.
  • the Kea scheduler analyzes the resources of the operating system to determine whether to perform service data synchronization (business data). After completion, it is accessed by the business application system and then presented to the business user. If the business data synchronization needs to be performed, the data in the first database is synchronized to the second database, and the information of the business data synchronization is recorded to the local text.
  • the log (the database in Figure 5) and the database log of the database server (the log library in Figure 5), wherein the log library mainly includes important indicator records such as execution program, execution parameters, execution time, and execution results for monitoring applications. Analyze and present to the operations engineer in time to maintain the stability of the data synchronization system.
  • the invention further provides a data synchronization device for use in a data processing server.
  • FIG. 6 is a schematic diagram of functional modules of a first embodiment of a data synchronization apparatus 100 according to the present invention.
  • the functional block diagram shown in FIG. 6 is merely an exemplary embodiment of a preferred embodiment, and those skilled in the art will surround the functional modules of the data synchronizing apparatus 100 shown in FIG.
  • the new functional modules can be easily supplemented; the names of the functional modules are custom names, which are only used to assist in understanding the various program functional blocks of the data synchronization device 100, and are not used to limit the technical solutions of the present invention.
  • the core is the function that each functional module of the defined name has to achieve.
  • the data synchronization apparatus 100 includes:
  • the determining module 10 is configured to determine a network storage associated with the data processing server when receiving the data synchronization instruction.
  • the data processing server needs to be associated with the network storage, and the data synchronization rule is stored in the network storage.
  • the storing the data synchronization rule in the network server is actually storing the data synchronization rule in the shared disk corresponding to the network server, so as to be associated with each data processing server by using the shared disk technology. Use this data synchronization rule.
  • the data processing server is preferably a Kettle server, and the data processing servers in the following represent the Kettle server.
  • the Kettle server is actually an ETL that starts from open source ( Extract-Transform-Load tool for extracting, cleaning, converting, and loading data. It is written in pure Java and can be run on multiple platforms. Data extraction is efficient and stable.
  • the network storage is preferably a NAS (Network) Attached Storage, the same as the network storage in the following, also represents the NAS server.
  • a NAS server can establish an association relationship with multiple Kettle servers, and the association relationship is established according to the identification information of the Kettle server and the identification information of the NAS server. Since the data processing server in this embodiment is preferably a Kettle server, the data synchronization rule may also be referred to as Kettle program metadata.
  • the determining module 10 can directly determine the associated network storage according to the association relationship established in advance.
  • the obtaining module 20 is configured to obtain a preset data synchronization rule in the determined network storage
  • the obtaining module 20 may obtain a preset data synchronization rule in the determined network storage, as described above.
  • the synchronization rule is stored in the shared disk corresponding to the network server. Therefore, the obtaining module 20 acquires a preset data synchronization rule in the determined network storage, which is actually corresponding to the network server.
  • the data synchronization rule is obtained from the shared disk.
  • the data synchronization rules in this embodiment include, but are not limited to, respective databases to be data synchronized, data types to be synchronized, and synchronization frequencies of data and the like.
  • the data is stored in the shared disk of the network storage, and the data is acquired by the other data processing servers through the shared disk technology, and the data synchronization rules are not separately stored in each data processing server, so that subsequent data synchronization is more convenient.
  • the data synchronization efficiency is also higher.
  • the processing module 30 is configured to determine, according to the acquired data synchronization rule, a database to be data synchronized in the database server associated with the data processing server, and perform a data synchronization operation according to the determined database.
  • the processing module 30 first determines, according to the acquired data synchronization rule, a database to be data synchronized in the database server associated with the data processing server.
  • the establishment of the association relationship between the data processing server and the database server is consistent with the establishment of the network storage above, and the same database server can establish association relationship with multiple Kettle servers, and no redundant description is made here. .
  • the database to be synchronized is a service database having data synchronization requirements, and the data processing server needs to complete synchronization of data, and the number of databases to be synchronized includes at least two.
  • the database to be data synchronized includes a first database and a second database, and then the processing module 30 can perform a data synchronization operation after determining the first database and the second database, wherein the data synchronization operation includes It is not limited to: synchronizing the data A in the first database to the second database, or synchronizing the data B in the second database to the first database.
  • the processing module 30 includes:
  • An analysis sub-module 31, configured to analyze whether an operating system corresponding to the data processing server meets a data synchronization condition
  • the processing sub-module 32 is configured to: when the operating system corresponding to the data processing server meets the data synchronization condition, determine, according to the acquired data synchronization rule, a database to be data synchronized in the associated database server, and according to the determined database Perform a data synchronization operation.
  • the analysis sub-module 31 includes:
  • the analyzing unit 311 is configured to analyze, by using a preset scheduling program, a resource condition of an operating system corresponding to the data processing server, where the resource situation includes a CPU resource or a memory display program MEM resource;
  • the determining unit 312 is configured to determine, according to the analyzed resource situation, whether the operating system corresponding to the data processing server meets a data synchronization condition, where the resource remaining utilization of the CPU resource or the MEM resource is greater than a preset threshold. And determining that the operating system corresponding to the data processing server meets a data synchronization condition.
  • the analyzing unit 311 first analyzes the resource status of the current operating system by using a preset scheduling program, where the preset scheduling program is preferably KEA (Kettle). Enterprise application, Kettle enterprise application) scheduler, the resource situation includes CPU (Central Processing Unit, central processor ) Resources or MEM (memory display program) resources. Then, the determining unit 312 determines whether the operating system corresponding to the data processing server meets the data synchronization condition based on the analyzed resource situation.
  • KEA Kettle
  • Enterprise application Kettle enterprise application
  • MEM memory display program
  • the resource remaining utilization ratio of the CPU resource or the MEM resource is greater than a pre-
  • the threshold it can be determined that the operating system corresponding to the data processing server meets the data synchronization condition, and the preset threshold is set according to the actual situation, which is not limited herein.
  • the analysis sub-module 31 first analyzes whether the current operating system satisfies the data synchronization condition. If the current operating system satisfies the data synchronization condition, the processing sub-module 32 determines the database to be data-synchronized according to the acquired data synchronization rule. And perform data synchronization operations according to the determined database. If the current operating system does not satisfy the data synchronization condition, the data synchronization process is not performed, and data is synchronized by other data processing servers.
  • the data synchronization device 100 displays the analyzed situation to the service user for viewing, so that the service user can understand the data. Synchronization situation.
  • the data synchronization apparatus further includes:
  • a recording module configured to record a synchronization process corresponding to the data synchronization operation while the processing module performs a data synchronization operation according to the determined database
  • a storage module configured to store the synchronization process of the record into a local text log and a database log of the database server, so as to view the data synchronization process.
  • the recording module records the operation process corresponding to the data synchronization operation while performing the data synchronization operation according to the first database and the second database, and then the storage module stores the recorded operation process to the local text log and
  • the database log of the database server is analyzed and timed by the KEA scheduler to the operation administrator, so the operation administrator can view the data synchronization process to achieve the function of data synchronization monitoring.
  • the synchronization process mainly includes indicators such as an execution program, an execution parameter, an execution time, and an execution result.
  • the data synchronization process recorded in the database log of the database server is first displayed in the display interface
  • the local text log is invoked to display a synchronization process corresponding to the data synchronization operation.
  • the storage module stores the recorded synchronization process to the local text log and the database log of the database server
  • the database log of the database server stores the synchronization process of the data synchronization operation of all the data processing servers
  • the data Processing the local text log of the server stores the synchronization process of the data synchronization operation corresponding to the current data processing server. Then, when viewing the data synchronization process, it may be preferred to first view in the database log of the database server.
  • the local text log is called to view the data synchronization process, instead of displaying both logs, The flexibility of data synchronization monitoring.
  • the data processing server a and the data processing server b both record the synchronization process of the data synchronization operation to the database server.
  • the data processing server a and the data processing server b will only synchronize the synchronization process of their own data in their own local text log, ie the data processing server a is stored in the local text log a, the data The processing server b is stored in the local text log b.
  • the data synchronization process of each data processing server can be viewed in the database log of the database server. If the database log is abnormal, the data processing server a calls the text log a to view the data synchronization process, and the data processing server b calls the text log b. View of the data synchronization process.
  • the data synchronization device is applied to a data processing server.
  • the data processing server When receiving the data synchronization instruction, the data processing server first determines a network storage associated with the data processing server, and then obtains the determined network storage.
  • the preset data synchronization rule finally determines a database to be data synchronized in the database server associated with the data processing server according to the acquired data synchronization rule, and performs a data synchronization operation according to the determined database.
  • realizing synchronous data even if you want to extend the new data processing server for data synchronization, you do not need to add data synchronization rules to each data processing server. You only need to add data synchronization rules to the network storage, and subsequent data processing.
  • the server obtains the data synchronization rule from the network storage, the data can be synchronized to the database in the data processing server, and the data synchronization is very convenient.
  • the time for adding the data synchronization rule is shortened, thereby improving the overall efficiency of data synchronization.
  • a second embodiment of the data synchronization apparatus 100 of the present invention is proposed based on the first embodiment.
  • the determining module 10 is further configured to detect the data processing server relative to the data processing server.
  • the other data processing servers have data synchronization interruptions during the data synchronization process, and then determine the respective databases in which the data synchronization is interrupted;
  • the processing module 30 is further configured to re-execute the data synchronization operation on each database interrupted by the data synchronization;
  • the data synchronization device further includes:
  • the update module 40 is configured to update the synchronized data with the resynchronized data if it is detected that part of the data has been synchronized by the other data processing server.
  • the determining module 10 determines respective databases of data synchronization interruptions, such as other data processing servers. Data synchronization is performed on the third database and the fourth database, and a synchronization interruption occurs. At this time, the processing module 30 re-executes the data synchronization operation on the two databases in which the data synchronization is interrupted, that is, restarts the third database and the fourth database. The data synchronization operation is performed. The data synchronization operation at this time is consistent with the above content, and details are not described herein.
  • the update module 40 will complete the entire data synchronization process, and update the synchronized data with the resynchronized data, that is, update the data that has been synchronized by other data processing servers, thereby ensuring the accuracy of data synchronization.
  • the above determining module 10, the obtaining module 20, the processing module 30, and the updating module 40 may be embedded in or independent of the data synchronization device in hardware, or may be stored in software in software.
  • the memory of the synchronization device is synchronized to facilitate the processor to perform operations corresponding to the above respective modules.
  • the processor can be a central processing unit (CPU), a microprocessor, a microcontroller, or the like.
  • the present invention further provides a data synchronization system comprising: a data processing server, a network storage and a database server, the data processing server being a data synchronization device as described above.
  • the data processing server when receiving the data synchronization instruction, the data processing server first determines a network storage associated with the data processing server, and then acquires a preset data synchronization rule in the determined network storage. And finally determining, according to the acquired data synchronization rule, a database to be data synchronized in the database server associated with the data processing server, and performing a data synchronization operation according to the determined database.
  • the data processing server when realizing synchronous data, even if you want to extend the new data processing server for data synchronization, you do not need to add data synchronization rules to each data processing server. You only need to add data synchronization rules to the network storage, and subsequent data processing.
  • the server obtains the data synchronization rule from the network storage, the data can be synchronized to the database in the data processing server, and the data synchronization is very convenient.
  • the time for adding the data synchronization rule is shortened, thereby improving the overall efficiency of data synchronization.
  • FIG. 10 is a schematic structural diagram of a data processing server related to a hardware operating environment according to an embodiment of the present invention.
  • the data processing server in the embodiment of the present invention may be a Java server, or may be a one-way server, a multi-way server, and a distributed server.
  • the data processing server may include a processor 1001, such as a CPU, a network interface 1002, and a memory 1003. Connection communication between these components can be achieved via a communication bus.
  • the network interface 1002 may optionally include a standard wired interface (for connecting to a wired network), a wireless interface (such as a WI-FI interface, a Bluetooth interface, an infrared interface, etc. for connecting to a wireless network).
  • the memory 1003 may be a high speed RAM memory or a stable memory (non-volatile) Memory), such as disk storage.
  • the memory 1003 can also optionally be a storage device independent of the aforementioned processor 1001.
  • the data processing server may further include a user interface, a camera, and an RF (Radio) Frequency, RF) circuits, sensors, audio circuits, WiFi modules, and more.
  • the user interface may include a display, an input unit such as a keyboard, and the optional user interface may also include a standard wired interface (eg, for connecting a wired keyboard, a wired mouse, etc.) and/or a wireless interface (eg, Connect wireless keyboard, wireless mouse).
  • FIG. 10 does not constitute a limitation of the data processing server, and may include more or less components than those illustrated, or combine some components or different components. Arrangement.
  • the memory 1003 as a storage medium may include an operating system, a network communication module, and a data synchronization program.
  • the operating system is a program for managing and controlling data processing server hardware and software resources, and supports operation of a network communication module, a data synchronization program, and other programs or software; the network communication module is used to manage and control the network interface 1002.
  • the network interface 1002 is mainly used to connect to a network storage and a database server, and performs data communication with the network storage and the database server, and the connection manner between the data processing server and the network storage and the database server is preferably passed.
  • the wireless interface is connected; and the processor 1001 can be configured to execute a data synchronization program stored in the memory 1003 to implement the following steps:
  • the data processing server Upon receiving the data synchronization instruction, the data processing server determines a network storage associated with the data processing server;
  • the processor 1001 may be configured to execute a data synchronization program stored in the memory 1003, to determine, according to the acquired data synchronization rule, a database to be data synchronized in a database server associated with the data processing server, And perform the steps of the data synchronization operation according to the determined database:
  • the processor 1001 may be configured to execute a data synchronization program stored in the memory 1003 to implement a step of analyzing whether an operating system corresponding to the data processing server satisfies a data synchronization condition:
  • the resource situation of the operating system corresponding to the data processing server is analyzed by using a preset scheduler, where the resource situation includes a CPU resource or a memory display program MEM resource;
  • the operating system corresponding to the server satisfies the data synchronization condition.
  • the step of performing a data synchronization operation according to the determined database is performed, and the processor 1001 may be configured to execute a data synchronization program stored in the memory 1003 to implement the following steps:
  • the synchronized process of recording is stored into a local text log and a database log of the database server to facilitate viewing of the data synchronization process.
  • processor 1001 can be configured to execute a data synchronization program stored in the memory 1003 to implement the following steps:
  • the synchronized data is updated with the resynchronized data.
  • the present invention provides a storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the following steps:
  • the one or more programs may be executed by one or more processors to determine, according to the acquired data synchronization rule, a database to be data synchronized in a database server associated with the data processing server, and The steps to perform a data synchronization operation based on the determined database:
  • the one or more programs may be executed by one or more processors to implement the step of analyzing whether the operating system corresponding to the data processing server satisfies the data synchronization condition:
  • the resource situation of the operating system corresponding to the data processing server is analyzed by using a preset scheduler, where the resource situation includes a CPU resource or a memory display program MEM resource;
  • the operating system corresponding to the server satisfies the data synchronization condition.
  • the step of performing a data synchronization operation according to the determined database is performed, and the one or more programs may be executed by one or more processors to implement the following steps:
  • the synchronized process of recording is stored into a local text log and a database log of the database server to facilitate viewing of the data synchronization process.
  • the one or more programs may be executed by one or more processors to implement the following steps:
  • the synchronized data is updated with the resynchronized data.
  • the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better.
  • Implementation Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明公开了一种数据同步方法,应用于数据处理服务器,所述数据同步方法包括:在接收到数据同步指令时,数据处理服务器确定所述数据处理服务器关联的网络存储器;在确定的所述网络存储器中获取预设的数据同步规则;根据获取的所述数据同步规则,确定所述数据处理服务器关联的数据库服务器中待进行数据同步的数据库,并根据确定的数据库执行数据同步操作。本发明还公开了一种数据同步装置、系统、数据处理服务器和存储介质。本发明提高了数据同步的便捷性以及整体效率。

Description

数据同步方法、装置、系统、数据处理服务器和存储介质
本申请要求于2016年12月30日提交中国专利局、申请号为201611271367.2、发明名称为“数据同步方法、装置和系统”的中国专利申请的优先权,其全部内容通过引用结合在申请中。
技术领域
本发明涉及数据处理领域,尤其涉及一种数据同步方法、装置、系统、数据处理服务器和存储介质。
背景技术
现有的企业级应用进行数据同步时,会通过多个数据处理服务器进行数据的同步,但是现有的数据同步,需要在数据处理服务器中存储数据同步规则,每次在拓展新的数据处理服务器进行数据同步时,都需要存储相应的规则,这种情况下,不仅对数据同步操作较繁琐,而且由于需要花费时间去存储数据同步规则,导致对数据同步的整体效率降低。
发明内容
本发明的主要目的在于提供一种数据同步方法、装置、系统数据处理服务器和存储介质,旨在解决现有的数据同步方式,操作较繁琐,且数据同步的整体效率较低的技术问题。
为实现上述目的,本发明提供的一种数据同步方法,应用于数据处理服务器,所述数据同步方法包括:
在接收到数据同步指令时,数据处理服务器确定所述数据处理服务器关联的网络存储器;
在确定的所述网络存储器中获取预设的数据同步规则;
根据获取的所述数据同步规则,确定所述数据处理服务器关联的数据库服务器中待进行数据同步的数据库,并根据确定的数据库执行数据同步操作。
此外,为实现上述目的,本发明还提供一种数据同步装置,应用于数据处理服务器,所述数据同步装置包括:
确定模块,用于在接收到数据同步指令时,确定所述数据处理服务器关联的网络存储器;
获取模块,用于在确定的所述网络存储器中获取预设的数据同步规则;
处理模块,用于根据获取的所述数据同步规则,确定所述数据处理服务器关联的数据库服务器中待进行数据同步的数据库,并根据确定的数据库执行数据同步操作。
此外,为实现上述目的,本发明还提供一种数据同步系统,所述数据同步系统包括:数据处理服务器、网络存储器和数据库服务器,所述数据处理服务器如上文所述的数据同步装置。
此外,为实现上述目的,本发明还提供一种数据处理服务器,所述数据处理服务器包括处理器、网络接口及存储器,所述存储器中存储有数据同步程序;
所述网络接口用于连接网络存储器和数据库服务器,与所述网络存储器和所述数据库服务器进行数据通信;
所述处理器用于执行所述数据同步程序,以实现以下步骤:
在接收到数据同步指令时,确定所述数据处理服务器关联的网络存储器;
在确定的所述网络存储器中获取预设的数据同步规则;
根据获取的所述数据同步规则,确定所述数据处理服务器关联的数据库服务器中待进行数据同步的数据库,并根据确定的数据库执行数据同步操作。
此外,为实现上述目的,本发明还提供一种存储介质,所述存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现以下步骤:
在接收到数据同步指令时,确定所述数据处理服务器关联的网络存储器;
在确定的所述网络存储器中获取预设的数据同步规则;
根据获取的所述数据同步规则,确定所述数据处理服务器关联的数据库服务器中待进行数据同步的数据库,并根据确定的数据库执行数据同步操作。
本发明提出的数据同步方法、装置、系统、数据处理服务器和存储介质,所述数据处理服务器在接收到数据同步指令时,先确定所述数据处理服务器关联的网络存储器,然后在确定的所述网络存储器中获取预设的数据同步规则,最终根据获取的所述数据同步规则,确定所述数据处理服务器关联的数据库服务器中待进行数据同步的数据库,并根据确定的数据库执行数据同步操作。实现了同步数据时,即使要扩展新的数据处理服务器进行数据的同步,也不需要在各个数据处理服务器中添加数据同步规则,只要将数据同步规则添加到网络存储器中即可,后续各个数据处理服务器只要从网络存储器中获取数据同步规则就可以对数据处理服务器中的数据库进行数据的同步,对数据的同步非常便捷,由于缩短了添加数据同步规则的时间,从而提高了数据同步的整体效率。
附图说明
图1为本发明数据同步方法第一实施例的流程示意图;
图2为图1中步骤S30的细化流程示意图;
图3为图2中步骤S31的细化流程示意图;
图4为本发明数据同步方法第二实施例的流程示意图;
图5为本发明数据同步过程的较佳应用场景示意图;
图6为本发明数据同步装置第一实施例的功能模块示意图;
图7为图6中处理模块30的细化功能模块示意图;
图8为图7中分析子模块31的细化功能模块示意图;
图9为本发明数据同步装置第二实施例的功能模块示意图;
图10是本发明实施例方案涉及硬件运行环境的数据处理服务器的结构示意图。
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
本发明提供一种数据同步方法,应用于数据处理服务器。
参照图1,图1为本发明数据同步方法第一实施例的流程示意图。
在本实施例中,所述数据同步方法包括:
步骤S10,在接收到数据同步指令时,数据处理服务器确定所述数据处理服务器关联的网络存储器。
在本实施例中,所述步骤S10之前,包括步骤:将数据处理服务器与网络存储器关联起来,并将数据同步规则存储到所述网络存储器中。值得注意的是,所述将数据同步规则存储到所述网络服务器中,实际上是将数据同步规则存储到所述网络服务器对应的共享磁盘中,以便通过共享磁盘技术供关联的各个数据处理服务器使用该数据同步规则。
在本实施例中,所述数据处理服务器优选为Kettle服务器,下文中的数据处理服务器均表示Kettle服务器。值得注意的是,所述Kettle服务器实际是一款从开源起步的ETL( Extract-Transform-Load)工具,用于抽取、清洗、转换、装载数据,纯java编写,可以在多平台上运行,数据抽取高效稳定。所述网络存储器优选为NAS(Network Attached Storage,网络附属存储)服务器,同理,下文中的网络存储器也均表示NAS服务器。
本实施例中,一个NAS服务器可以与多个Kettle服务器建立关联关系,具体根据Kettle服务器的标识信息以及所述NAS服务器的标识信息进行关联关系的建立。由于本实施例中的所述数据处理服务器优选为Kettle服务器,因此,所述数据同步规则也可称为Kettle程序元数据。
当所述数据处理服务器接收到数据同步指令时,即可根据事先建立的关联关系,直接确定关联的网络存储器。
步骤S20,在确定的所述网络存储器中获取预设的数据同步规则。
也就是说,在确定所述数据处理服务器关联的网络存储器之后,即可在确定的所述网络存储器中获取预设的数据同步规则,由于上文已经描述了所述同步规则是存储在所述网络服务器对应的共享磁盘中,因此,所述在确定的所述网络存储器中获取预设的数据同步规则,实际上是在所述网络服务器对应的共享磁盘中获取所述数据同步规则。本实施例中的所述数据同步规则包括但不限于:待进行数据同步的各个数据库,待同步的数据类型,以及数据的同步频率等等。
应当理解,在网络存储器的共享磁盘中存储数据,并通过共享磁盘技术以供其它各个数据处理服务器进行数据的获取,无须在每个数据处理服务器分别存储数据同步规则,使得后续的数据同步更加便捷,数据同步效率也更高。
步骤S30,根据获取的所述数据同步规则,确定待进行数据同步的数据库,并根据确定的数据库执行数据同步操作。
在本实施例中,在获取到数据同步规则之后,先根据获取的所述数据同步规则,确定所述数据处理服务器关联的数据库服务器中待进行数据同步的数据库,其中,所述数据处理服务器与数据库服务器关联关系的建立,和上文的与网络存储器的建立方式一致,并且,同样是一个数据库服务器可以与多个Kettle服务器建立关联关系,此处不做多余赘述。
本实施例中,待同步的数据库是有数据同步需求的业务数据库,需要由所述数据处理服务器完成数据的同步,并且,待同步数据库的数量至少包括两个。例如,待进行数据同步的数据库包括第一数据库和第二数据库,那么在确定第一数据库和第二数据库之后,所述数据处理服务器即可执行数据同步操作,其中,所述数据同步操作包括但不限于:将第一数据库中的数据A同步至第二数据库中,或者将第二数据库中的数据B同步至第一数据库中。
在本实施例中,为了保证数据同步的效率,参照图2,所述步骤S30包括:
步骤S31,所述数据处理服务器分析所述数据处理服务器对应的操作系统是否满足数据同步条件;
步骤S32,在所述数据处理服务器对应的操作系统满足数据同步条件时,根据获取的所述数据同步规则,确定关联的数据库服务器中待进行数据同步的数据库,并根据确定的数据库执行数据同步操作。
在本实施例中,分析所述数据处理服务器对应的操作系统是否满足数据同步条件,可参照图3,具体地,所述步骤S31包括:
步骤S311,所述数据处理服务器通过预设调度程序分析所述数据处理服务器对应的操作系统的资源情况,其中,所述资源情况包括CPU资源或内存显示程序MEM资源;
步骤S312,基于分析的所述资源情况,确定所述数据处理服务器对应的操作系统是否满足数据同步条件,其中,在所述CPU资源或MEM资源的资源剩余利用率大于预设阈值时,确定所述数据处理服务器对应的操作系统满足数据同步条件。
在本实施例中,所述数据处理服务器先通过预设调度程序分析当前操作系统的资源情况,其中,所述预设调度程序优选为KEA(Kettle Enterprise application,Kettle企业级应用)调度程序,所述资源情况包括CPU(Central Processing Unit,中央处理器 )资源或MEM(内存显示程序)资源。然后,基于分析的所述资源情况,确定所述数据处理服务器对应的操作系统是否满足数据同步条件,本实施例中,优选在所述CPU资源或MEM资源的资源剩余利用率大于预设阈值时,才能确定所述数据处理服务器对应的操作系统满足数据同步条件,其中,所述预设阈值根据实际情况进行设置,此处不做限定。
即,所述数据处理服务器会先分析当前操作系统是否满足数据同步条件,若当前操作系统满足数据同步条件,才会根据获取的所述数据同步规则,确定待进行数据同步的数据库,并根据确定的数据库执行数据同步操作。若当前操作系统不满足数据同步条件,则所述数据处理服务器不执行数据同步过程,由其它数据处理服务器进行数据的同步。
应当理解,若在操作系统的资源情况不符合要求时就进行数据的同步,极有可能会出现数据同步过程中,数据同步失败的情况,或者是同步数据速度过慢的情况。因此本实施例中,通过分析数据处理服务器的操作系统是否满足数据同步条件,才决定是否进行数据的同步,有效避免了上述情况,一定程度上保证了数据的正常同步,同时也提高了数据的同步效率。
进一步地,所述数据处理服务器分析所述数据处理服务器对应的操作系统是否满足数据同步条件之后,还会将分析的情况展示给业务用户查看,以供业务用户了解数据同步的情况。
进一步地,为了实现对数据同步进行监控,所述执行“根据确定的数据库执行数据同步操作”的同时,执行以下步骤:
步骤A,所述数据处理服务器记录所述数据同步操作对应的同步过程;
步骤B,将记录的所述同步过程存储到本地的文本日志和数据库服务器的数据库日志中,以便于查看数据同步过程。
也就是说,所述数据处理服务器在根据第一数据库和第二数据库执行数据同步操作的同时,还会记录所述数据同步操作对应的同步过程,然后将记录的同步过程存储到本地的文本日志和所述数据库服务器的数据库日志中,以供所述KEA调度程序分析并计时展现给运营管理员,那么运营管理员即可查看数据同步过程,以达到数据同步监控的作用。本实施例中,所述同步过程主要包括执行程序、执行参数、执行时间以及执行结果等指标。
进一步地,还可在接收到运营管理员输入的数据同步操作对应的同步过程的查看指令时,先在显示界面中显示所述数据库服务器的数据库日志中记录的数据同步过程;
若检测到所述数据库服务器的数据库日志中的数据显示出现异常,则调用本地的文本日志,以显示数据同步操作对应的同步过程。
即,由于数据处理服务器将记录的同步过程存储到本地的文本日志和数据库服务器的数据库日志中,因此,数据库服务器的数据库日志存储的就是所有数据处理服务器进行数据同步操作的同步过程,而数据处理服务器本地的文本日志存储当前数据处理服务器对应的数据同步操作的同步过程。那么,在查看数据同步过程时,可优选先在数据库服务器的数据库日志中查看,在数据库日志异常时,才调用本地的文本日志进行数据同步过程的查看,而不用两个日志都进行显示,提高了数据同步监控的灵活性。
为更好理解,举例详述之:例如,当前有数据处理服务器a和数据处理服务器b都在进行数据同步,那么数据处理服务器a和数据处理服务器b都会数据同步操作的同步过程记录到数据库服务器的数据库日志中,但是数据处理服务器a和数据处理服务器b都只会将自己的数据同步操作的同步过程自己的本地的文本日志中,即数据处理服务器a存储到本地的文本日志a中,数据处理服务器b存储到本地的文本日志b中。后续,可以在数据库服务器的数据库日志可以查看各个数据处理服务器的数据同步过程,若是数据库日志异常,则数据处理服务器a调用文本日志a进行数据同步过程的查看,数据处理服务器b调用文本日志b进行数据同步过程的查看。
本实施例提出的数据同步方法,应用于数据处理服务器,所述数据处理服务器在接收到数据同步指令时,先确定所述数据处理服务器关联的网络存储器,然后在确定的所述网络存储器中获取预设的数据同步规则,最终根据获取的所述数据同步规则,确定所述数据处理服务器关联的数据库服务器中待进行数据同步的数据库,并根据确定的数据库执行数据同步操作。实现了同步数据时,即使要扩展新的数据处理服务器进行数据的同步,也不需要在各个数据处理服务器中添加数据同步规则,只要将数据同步规则添加到网络存储器中即可,后续各个数据处理服务器只要从网络存储器中获取数据同步规则就可以对数据处理服务器中的数据库进行数据的同步,对数据的同步非常便捷,由于缩短了添加数据同步规则的时间,从而提高了数据同步的整体效率。
进一步地,基于第一实施例提出本发明数据同步方法的第二实施例,在本实施例中,参照图4,所述数据同步方法还包括:
步骤S40,所述数据处理服务器若检测到相对于所述数据处理服务器的其它数据处理服务器在数据同步过程中出现数据同步中断,则确定数据同步中断的各个数据库;
步骤S50,对数据同步中断的各个数据库重新执行数据同步操作;
步骤S60,若检测到有部分数据已经被所述其它数据处理服务器同步,则用重新同步的数据更新已同步的数据。
应当理解的是,所述步骤S40可应用于步骤S30之后,也可以应用于步骤S10之前,具体的顺序不做限定。
在本实施例中,若检测到相对于所述数据处理服务器的其它数据处理服务器在数据同步过程中出现数据同步中断,则确定数据同步中断的各个数据库,例如其它数据处理服务器在对第三数据库和第四数据库进行数据同步,并且出现同步中断,此时,所述处理服务器对数据同步中断的两个数据库重新执行数据同步操作,即对第三数据库和第四数据库重新执行数据同步操作,此时的数据同步操作与上述内容一致,此处不再进行赘述。
当所述数据处理服务器对数据同步中断的各个数据库重新执行数据同步操作时,若在执行数据同步操作过程中,检测到有部分数据已经被其它数据处理服务器同步过了,此时,为了保证数据同步的准确性,所述数据处理服务器会完成整个数据同步过程,并用重新同步的数据更新已同步的数据,即更新掉其它数据处理服务器已经同步过的数据,保证了数据同步的准确性。
需要说明的是,本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
应当理解,现有的ETL工具Kettle服务器,在C/S(Client/Server,客户机和服务器结构 )架构下的企业级应用接口功能不全;在部署、调度、监控方面困难;并且平台可扩展性差;更甚的,在数据同步时,需要先在内部存储数据同步规则,后续根据存储的数据同步规才能执行数据同步操作,当平台中需要扩展多个Kettle服务器时,就需要在每个Kettle服务器中分别存储数据同步规则,对数据同步的整体操作较为繁琐。
本发明所述的数据同步方案,应用于Kettle企业级应用(Kettle Enterprise application,简称KEA)中,Kettle企业级应用是一套以Kettle社区版为基础,批量同步数据的综合应用系统,是集存储、调度、监控于一体的数据同步生态系统,还可以实现数据库拓容的便捷性。
该Kettle企业级应用包括:
1、KEA框架
NAS服务器存储Kettle程序元数据,通过共享磁盘存储技术供整个平台的Kettle服务器使用,Kettle服务器获取到Kettle程序元数据后,通过KEA调度程序分析操作系统的资源情况决定是否执行业务数据同步(业务数据完成后,供业务应用系统访问,进而展现给业务用户),然后把业务数据同步的信息记录到本地的文本日志和数据库服务器的数据库日志中(主要包括执行程序、执行参数、执行时间以及执行结果等重要指标记录到对应的日志库中,供监控应用程序分析并及时展现给运营工程师,以达到维护数据同步系统的稳定)。
2、KEA存储
KEA是以file格式存储Kettle程序元数据在NAS服务器上,同一Kettle平台共享使用此元数据;
主要特点:分布式平台架构,平台扩展容易。
3、KEA调度
数据同步通过Kettle的智能调度主控程序RunFileJob.sh调度相应的业务同步程序,并把业务同步程序执行的结果分别记录到本地的文本日志与数据库服务器的数据库日志中;
主要功能:
智能调度:通过分析操作系统的CPU和MEM资源决定是否执行程序;
数据同步:调度kitchen.sh程序执行业务同步;
记录日志:通过WriteLog.sh分别记录本地的文本日志与数据库服务器的数据库日志。
4、KEA监控
数据库服务器的数据库日志提供的监控接口,供监控应用系统定制化各种监控;
主要功能:本地的文本日志主要是在日志库出现问题时用于系统排查使用的,正常情况下使用日志库监控平台。
本发明的数据同步过程,集群模式地企业级应用,实现了在平台如何扩展多个Kettle工具,实现了集群模式应用,并且在平台中可以稳定的进行数据的同步,确保数据同步的持续性,以及在平台中可以监控数据同步过程,实现了掌握平台的数据同步动态。
本发明的技术方案中,具有以下优点:
1、只需要添加新的Kettle服务器,数据同步的特点是元数据读取少,数据同步量大的特点,以NAS技术实现平台共享元数据,实现了易扩容地分布式架构;
2、KEA在调度程序时,通过自开发的程序先对本机的CPU和MEM资源进行评估,决定是否以及何时执行程序,保障数据同步功能以及系统的稳定;
3、提供文本、数据库双重日志,对外提供了统一日志接口方便各应用系统监控地同时,也保证了平台独立性。
基于图1至图4所述实施例的具体描述,本实施例以具体的应用场景再次描述本发明数据同步方法的实现过程。
请参照图5,图5是本发明数据同步的具体场景示意图。
NAS服务器存储Kettle程序元数据,通过共享磁盘存储技术供整个平台的Kettle服务器使用,Kettle服务器获取到Kettle程序元数据后,通过KEA调度程序分析操作系统的资源情况决定是否执行业务数据同步(业务数据完成后,供业务应用系统访问,进而展现给业务用户),若是需要执行业务数据同步,则将第一数据库中的数据同步至第二数据库中,再把业务数据同步的信息记录到本地的文本日志(图5中的数据库)和数据库服务器的数据库日志(图5中的日志库)中,其中,日志库主要包括执行程序、执行参数、执行时间以及执行结果等重要指标记录,供监控应用程序分析并及时展现给运营工程师,以达到维护数据同步系统的稳定。
本发明进一步提供一种数据同步装置,应用于数据处理服务器。
参照图6,图6为本发明数据同步装置100第一实施例的功能模块示意图。
需要强调的是,对本领域的技术人员来说,图6所示功能模块图仅仅是一个较佳实施例的示例图,本领域的技术人员围绕图6所示的数据同步装置100的功能模块,可轻易进行新的功能模块的补充;各功能模块的名称是自定义名称,仅用于辅助理解该数据同步装置100的各个程序功能块,不用于限定本发明的技术方案,本发明技术方案的核心是,各自定义名称的功能模块所要达成的功能。
在本实施例中,所述数据同步装置100包括:
确定模块10,用于在接收到数据同步指令时,确定所述数据处理服务器关联的网络存储器。
在本实施例中,在确定模块10确定所述数据处理服务器关联的网络存储器之前,需要先将数据处理服务器与网络存储器关联起来,并将数据同步规则存储到所述网络存储器中。值得注意的是,所述将数据同步规则存储到所述网络服务器中,实际上是将数据同步规则存储到所述网络服务器对应的共享磁盘中,以便通过共享磁盘技术供关联的各个数据处理服务器使用该数据同步规则。
在本实施例中,所述数据处理服务器优选为Kettle服务器,下文中的数据处理服务器均表示Kettle服务器。值得注意的是,所述Kettle服务器实际是一款从开源起步的ETL( Extract-Transform-Load)工具,用于抽取、清洗、转换、装载数据,纯java编写,可以在多平台上运行,数据抽取高效稳定。所述网络存储器优选为NAS(Network Attached Storage,网络附属存储)服务器,同理,下文中的网络存储器也均表示NAS服务器。
本实施例中,一个NAS服务器可以与多个Kettle服务器建立关联关系,具体根据Kettle服务器的标识信息以及所述NAS服务器的标识信息进行关联关系的建立。由于本实施例中的所述数据处理服务器优选为Kettle服务器,因此,所述数据同步规则也可称为Kettle程序元数据。
当接收到数据同步指令时,所述确定模块10即可根据事先建立的关联关系,直接确定关联的网络存储器。
获取模块20,用于在确定的所述网络存储器中获取预设的数据同步规则;
也就是说,在所述确定模块10确定所述数据处理服务器关联的网络存储器之后,获取模块20即可在确定的所述网络存储器中获取预设的数据同步规则,由于上文已经描述了所述同步规则是存储在所述网络服务器对应的共享磁盘中,因此,所述所述获取模块20在确定的所述网络存储器中获取预设的数据同步规则,实际上是在所述网络服务器对应的共享磁盘中获取所述数据同步规则。本实施例中的所述数据同步规则包括但不限于:待进行数据同步的各个数据库,待同步的数据类型,以及数据的同步频率等等。
应当理解,在网络存储器的共享磁盘中存储数据,并通过共享磁盘技术以供其它各个数据处理服务器进行数据的获取,无须在每个数据处理服务器分别存储数据同步规则,使得后续的数据同步更加便捷,数据同步效率也更高。
处理模块30,用于根据获取的所述数据同步规则,确定所述数据处理服务器关联的数据库服务器中待进行数据同步的数据库,并根据确定的数据库执行数据同步操作。
在本实施例中,在所述获取模块20获取到数据同步规则之后,处理模块30先根据获取的所述数据同步规则,确定所述数据处理服务器关联的数据库服务器中待进行数据同步的数据库,其中,所述数据处理服务器与数据库服务器关联关系的建立,和上文的与网络存储器的建立方式一致,并且,同样是一个数据库服务器可以与多个Kettle服务器建立关联关系,此处不做多余赘述。
本实施例中,待同步的数据库是有数据同步需求的业务数据库,需要由所述数据处理服务器完成数据的同步,并且,待同步数据库的数量至少包括两个。例如,待进行数据同步的数据库包括第一数据库和第二数据库,那么所述处理模块30在确定第一数据库和第二数据库之后,即可执行数据同步操作,其中,所述数据同步操作包括但不限于:将第一数据库中的数据A同步至第二数据库中,或者将第二数据库中的数据B同步至第一数据库中。
在本实施例中,为了保证数据同步的效率,参照图7,所述处理模块30包括:
分析子模块31,用于分析所述数据处理服务器对应的操作系统是否满足数据同步条件;
处理子模块32,用于在所述数据处理服务器对应的操作系统满足数据同步条件时,根据获取的所述数据同步规则,确定关联的数据库服务器中待进行数据同步的数据库,并根据确定的数据库执行数据同步操作。
在本实施例中,所述分析数据处理服务器对应的操作系统是否满足数据同步条件,可参照图8,具体地,所述分析子模块31包括:
分析单元311,用于通过预设调度程序分析所述数据处理服务器对应的操作系统的资源情况,其中,所述资源情况包括CPU资源或内存显示程序MEM资源;
确定单元312,用于基于分析的所述资源情况,确定所述数据处理服务器对应的操作系统是否满足数据同步条件,其中,在所述CPU资源或MEM资源的资源剩余利用率大于预设阈值时,确定所述数据处理服务器对应的操作系统满足数据同步条件。
在本实施例中,分析单元311先通过预设调度程序分析当前操作系统的资源情况,其中,所述预设调度程序优选为KEA(Kettle Enterprise application,Kettle企业级应用)调度程序,所述资源情况包括CPU(Central Processing Unit,中央处理器 )资源或MEM(内存显示程序)资源。然后,确定单元312基于分析的所述资源情况,确定所述数据处理服务器对应的操作系统是否满足数据同步条件,本实施例中,优选在所述CPU资源或MEM资源的资源剩余利用率大于预设阈值时,才能确定所述数据处理服务器对应的操作系统满足数据同步条件,其中,所述预设阈值根据实际情况进行设置,此处不做限定。
即,分析子模块31会先分析当前操作系统是否满足数据同步条件,若当前操作系统满足数据同步条件,处理子模块32才会根据获取的所述数据同步规则,确定待进行数据同步的数据库,并根据确定的数据库执行数据同步操作。若当前操作系统不满足数据同步条件,则不执行数据同步过程,由其它数据处理服务器进行数据的同步。
应当理解,若在操作系统的资源情况不符合要求时就进行数据的同步,极有可能会出现数据同步过程中,数据同步失败的情况,或者是同步数据速度过慢的情况。因此本实施例中,通过分析数据处理服务器的操作系统是否满足数据同步条件,才决定是否进行数据的同步,有效避免了上述情况,一定程度上保证了数据的正常同步,同时也提高了数据的同步效率。
进一步地,所述分析子模块31分析所述数据处理服务器对应的操作系统是否满足数据同步条件之后,所述数据同步装置100还会将分析的情况展示给业务用户查看,以供业务用户了解数据同步的情况。
进一步地,为了实现对数据同步进行监控,所述数据同步装置还包括:
记录模块,用于在所述处理模块根据确定的数据库执行数据同步操作的同时,记录所述数据同步操作对应的同步过程;
存储模块,用于将记录的所述同步过程存储到本地的文本日志和所述数据库服务器的数据库日志中,以便于查看数据同步过程。
也就是说,记录模块在根据第一数据库和第二数据库执行数据同步操作的同时,还会记录所述数据同步操作对应的操作过程,然后存储模块将记录的操作过程存储到本地的文本日志和数据库服务器的数据库日志中,以供所述KEA调度程序分析并计时展现给运营管理员,那么运营管理员即可查看数据同步过程,以达到数据同步监控的作用。本实施例中,所述同步过程主要包括执行程序、执行参数、执行时间以及执行结果等指标。
进一步地,还可在接收到运营管理员输入的数据同步操作对应的同步过程的查看指令时,先在显示界面中显示所述数据库服务器的数据库日志中记录的数据同步过程;
若检测到所述数据库服务器的数据库日志中的数据显示出现异常,则调用所述本地的文本日志,以显示数据同步操作对应的同步过程。
即,由于所述存储模块将记录的同步过程存储到本地的文本日志和数据库服务器的数据库日志中,因此,数据库服务器的数据库日志存储的就是所有数据处理服务器进行数据同步操作的同步过程,而数据处理服务器本地的文本日志存储当前数据处理服务器对应的数据同步操作的同步过程。那么,在查看数据同步过程时,可优选先在数据库服务器的数据库日志中查看,在数据库日志异常时,才调用本地的文本日志进行数据同步过程的查看,而不用两个日志都进行显示,提高了数据同步监控的灵活性。
为更好理解,举例详述之:例如,当前有数据处理服务器a和数据处理服务器b都在进行数据同步,那么数据处理服务器a和数据处理服务器b都会数据同步操作的同步过程记录到数据库服务器的数据库日志中,但是数据处理服务器a和数据处理服务器b都只会将自己的数据同步操作的同步过程自己的本地的文本日志中,即数据处理服务器a存储到本地的文本日志a中,数据处理服务器b存储到本地的文本日志b中。后续,可以在数据库服务器的数据库日志可以查看各个数据处理服务器的数据同步过程,若是数据库日志异常,则数据处理服务器a调用文本日志a进行数据同步过程的查看,数据处理服务器b调用文本日志b进行数据同步过程的查看。
本实施例提出的数据同步装置,应用于数据处理服务器,所述数据处理服务器在接收到数据同步指令时,先确定所述数据处理服务器关联的网络存储器,然后在确定的所述网络存储器中获取预设的数据同步规则,最终根据获取的所述数据同步规则,确定所述数据处理服务器关联的数据库服务器中待进行数据同步的数据库,并根据确定的数据库执行数据同步操作。实现了同步数据时,即使要扩展新的数据处理服务器进行数据的同步,也不需要在各个数据处理服务器中添加数据同步规则,只要将数据同步规则添加到网络存储器中即可,后续各个数据处理服务器只要从网络存储器中获取数据同步规则就可以对数据处理服务器中的数据库进行数据的同步,对数据的同步非常便捷,由于缩短了添加数据同步规则的时间,从而提高了数据同步的整体效率。
进一步地,参照图9,基于第一实施例提出本发明数据同步装置100的第二实施例,在本实施例中,所述确定模块10,还用于若检测到相对于所述数据处理服务器的其它数据处理服务器在数据同步过程中出现数据同步中断,则确定数据同步中断的各个数据库;
所述处理模块30,还用于对数据同步中断的各个数据库重新执行数据同步操作;
所述数据同步装置还包括:
更新模块40,用于若检测到有部分数据已经被所述其它数据处理服务器同步,则用重新同步的数据更新已同步的数据。
在本实施例中,若检测到相对于所述数据处理服务器的其它数据处理服务器在数据同步过程中出现数据同步中断,则所述确定模块10确定数据同步中断的各个数据库,例如其它数据处理服务器在对第三数据库和第四数据库进行数据同步,并且出现同步中断,此时,所述处理模块30对数据同步中断的两个数据库重新执行数据同步操作,即对第三数据库和第四数据库重新执行数据同步操作,此时的数据同步操作与上述内容一致,此处不再进行赘述。
当所述数据处理服务器对数据同步中断的各个数据库重新执行数据同步操作时,若在执行数据同步操作过程中,检测到有部分数据已经被其它数据处理服务器同步过了,此时,为了保证数据同步的准确性,更新模块40会完成整个数据同步过程,并用重新同步的数据更新已同步的数据,即更新掉其它数据处理服务器已经同步过的数据,保证了数据同步的准确性。
需要说明的是,在硬件实现上,以上确定模块10、获取模块20、处理模块30以及更新模块40等可以以硬件形式内嵌于或独立于数据同步装置中,也可以以软件形式存储于数据同步装置的存储器中,以便于处理器执行以上各个模块对应的操作。该处理器可以为中央处理单元(CPU)、微处理器、单片机等。
本发明进一步提供一种数据同步系统,所述数据同步系统包括:数据处理服务器、网络存储器和数据库服务器,所述数据处理服务器如上文所述的数据同步装置。
本实施例提出的数据同步系统,所述数据处理服务器在接收到数据同步指令时,先确定所述数据处理服务器关联的网络存储器,然后在确定的所述网络存储器中获取预设的数据同步规则,最终根据获取的所述数据同步规则,确定所述数据处理服务器关联的数据库服务器中待进行数据同步的数据库,并根据确定的数据库执行数据同步操作。实现了同步数据时,即使要扩展新的数据处理服务器进行数据的同步,也不需要在各个数据处理服务器中添加数据同步规则,只要将数据同步规则添加到网络存储器中即可,后续各个数据处理服务器只要从网络存储器中获取数据同步规则就可以对数据处理服务器中的数据库进行数据的同步,对数据的同步非常便捷,由于缩短了添加数据同步规则的时间,从而提高了数据同步的整体效率。
参照图10,图10是本发明实施例方案涉及硬件运行环境的数据处理服务器的结构示意图。
本发明实施例数据处理服务器可以是Java服务器,也可以是单路服务器、多路服务器和分布式服务器。
如图10所示,该数据处理服务器可以包括:处理器1001,例如CPU,网络接口1002,存储器1003。这些组件之间的连接通信可以通过通信总线实现。网络接口1002可选的可以包括标准的有线接口(用于连接有线网络)、无线接口(如WI-FI接口、蓝牙接口、红外线接口等,用于连接无线网络)。存储器1003可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1003可选的还可以是独立于前述处理器1001的存储装置。
可选地,数据处理服务器还可以包括用户接口、摄像头、RF(Radio Frequency,射频)电路,传感器、音频电路、WiFi模块等等。用户接口可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口还可以包括标准的有线接口(例如用于连接有线键盘、有线鼠标等)和/或、无线接口(例如用于连接无线键盘、无线鼠标)。
本领域技术人员可以理解,图10中示出的数据处理服务器结构并不构成对数据处理服务器的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
如图10所示,作为一种存储介质的存储器1003可以包括操作系统、网络通信模块以及数据同步程序。其中,操作系统是管理和控制数据处理服务器硬件与软件资源的程序,支持网络通信模块、数据同步程序以及其他程序或软件的运行;网络通信模块用于管理和控制网络接口1002。
在图10所示的数据处理服务器中,网络接口1002主要用于连接网络存储器和数据库服务器,与网络存储器和数据库服务器进行数据通信,所述数据处理服务器与网络存储器和数据库服务器的连接方式优选通过无线接口进行连接;而处理器1001可以用于执行存储器1003中存储的数据同步程序,以实现以下步骤:
在接收到数据同步指令时,数据处理服务器确定所述数据处理服务器关联的网络存储器;
在确定的所述网络存储器中获取预设的数据同步规则;
根据获取的所述数据同步规则,确定所述数据处理服务器关联的数据库服务器中待进行数据同步的数据库,并根据确定的数据库执行数据同步操作。
进一步地,所述处理器1001可以用于执行存储器1003中存储的数据同步程序,以实现根据获取的所述数据同步规则,确定所述数据处理服务器关联的数据库服务器中待进行数据同步的数据库,并根据确定的数据库执行数据同步操作的步骤:
分析所述数据处理服务器对应的操作系统是否满足数据同步条件;
在所述数据处理服务器对应的操作系统满足数据同步条件时,根据获取的所述数据同步规则,确定关联的数据库服务器中待进行数据同步的数据库,并根据确定的数据库执行数据同步操作。
进一步地,所述处理器1001可以用于执行存储器1003中存储的数据同步程序,以实现分析所述数据处理服务器对应的操作系统是否满足数据同步条件的步骤:
通过预设调度程序分析所述数据处理服务器对应的操作系统的资源情况,其中,所述资源情况包括CPU资源或内存显示程序MEM资源;
基于分析的所述资源情况,确定所述数据处理服务器对应的操作系统是否满足数据同步条件,其中,在所述CPU资源或MEM资源的资源剩余利用率大于预设阈值时,确定所述数据处理服务器对应的操作系统满足数据同步条件。
进一步地,所述执行根据确定的数据库执行数据同步操作的步骤同时,所述处理器1001可以用于执行存储器1003中存储的数据同步程序,以实现以下步骤:
记录所述数据同步操作对应的同步过程;
将记录的所述同步过程存储到本地的文本日志和所述数据库服务器的数据库日志中,以便于查看数据同步过程。
进一步地,所述处理器1001可以用于执行存储器1003中存储的数据同步程序,以实现以下步骤:
若检测到相对于所述数据处理服务器的其它数据处理服务器在数据同步过程中出现数据同步中断,则确定数据同步中断的各个数据库;
对数据同步中断的各个数据库重新执行数据同步操作;
若检测到有部分数据已经被所述其它数据处理服务器同步,则用重新同步的数据更新已同步的数据。
本发明提供了一种存储介质,所述存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现以下步骤:
在接收到数据同步指令时,确定所述数据处理服务器关联的网络存储器;
在确定的所述网络存储器中获取预设的数据同步规则;
根据获取的所述数据同步规则,确定所述数据处理服务器关联的数据库服务器中待进行数据同步的数据库,并根据确定的数据库执行数据同步操作。
进一步地,所述一个或者多个程序可被一个或者多个处理器执行,以实现根据获取的所述数据同步规则,确定所述数据处理服务器关联的数据库服务器中待进行数据同步的数据库,并根据确定的数据库执行数据同步操作的步骤:
分析所述数据处理服务器对应的操作系统是否满足数据同步条件;
在所述数据处理服务器对应的操作系统满足数据同步条件时,根据获取的所述数据同步规则,确定关联的数据库服务器中待进行数据同步的数据库,并根据确定的数据库执行数据同步操作。
进一步地,所述一个或者多个程序可被一个或者多个处理器执行,以实现分析所述数据处理服务器对应的操作系统是否满足数据同步条件的步骤:
通过预设调度程序分析所述数据处理服务器对应的操作系统的资源情况,其中,所述资源情况包括CPU资源或内存显示程序MEM资源;
基于分析的所述资源情况,确定所述数据处理服务器对应的操作系统是否满足数据同步条件,其中,在所述CPU资源或MEM资源的资源剩余利用率大于预设阈值时,确定所述数据处理服务器对应的操作系统满足数据同步条件。
进一步地,所述执行根据确定的数据库执行数据同步操作的步骤同时,所述一个或者多个程序可被一个或者多个处理器执行,以实现以下步骤:
记录所述数据同步操作对应的同步过程;
将记录的所述同步过程存储到本地的文本日志和所述数据库服务器的数据库日志中,以便于查看数据同步过程。
进一步地,所述一个或者多个程序可被一个或者多个处理器执行,以实现以下步骤:
若检测到相对于所述数据处理服务器的其它数据处理服务器在数据同步过程中出现数据同步中断,则确定数据同步中断的各个数据库;
对数据同步中断的各个数据库重新执行数据同步操作;
若检测到有部分数据已经被所述其它数据处理服务器同步,则用重新同步的数据更新已同步的数据。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其它变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其它要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其它相关的技术领域,均同理包括在本发明的专利保护范围内。

Claims (20)

  1. 一种数据同步方法,应用于数据处理服务器,其特征在于,所述数据同步方法包括:
    在接收到数据同步指令时,数据处理服务器确定所述数据处理服务器关联的网络存储器;
    在确定的所述网络存储器中获取预设的数据同步规则;
    根据获取的所述数据同步规则,确定所述数据处理服务器关联的数据库服务器中待进行数据同步的数据库,并根据确定的数据库执行数据同步操作。
  2. 如权利要求1所述的数据同步方法,其特征在于,所述根据获取的所述数据同步规则,确定所述数据处理服务器关联的数据库服务器中待进行数据同步的数据库,并根据确定的数据库执行数据同步操作的步骤包括:
    所述数据处理服务器分析所述数据处理服务器对应的操作系统是否满足数据同步条件;
    在所述数据处理服务器对应的操作系统满足数据同步条件时,根据获取的所述数据同步规则,确定关联的数据库服务器中待进行数据同步的数据库,并根据确定的数据库执行数据同步操作。
  3. 如权利要求2所述的数据同步方法,其特征在于,所述数据处理服务器分析所述数据处理服务器对应的操作系统是否满足数据同步条件的步骤包括:
    所述数据处理服务器通过预设调度程序分析所述数据处理服务器对应的操作系统的资源情况,其中,所述资源情况包括CPU资源或内存显示程序MEM资源;
    基于分析的所述资源情况,确定所述数据处理服务器对应的操作系统是否满足数据同步条件,其中,在所述CPU资源或MEM资源的资源剩余利用率大于预设阈值时,确定所述数据处理服务器对应的操作系统满足数据同步条件。
  4. 如权利要求1所述的数据同步方法,其特征在于,所述执行根据确定的数据库执行数据同步操作的步骤同时,执行以下步骤:
    所述数据处理服务器记录所述数据同步操作对应的同步过程;
    将记录的所述同步过程存储到本地的文本日志和所述数据库服务器的数据库日志中,以便于查看数据同步过程。
  5. 如权利要求1所述的数据同步方法,其特征在于,所述数据同步方法还包括:
    所述数据处理服务器若检测到相对于所述数据处理服务器的其它数据处理服务器在数据同步过程中出现数据同步中断,则确定数据同步中断的各个数据库;
    对数据同步中断的各个数据库重新执行数据同步操作;
    若检测到有部分数据已经被所述其它数据处理服务器同步,则用重新同步的数据更新已同步的数据。
  6. 一种数据同步装置,应用于数据处理服务器,其特征在于,所述数据同步装置包括:
    确定模块,用于在接收到数据同步指令时,确定所述数据处理服务器关联的网络存储器;
    获取模块,用于在确定的所述网络存储器中获取预设的数据同步规则;
    处理模块,用于根据获取的所述数据同步规则,确定所述数据处理服务器关联的数据库服务器中待进行数据同步的数据库,并根据确定的数据库执行数据同步操作。
  7. 如权利要求6所述的数据同步装置,其特征在于,所述处理模块包括:
    分析子模块,用于分析所述数据处理服务器对应的操作系统是否满足数据同步条件;
    处理子模块,用于在所述数据处理服务器对应的操作系统满足数据同步条件时,根据获取的所述数据同步规则,确定关联的数据库服务器中待进行数据同步的数据库,并根据确定的数据库执行数据同步操作。
  8. 如权利要求7所述的数据同步装置,其特征在于,所述分析子模块包括:
    分析单元,用于通过预设调度程序分析所述数据处理服务器对应的操作系统的资源情况,其中,所述资源情况包括CPU资源或内存显示程序MEM资源;
    确定单元,用于基于分析的所述资源情况,确定所述数据处理服务器对应的操作系统是否满足数据同步条件,其中,在所述CPU资源或MEM资源的资源剩余利用率大于预设阈值时,确定所述数据处理服务器对应的操作系统满足数据同步条件。
  9. 如权利要求6述的数据同步装置,其特征在于,所述数据同步装置还包括:
    记录模块,用于在所述处理模块根据确定的数据库执行数据同步操作的同时,记录所述数据同步操作对应的同步过程;
    存储模块,用于将记录的所述同步过程存储到本地的文本日志和所述数据库服务器的数据库日志中,以便于查看数据同步过程。
  10. 如权利要求6所述的数据同步装置,其特征在于,所述确定模块,还用于若检测到相对于所述数据处理服务器的其它数据处理服务器在数据同步过程中出现数据同步中断,则确定数据同步中断的各个数据库;
    所述处理模块,还用于对数据同步中断的各个数据库重新执行数据同步操作;
    所述数据同步装置还包括:
    更新模块,用于若检测到有部分数据已经被所述其它数据处理服务器同步,则用重新同步的数据更新已同步的数据。
  11. 一种数据同步系统,其特征在于,所述数据同步系统包括:数据处理服务器、网络存储器和数据库服务器,所述数据处理服务器如权利要求6所述的数据同步装置。
  12. 一种数据处理服务器,其特征在于,所述数据处理服务器包括处理器、网络接口及存储器,所述存储器中存储有数据同步程序;
    所述网络接口用于连接网络存储器和数据库服务器,与所述网络存储器和所述数据库服务器进行数据通信;
    所述处理器用于执行所述数据同步程序,以实现以下步骤:
    在接收到数据同步指令时,确定数据处理服务器关联的网络存储器;
    在确定的所述网络存储器中获取预设的数据同步规则;
    根据获取的所述数据同步规则,确定所述数据处理服务器关联的数据库服务器中待进行数据同步的数据库,并根据确定的数据库执行数据同步操作。
  13. 如权利要求12所述的数据处理服务器,其特征在于,所述处理器还用于执行所述数据同步程序,以实现根据获取的所述数据同步规则,确定所述数据处理服务器关联的数据库服务器中待进行数据同步的数据库,并根据确定的数据库执行数据同步操作的步骤:
    分析所述数据处理服务器对应的操作系统是否满足数据同步条件;
    在所述数据处理服务器对应的操作系统满足数据同步条件时,根据获取的所述数据同步规则,确定关联的数据库服务器中待进行数据同步的数据库,并根据确定的数据库执行数据同步操作。
  14. 如权利要求13所述的数据处理服务器,其特征在于,所述处理器还用于执行所述数据同步程序,以实现分析所述数据处理服务器对应的操作系统是否满足数据同步条件的步骤:
    通过预设调度程序分析所述数据处理服务器对应的操作系统的资源情况,其中,所述资源情况包括CPU资源或内存显示程序MEM资源;
    基于分析的所述资源情况,确定所述数据处理服务器对应的操作系统是否满足数据同步条件,其中,在所述CPU资源或MEM资源的资源剩余利用率大于预设阈值时,确定所述数据处理服务器对应的操作系统满足数据同步条件。
  15. 如权利要求12所述的数据处理服务器,其特征在于,所述执行根据确定的数据库执行数据同步操作的步骤同时,所述处理器还用于执行以下步骤:
    记录所述数据同步操作对应的同步过程;
    将记录的所述同步过程存储到本地的文本日志和所述数据库服务器的数据库日志中,以便于查看数据同步过程。
  16. 如权利要求12所述的数据处理服务器,所述处理器还用于执行以下步骤:
    若检测到相对于所述数据处理服务器的其它数据处理服务器在数据同步过程中出现数据同步中断,则确定数据同步中断的各个数据库;
    对数据同步中断的各个数据库重新执行数据同步操作;
    若检测到有部分数据已经被所述其它数据处理服务器同步,则用重新同步的数据更新已同步的数据。
  17. 一种存储介质,其特征在于,所述存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现以下步骤:
    在接收到数据同步指令时,确定数据处理服务器关联的网络存储器;
    在确定的所述网络存储器中获取预设的数据同步规则;
    根据获取的所述数据同步规则,确定所述数据处理服务器关联的数据库服务器中待进行数据同步的数据库,并根据确定的数据库执行数据同步操作。
  18. 如权利要求17所述的存储介质,其特征在于,所述一个或者多个程序还可被一个或者多个处理器执行,以实现根据获取的所述数据同步规则,确定所述数据处理服务器关联的数据库服务器中待进行数据同步的数据库,并根据确定的数据库执行数据同步操作的步骤:
    分析所述数据处理服务器对应的操作系统是否满足数据同步条件;
    在所述数据处理服务器对应的操作系统满足数据同步条件时,根据获取的所述数据同步规则,确定关联的数据库服务器中待进行数据同步的数据库,并根据确定的数据库执行数据同步操作。
  19. 如权利要求18所述的存储介质,其特征在于,所述一个或者多个程序还可被一个或者多个处理器执行,以实现分析所述数据处理服务器对应的操作系统是否满足数据同步条件的步骤:
    通过预设调度程序分析所述数据处理服务器对应的操作系统的资源情况,其中,所述资源情况包括CPU资源或内存显示程序MEM资源;
    基于分析的所述资源情况,确定所述数据处理服务器对应的操作系统是否满足数据同步条件,其中,在所述CPU资源或MEM资源的资源剩余利用率大于预设阈值时,确定所述数据处理服务器对应的操作系统满足数据同步条件。
  20. 如权利要求17所述的存储介质,其特征在于,所述执行根据确定的数据库执行数据同步操作的步骤同时,所述一个或者多个程序还可被一个或者多个处理器执行,以实现以下步骤:
    记录所述数据同步操作对应的同步过程;
    将记录的所述同步过程存储到本地的文本日志和所述数据库服务器的数据库日志中,以便于查看数据同步过程。
PCT/CN2017/089484 2016-12-30 2017-06-22 数据同步方法、装置、系统、数据处理服务器和存储介质 WO2018120681A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611271367.2 2016-12-30
CN201611271367.2A CN107040578B (zh) 2016-12-30 2016-12-30 数据同步方法、装置和系统

Publications (1)

Publication Number Publication Date
WO2018120681A1 true WO2018120681A1 (zh) 2018-07-05

Family

ID=59531287

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/089484 WO2018120681A1 (zh) 2016-12-30 2017-06-22 数据同步方法、装置、系统、数据处理服务器和存储介质

Country Status (2)

Country Link
CN (1) CN107040578B (zh)
WO (1) WO2018120681A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109873857A (zh) * 2018-12-26 2019-06-11 广州凡象科技有限公司 一种无网络状态下移动端数据同步方法及装置
CN110955722A (zh) * 2019-11-05 2020-04-03 北京天元创新科技有限公司 数据同步方法及装置
CN112732828A (zh) * 2020-12-22 2021-04-30 航天信息股份有限公司 基于数据仓库工具的跨平台数据共享方法
CN112948340A (zh) * 2021-02-04 2021-06-11 北京金山云网络技术有限公司 数据同步方法、装置、电子设备及可读存储介质
CN114564371A (zh) * 2022-04-30 2022-05-31 四川野马科技有限公司 一种应用于Kettle的运行监控方法及其系统
CN116095096A (zh) * 2023-01-05 2023-05-09 中国联合网络通信集团有限公司 数据同步方法、装置及存储介质

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108629002A (zh) * 2018-05-03 2018-10-09 山东汇贸电子口岸有限公司 一种基于kettle的大数据比对方法及装置
CN110545301B (zh) * 2018-05-29 2022-06-17 视联动力信息技术股份有限公司 监控资源同步方法和装置
CN109086295B (zh) * 2018-06-13 2023-05-30 中国平安人寿保险股份有限公司 数据同步方法、装置、计算机设备及存储介质
CN109325037A (zh) * 2018-08-17 2019-02-12 中国平安人寿保险股份有限公司 一种针对海量数据的数据同步方法、存储介质和服务器
CN109688256A (zh) * 2018-08-27 2019-04-26 平安科技(深圳)有限公司 外呼方法、系统、设备及计算机可读存储介质
CN110661869B (zh) * 2019-09-26 2022-08-12 苏州浪潮智能科技有限公司 一种节点上线方法、系统、装置、设备及计算机存储介质
CN111414416B (zh) * 2020-02-28 2023-05-23 平安科技(深圳)有限公司 数据处理方法、装置、设备和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020055939A1 (en) * 2000-11-06 2002-05-09 Joseph Nardone System for a configurable open database connectivity conduit
CN103379129A (zh) * 2012-04-12 2013-10-30 阿里巴巴集团控股有限公司 一种数据同步方法、服务器及分布式系统
CN103699580A (zh) * 2013-12-03 2014-04-02 中铁程科技有限责任公司 数据库同步方法及装置
CN103873519A (zh) * 2012-12-14 2014-06-18 北京金山云网络技术有限公司 一种数据同步方法、客户端、服务器、终端和系统
CN106021494A (zh) * 2016-05-19 2016-10-12 中国银联股份有限公司 一种主数据同步方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020055939A1 (en) * 2000-11-06 2002-05-09 Joseph Nardone System for a configurable open database connectivity conduit
CN103379129A (zh) * 2012-04-12 2013-10-30 阿里巴巴集团控股有限公司 一种数据同步方法、服务器及分布式系统
CN103873519A (zh) * 2012-12-14 2014-06-18 北京金山云网络技术有限公司 一种数据同步方法、客户端、服务器、终端和系统
CN103699580A (zh) * 2013-12-03 2014-04-02 中铁程科技有限责任公司 数据库同步方法及装置
CN106021494A (zh) * 2016-05-19 2016-10-12 中国银联股份有限公司 一种主数据同步方法及装置

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109873857A (zh) * 2018-12-26 2019-06-11 广州凡象科技有限公司 一种无网络状态下移动端数据同步方法及装置
CN110955722A (zh) * 2019-11-05 2020-04-03 北京天元创新科技有限公司 数据同步方法及装置
CN110955722B (zh) * 2019-11-05 2023-02-07 北京天元创新科技有限公司 数据同步方法及装置
CN112732828A (zh) * 2020-12-22 2021-04-30 航天信息股份有限公司 基于数据仓库工具的跨平台数据共享方法
CN112948340A (zh) * 2021-02-04 2021-06-11 北京金山云网络技术有限公司 数据同步方法、装置、电子设备及可读存储介质
CN114564371A (zh) * 2022-04-30 2022-05-31 四川野马科技有限公司 一种应用于Kettle的运行监控方法及其系统
CN116095096A (zh) * 2023-01-05 2023-05-09 中国联合网络通信集团有限公司 数据同步方法、装置及存储介质
CN116095096B (zh) * 2023-01-05 2024-05-03 中国联合网络通信集团有限公司 数据同步方法、装置及存储介质

Also Published As

Publication number Publication date
CN107040578A (zh) 2017-08-11
CN107040578B (zh) 2020-09-01

Similar Documents

Publication Publication Date Title
WO2018120681A1 (zh) 数据同步方法、装置、系统、数据处理服务器和存储介质
WO2018076868A1 (zh) 一种数据同步方法、装置、系统、存储介质和服务器
WO2018214320A1 (zh) 数据库业务逻辑监控方法、系统、及存储介质
WO2015020471A1 (en) Method and apparatus for distributing data in hybrid cloud environment
WO2018082484A1 (zh) 一种电子设备的截屏方法、系统及电子设备
WO2018076867A1 (zh) 数据备份的删除方法、装置、系统、存储介质和服务器
WO2014032262A1 (zh) 一种平台间迁移应用的实现方法及系统
WO2018076866A1 (zh) 数据处理方法、装置、存储介质、电子设备及服务器
WO2015041436A1 (en) Method of managing control right, client device therefor, and master device therefor
WO2018201774A1 (zh) 数据审批方法、装置、设备和计算机可读存储介质
WO2019078617A1 (en) ELECTRONIC APPARATUS AND VOICE RECOGNITION METHOD
WO2020224246A1 (zh) 基于区块链的数据管理方法、装置、设备和存储介质
WO2018076840A1 (zh) 数据分享方法、装置、存储介质及服务器
WO2017206878A1 (zh) 一种基于唤醒锁的处理方法、装置、存储介质及电子设备
WO2018076812A1 (zh) 数据请求的响应方法、装置、存储介质、服务器及系统
WO2018076865A1 (zh) 数据分享方法、装置、存储介质及电子设备
WO2018076864A1 (zh) 一种数据同步方法、装置、存储介质及电子设备
WO2017206883A1 (zh) 一种应用处理方法、装置、存储介质及电子设备
WO2021012481A1 (zh) 系统性能监控方法、装置、设备及存储介质
WO2018120680A1 (zh) 虚拟磁盘备份系统、方法、装置、服务主机和存储介质
WO2020155359A1 (zh) 家电设备的控制方法、服务器、家电设备及存储介质
WO2020052247A1 (zh) 网络资源批量加载方法、智能电视、存储介质及装置
WO2016101441A1 (zh) 一种进行文件同步的方法及系统
WO2020253125A1 (zh) 日志管理方法、装置、设备及存储介质
WO2017126740A1 (ko) 단말 장치, 원격 제어 시스템 및 제어 방법

Legal Events

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

Ref document number: 17887362

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

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

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

122 Ep: pct application non-entry in european phase

Ref document number: 17887362

Country of ref document: EP

Kind code of ref document: A1