WO2021027363A1 - 数据同步方法、装置、计算机设备及存储介质 - Google Patents

数据同步方法、装置、计算机设备及存储介质 Download PDF

Info

Publication number
WO2021027363A1
WO2021027363A1 PCT/CN2020/093352 CN2020093352W WO2021027363A1 WO 2021027363 A1 WO2021027363 A1 WO 2021027363A1 CN 2020093352 W CN2020093352 W CN 2020093352W WO 2021027363 A1 WO2021027363 A1 WO 2021027363A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
synchronization
synchronized
message
change information
Prior art date
Application number
PCT/CN2020/093352
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 WO2021027363A1 publication Critical patent/WO2021027363A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • This application relates to the technical field of data processing of big data, and in particular to a data synchronization method, device, computer equipment and storage medium.
  • relational databases such as oracle databases
  • OLAP Online Analytical Processing
  • the inventor realizes that the data synchronization between heterogeneous databases mainly uses open source tools such as Kettle, GG, and Sqoop. These data synchronization tools have the disadvantages of low real-time performance and a greater impact on system performance during the synchronization process, and Scalability is not high.
  • the embodiments of the present application provide a data synchronization method, device, computer equipment, and storage medium to solve the problems of low real-time performance of data synchronization, impact on system performance, and low scalability in the prior art.
  • a data synchronization method includes the following steps performed by a first server:
  • an idle thread is allocated for each message middleware message from a preset thread pool, and the message middleware message is sent to the preset distributed message center in a multi-threaded manner Pieces.
  • a data synchronization method includes the following steps performed by a second server:
  • a data synchronization device includes a first server, and the first server includes:
  • the monitoring module is used to obtain the target data source from the data source table, and obtain the target data table in the target data source from the synchronization data table according to the target data source, and perform the operation on the target data table. Monitor and obtain data change information;
  • a calculation module configured to calculate the number of synchronized pieces of data according to the data change information
  • the query module is used to determine the number of pages corresponding to the number of data synchronization items and the synchronization data of each page by using a page query method
  • An encapsulation module configured to encapsulate the synchronization data of each page into a message middleware message corresponding to each page;
  • the sending module is configured to allocate idle threads for each message middleware message from a preset thread pool according to the number of pages, and send the message middleware message to the preset in a multi-threaded manner Distributed messaging middleware.
  • a data synchronization device includes a second server, and the second server includes:
  • the receiving module is used to receive the subscription message sent by the distributed message middleware
  • the subscription module is used to obtain the data to be synchronized from the subscription message
  • the synchronization module is used to synchronize the data to be synchronized to the target database.
  • a computer device includes a memory, a processor, and computer readable instructions stored in the memory and capable of running on the processor, and when the processor executes the computer readable instructions, a first server executes The following steps:
  • an idle thread is allocated for each message middleware message from a preset thread pool, and the message middleware message is sent to the preset distributed message center in a multi-threaded manner Pieces.
  • a computer device includes a memory, a processor, and computer-readable instructions stored in the memory and capable of running on the processor.
  • the processor executes the computer-readable instructions to implement a second server execution The following steps:
  • One or more readable storage media storing computer readable instructions, when the computer readable instructions are executed by one or more processors, the one or more processors implement the following steps executed by the first server :
  • an idle thread is allocated for each message middleware message from a preset thread pool, and the message middleware message is sent to the preset distributed message center in a multi-threaded manner Pieces.
  • One or more readable storage media storing computer readable instructions, when the computer readable instructions are executed by one or more processors, the one or more processors implement the following steps executed by the second server :
  • the first server determines the target data table in the target data source that needs to be synchronized from the obtained pre-configured data source table and synchronization data table, and Monitor the target data table to obtain data change information, and then calculate the number of data synchronization items based on the data change information, and use the paging query method to determine the number of pages corresponding to the number of data synchronization items, as well as the synchronization data of each page, and synchronize the data of each page Encapsulate the message middleware message corresponding to each page, and according to the number of pages, allocate idle threads for each message middleware message from the preset thread pool, and then use multithreading to send the message middleware message to The preset distributed message middleware; the second server obtains the data to be synchronized in real time from the distributed message middleware through subscription messages, and synchronizes the data to be synchronized to the target database.
  • the first server performs data synchronization analysis on various heterogeneous data sources, uses monitoring methods to obtain data changes in real time, and uses multithreading and paging query to send the data that needs to be synchronized in time
  • the second server uses the real-time message subscription mechanism of distributed message middleware to obtain the data to be synchronized in time from the distributed message middleware and synchronize it to the target database.
  • FIG. 1 is a schematic diagram of an application environment of a data synchronization method in an embodiment of the present application
  • FIG. 2 is a flowchart of a data synchronization method in an embodiment of the present application
  • step S3 is a flowchart of step S3 in the data synchronization method in an embodiment of the present application
  • FIG. 4 is a flowchart of step S9 of the data synchronization method in an embodiment of the present application.
  • Figure 5 is a schematic diagram of a data synchronization device in an embodiment of the present application.
  • FIG. 6 is another schematic diagram of the data synchronization device in an embodiment of the present application.
  • Fig. 7 is a schematic diagram of a computer device in an embodiment of the present application.
  • the data synchronization method provided in this application can be applied to the application environment as shown in FIG. 1.
  • the application environment includes a first server, a second server, and distributed message middleware.
  • the first server and the distributed The message middleware and the second server and the distributed message middleware are all connected through a network.
  • the network can be a wired network or a wireless network.
  • the first server, the second server and the distributed message middleware are specifically all connected. It can be implemented with an independent server or a server cluster composed of multiple servers.
  • the first server as the producer of distributed message middleware, produces data that needs to be synchronized in real time and sends it to the distributed message middleware.
  • the second server as the consumer of distributed message middleware, subscribes to messages from the distributed The message middleware obtains the data to be synchronized and completes the data synchronization.
  • a data synchronization method is provided.
  • the method is applied to the first server and the second server in FIG. 1 as an example for description, which specifically includes steps S1 to S9, The details are as follows:
  • the first server obtains the pre-configured data source table and synchronization data table.
  • the data source table is used to configure and manage the data sources of each business system.
  • the fields of the data source table include but are not limited to: data source ID, data source name, data source address, data source status, data source creation time, and data Source modification time, etc.
  • the data source status is used to identify whether the data source is being used.
  • the data source status can include valid status and invalid status. If the data source status is valid, the data source is being used. If the data source status is invalid, The data source is not enabled.
  • the synchronized data table defines the table information of the data table that needs to be synchronized in the data source of each business system.
  • the fields of the synchronized data table include but are not limited to: data source ID, data source name, data table ID, data table name, synchronization Identification, data table creation time and data table modification time, etc.
  • the synchronization identifier is used to identify whether the data table needs to be synchronized, that is, when data in the data table changes, whether the changed data needs to be synchronized to other data tables related to the data table.
  • the data source table and the synchronization data table can be set in advance and can be updated in real time.
  • the user can configure and modify the data source and data table that need to be synchronized in the data source table and the synchronization data table according to the needs of the business system .
  • the first server can provide a visual operation interface for the user, and the user can conveniently and quickly configure the data source table and synchronize the information in the data table through the visual operation interface.
  • the first server obtains the target data source from the data source table, and obtains the target data table in the target data source from the synchronization data table according to the target data source, monitors the target data table, and obtains data change information.
  • the first server reads the data source ID whose data source status is valid in the data source table according to the acquired data source table, and uses the data source corresponding to the read data source ID as the target data source, and Query the record of the target data source in the synchronization data table according to the target data source, and read the value of the data table ID field in the queried record, and use the data table corresponding to the read data table ID as the target data table .
  • the first server monitors the target data table, monitors data changes, and when it monitors the addition, deletion, and modification operations of the target data table, obtains the data change information caused by the addition, deletion, and modification operations.
  • the specific method for the first server to monitor the target data table can be selected according to the needs of the actual application.
  • the target data table can be monitored by adding a trigger Trigger to the target data table, and different types
  • the data source can use different monitoring methods, and specifically, the monitoring method that matches the type can be adopted according to the type of data source.
  • the data change information can specifically include, but is not limited to: the data table ID of the target data table, the data source ID of the target data source where the target data table is located, the data record or field where the data change occurs, and the field value before and after the change, etc. .
  • the first server calculates the number of data synchronization items according to the data change information.
  • the first server calculates the number of data synchronization items that need to be synchronized according to the data change information obtained in step S2.
  • the focus function count can be used to calculate the number of synchronized data.
  • the first server uses a paging query method to determine the number of pages corresponding to the number of data synchronization items, and the synchronization data of each page.
  • the first server presets the maximum number of data items per page in the paging query mode, and calculates the number of pages based on the maximum number of data items and the number of data synchronization items.
  • the specific calculation process is: assuming that the maximum number of data items is pageSize, data If the number of synchronization records is totalRecordCount, calculate the quotient PageCount obtained by dividing totalRecordCount by pageSize and the remainder lastPageCount. If lastPageCount is 0, the number of pages is PageCount. If lastPageCount is greater than 0, the number of pages is PageCount plus 1.
  • the first server divides the data records in the data change information according to the calculated number of pages, and paging according to the maximum number of data items, to obtain synchronized data for each page.
  • the number of data synchronization items is 10,000 and the maximum number of data items per page is 1,000, then the number of pages is 10 pages, and the number of synchronized data items per page is 1,000; if the number of data synchronization items is 10,000, each The maximum number of data items on a page is 900, then the number of pages is 12, the number of synchronized data items per page of the first 11 pages is 900, and the number of synchronized data items on page 12 is 100.
  • the first server encapsulates the synchronization data of each page into a message middleware message corresponding to each page.
  • the first server encapsulates the synchronization data of each page obtained in step S4 into a message middleware message according to a preset message format of the distributed message middleware. For example, if the number of pages is N, the synchronization data of each page is encapsulated into a message middleware message, and a total of N message middleware messages are obtained, where N is a positive integer.
  • the message format of the preset distributed message middleware may specifically be the data table ID of the target data table, the data source ID of the target data source where the target data table is located, synchronization data, and a preset sequence combination of reserved fields .
  • the distributed message middleware is not specifically limited, and it can be Kafka, RabbitMQ, RocketMQ, etc., which can be selected according to actual needs.
  • RocketMQ is used as the distributed message middleware.
  • RocketMQ is an open source distributed message middleware based on the jms specification. RocketMQ has strict guarantee of message order, rich message pull mode, and efficient subscriber level expansion Capability, real-time message subscription mechanism, and the ability to accumulate billions of messages.
  • S6 The first server allocates idle threads for each message middleware message from the preset thread pool according to the number of pages, and uses multithreading to send the message middleware message to the preset distributed message center Pieces.
  • the first server stores each message middleware message in a preset queue, and the first server selects idle threads from the preset thread pool, and extracts each message in turn from the preset queue Middleware message, allocate an idle thread for each message middleware message.
  • the idle threads are all allocated, that is, when the number of idle threads in the preset thread pool is zero, if there are still in the preset queue
  • the first server suspends obtaining the message middleware message from the preset queue until the idle thread is recovered from the thread pool and continues to obtain the message middleware message and allocate idle threads .
  • the first server uses multithreading to synchronously send message middleware messages to distributed message middleware
  • the number of currently allocated idle threads exceeds the preset number of simultaneous sending, it will be sent from the allocated idle threads Select the number of threads to be sent synchronously, and use the selected thread to synchronously send the message middleware messages it contains to the distributed message middleware.
  • start the timer and wait for the preset lock time before continuing to use the remaining The allocated idle thread sends the remaining message middleware messages. In this way, batch processing is implemented to prevent a large number of threads from blocking, thereby improving the high availability of the system.
  • the first server may use Java-based Executorservice thread pool technology to provide a thread pool.
  • a thread pool is created through the newFixedThreadPool function provided by Java to realize multi-thread synchronization for message middleware messages. send.
  • S7 The second server receives the subscription message sent by the distributed messaging middleware.
  • the distributed message middleware provides a message subscription mechanism, and the second server subscribes to the distributed message middleware in advance the data change information corresponding to the target data source and the target data table.
  • the distributed message middleware After the distributed message middleware receives the message middleware message sent by the first server, it identifies the message middleware message, and identifies the target data source and the message middleware corresponding to the target data table according to the data table ID and data source ID The message is analyzed, the identified message middleware message is parsed, the synchronization data in the message middleware message is extracted, and the extracted synchronization data is repackaged into a subscription message and sent to the second server.
  • the second server obtains the data to be synchronized from the subscription message.
  • the second server parses the subscription message according to the message format of the subscription message, and obtains the data to be synchronized corresponding to the target data source and the target data table from the subscription message.
  • the second server synchronizes the data to be synchronized to the target database.
  • the second server obtains the source data corresponding to the data to be synchronized in the target database according to the data to be synchronized, compares the data to be synchronized with the source data, performs corresponding operations such as adding, modifying, and deleting, and synchronizing the data to be synchronized To the target database, complete the data synchronization of the target database.
  • the target database may be a database with the same source as the target data source, or a database with a different source from the target data source.
  • the first server determines the target data table in the target data source that needs data synchronization from the obtained pre-configured data source table and synchronization data table, and monitors the target data table to obtain data Change information, and then calculate the number of data synchronization items based on the data change information, and use the paging query method to determine the number of pages corresponding to the number of data synchronization items, as well as the synchronization data of each page, and encapsulate the synchronization data of each page into a message middleware corresponding to each page According to the number of pages, after allocating idle threads for each message middleware message from the preset thread pool, the message middleware message is sent to the preset distributed message middleware in a multi-threaded manner; The second server obtains the data to be synchronized in real time from the distributed messaging middleware by subscribing to messages, and synchronizes the data to be synchronized to the target database.
  • the first server performs data synchronization analysis on various heterogeneous data sources, uses monitoring methods to obtain data changes in real time, and uses multithreading and paging query to send the data that needs to be synchronized in time
  • the second server uses the real-time message subscription mechanism of distributed message middleware to obtain the data to be synchronized in time from the distributed message middleware and synchronize it to the target database.
  • the use of data source tables and synchronization data tables can flexibly configure the data that needs to be synchronized and improve scalability.
  • step S3 the first server calculates the number of data synchronization items according to the data change information, which specifically includes steps S31 to S34, which are detailed as follows:
  • the first server obtains the synchronization identification field of the target data table corresponding to the data change information.
  • the first server reads the synchronization identification field of the record where the data table ID is located from the synchronization data table according to the data table ID of the target data table included in the data change information.
  • the synchronization identification field is used to identify whether the data table needs to be synchronized, that is, when the data in the data table changes, whether the changed data needs to be synchronized to other data tables related to the data table.
  • the field value of the synchronization identification field may include synchronization required and synchronization unnecessary.
  • the first The server retains the data change information of the target data table.
  • step S31 if it is obtained in step S31 that the field value of the synchronization identification field of the target data table does not require synchronization, that is, there is no need to synchronize the changed data in the target data table to other data tables related to the target data table.
  • a server directly discards the data change information of the target data table.
  • the first server calculates the number of data synchronization items according to the retained data change information.
  • the first server calculates the number of data synchronization pieces of the retained data change information according to the screening results of step S32 and step S33.
  • the calculation process can be the same as the calculation process described in step S3. To avoid repetition, I won't repeat them here.
  • the first server determines whether the data change information needs to be retained according to the synchronization identification field of the target data table corresponding to the data change information, and then calculates the number of data synchronization items for the retained data change information, thereby realizing data synchronization Flexible configuration to improve scalability.
  • the first server may also create a timing data synchronization task, which is described in detail as follows:
  • the first server uses the timed task framework to create timed data synchronization tasks.
  • the timed task framework can be Quartz. Quartz is an open source Java-based job scheduling framework that can implement persistent jobs and effectively manage scheduled jobs. Quartz is composed of the scheduler Scheduler, task JobDetail and trigger Trigger. It consists of three parts. It creates timing data synchronization tasks through JobDetail, and uses the Scheduler and trigger Trigger to trigger and execute the timing data synchronization tasks regularly.
  • the first server calculates the number of data synchronization items according to the data change information, which may specifically include the following steps, which are detailed as follows:
  • the first server calculates the number of data synchronization items according to the data change information.
  • the timed data synchronization task created through the timed task framework can be triggered and executed periodically.
  • the first server drives the execution of the timed data synchronization task through the pre-created timed task framework. That is, the number of data synchronizations is calculated according to the data change information, and the calculation process can be the same as the calculation process described in step S3 in the foregoing embodiment. To avoid repetition, it will not be repeated here.
  • the first server uses the timed task framework to create a timed data synchronization task, and when the timed data synchronization task is triggered, it calculates the number of data synchronization items according to the data change information, so as to realize the timed scheduling of the data synchronization operation in an orderly manner. management.
  • step S9 the second server synchronizes the data to be synchronized to the target database, which specifically includes steps S91 to S93, which are detailed as follows:
  • the second server performs accuracy verification on the data to be synchronized, and obtains a verification result.
  • the content of the accuracy check may specifically include repeated data check and data value range check.
  • the duplicate data check is used to check whether the data to be synchronized is duplicated with the corresponding data in the target database. If it is duplicated, the result of the duplicate data check is confirmed as a failure; if it is not duplicated, the result of the duplicate data check is confirmed as a success; Verification is used to verify whether the value of the field in the data to be synchronized meets the value range requirements of the value field. If it does, it will confirm that the data value range verification result is successful. If it does not, it will confirm the data value range verification. The result is failure.
  • the result of the repeated data check and the result of the data value range verification are both successful, confirm that the verification result of the verification is successful.
  • the result of the repeated data check is a failure or the data value range verification If the result is a failure, it is confirmed that the verification result of the verification is a verification failure.
  • the second server confirms that the data to be synchronized is legal data, and synchronizes the data to be synchronized to the target database, that is, compares the data to be synchronized with the corresponding data in the target database.
  • Target data and perform corresponding operations such as adding, deleting, and modifying according to the comparison result.
  • step S91 if the verification result obtained in step S91 is that the verification fails, the second server performs an abnormal synchronization data alarm according to a preset alarm mode.
  • the preset alarm method can specifically be synchronized data abnormal alarm by sending alarm information to the preset monitoring platform. According to the preset alarm method, it can also be recorded in the log method, which can be specifically based on actual applications. Need to be set, there is no restriction here.
  • the alarm information may include the synchronization time, the content of the data to be synchronized, the identification information of the target database, the data source ID of the target data source corresponding to the data to be synchronized, and the data table ID of the target data table.
  • the second server ensures that the data synchronized to the target database is correct and valid by verifying the accuracy of the data to be synchronized, thereby improving the accuracy of data synchronization.
  • the second server performs synchronization data abnormal alarms according to the preset alarm mode, and can record unsuccessfully synchronized data in time, so that relevant operation and maintenance personnel can perform problem analysis, modification and maintenance in time.
  • a data synchronization device corresponds to the data synchronization method executed by the first server in the above-mentioned embodiment one-to-one.
  • the data synchronization device includes: an acquisition module 51, a monitoring module 52, a calculation module 53, a query module 54, an encapsulation module 54 and a sending module 56.
  • the detailed description of each functional module is as follows:
  • the obtaining module 51 is configured to obtain a pre-configured data source table and a synchronization data table
  • the monitoring module 52 is used to obtain the target data source from the data source table, obtain the target data table in the target data source from the synchronization data table according to the target data source, monitor the target data table, and obtain data change information;
  • the calculation module 53 is used to calculate the number of data synchronization items according to the data change information
  • the query module 54 is used to determine the number of pages corresponding to the number of data synchronization items and the synchronization data of each page by using a page query method;
  • the encapsulation module 55 is used to encapsulate the synchronization data of each page into a message middleware message corresponding to each page;
  • the sending module 56 is used to allocate idle threads for each message middleware message from the preset thread pool according to the number of pages, and use multithreading to send the message middleware message to the preset distributed message middle Pieces.
  • calculation module 53 includes:
  • the field obtaining submodule 531 is configured to obtain the synchronization identification field of the target data table corresponding to the data change information
  • the reservation sub-module 532 is used to reserve data change information if the value of the synchronization identification field needs to be synchronized;
  • the discarding submodule 533 is configured to discard the data change information if the value of the synchronization identification field is that synchronization is not required;
  • the number calculation sub-module 534 is used to calculate the number of synchronized data items according to the retained data change information.
  • the data synchronization device further includes:
  • the task creation module 57 is used to create a timed data synchronization task using the timed task framework
  • the calculation module 53 also includes:
  • the task triggering sub-module 530 is configured to calculate the number of data synchronization items according to the data change information if the timing data synchronization task is triggered.
  • a data synchronization device corresponds to the data synchronization method executed by the second server in the above-mentioned embodiment one-to-one.
  • the data synchronization device includes: a receiving module 61, a subscription module 62, and a synchronization module 63.
  • the detailed description of each functional module is as follows:
  • the receiving module 61 is configured to receive the subscription message sent by the distributed messaging middleware
  • the subscription module 62 is used to obtain data to be synchronized from the subscription message
  • the synchronization module 63 is used to synchronize the data to be synchronized to the target database.
  • the synchronization module 63 includes:
  • the check submodule 631 is used to check the accuracy of the data to be synchronized to obtain the check result
  • the success sub-module 632 is configured to synchronize the data to be synchronized to the target database if the verification result is successful;
  • the failure sub-module 633 is configured to, if the verification result is that the verification fails, perform an abnormal synchronization data alarm according to a preset alarm mode.
  • Each module in the above-mentioned data synchronization device can be implemented in whole or in part by software, hardware and a combination thereof.
  • the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the corresponding operations of the above-mentioned modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 7.
  • the computer equipment includes a processor, a memory, a network interface and a database connected through a system bus.
  • the processor of the computer device is used to provide calculation and control capabilities.
  • the memory of the computer device includes a readable storage medium and an internal memory.
  • the readable storage medium stores an operating system, computer readable instructions, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer readable instructions in the readable storage medium.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the readable storage medium includes a non-volatile readable storage medium and a volatile readable storage medium.
  • a computer device including a memory, a processor, and computer-readable instructions stored in the memory and capable of running on the processor.
  • the processor executes the computer-readable instructions to implement the data in the above-mentioned embodiments.
  • the steps performed by the first server or the second server in the synchronization method for example, the steps performed by the first server or the second server in step S1 to step S9 shown in FIG. 2.
  • the processor implements the functions of the modules/units of the data synchronization device in the above embodiment when the processor executes the computer-readable instructions, such as the functions of the modules 51 to 56 shown in FIG. 5, or the functions of the modules 61 to 63 shown in FIG. Features. To avoid repetition, I won’t repeat them here.
  • one or more readable storage media storing computer readable instructions are provided.
  • the readable storage media provided in this embodiment include non-volatile readable storage media and volatile readable storage Medium; the readable storage medium stores computer readable instructions, and when the computer readable instructions are executed by the processor, the steps performed by the first server or the second server in the data synchronization method in the above method embodiment are realized, or the When the computer-readable instructions are executed by the processor, the functions of the modules/units in the data synchronization device in the above device embodiments are realized. To avoid repetition, I won’t repeat them here.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种数据同步方法、装置、计算机设备及存储介质,涉及大数据技术领域。所述方法包括:从数据源表中获取目标数据源,并根据目标数据源从同步数据表中获取目标数据表,对目标数据表进行监听,获取数据变化信息;根据数据变化信息计算数据同步条数;采用分页查询方式确定分页数量,以及每页的同步数据;将每页的同步数据封装成每页对应的消息中间件报文;根据分页数量,为每个消息中间件报文分配空闲线程,并采用多线程的方式将消息中间件报文发送到分布式消息中间件。所述方法实现了各种异构数据源之间的实时低延迟的增量数据同步,提高了数据同步的实时性,同时有效防止内存溢出,避免大量线程阻塞,提升系统性能。

Description

数据同步方法、装置、计算机设备及存储介质
本申请以2019年8月15日提交的申请号为201910755579.5,名称为“数据同步方法、装置、计算机设备及存储介质”的中国申请专利申请为基础,并要求其优先权。
技术领域
本申请涉及大数据的数据处理技术领域,尤其涉及一种数据同步方法、装置、计算机设备及存储介质。
背景技术
目前,随着数据收集手段的不断丰富,数据量也随之增大,而针对这些数据的分析需求也越来越旺盛,由于关系型数据库,例如oracle数据库,可能无法承受联机分析处理(Online Analytical Processing,OLAP)的需求,因此常常需要将关系型数据库的数据迁移到大数据平台,然而,当关系型数据库的数据完全迁移到大数据平台后,又很难满足数据库事务处理的原子性(Atomicity)、一致性(Consistency)、隔离性(Isolation)和持久性(Durability)的需求。因此,通常比较折中的方案是对于联机事务处理(On-Line Transaction Processing,OLTP)的应用仍然使用关系型数据库,而对于联机分析处理的应用使用大数据平台,这样就需要在关系型数据库和大数据平台之间进行数据同步。
目前,发明人意识到异构数据库之间的数据同步主要采用Kettle、GG,Sqoop等开源工具,这些数据同步工具均具有实时性低,并且在同步过程中对系统性能影响较大的缺点,并且可扩展性不高。
申请内容
本申请实施例提供一种数据同步方法、装置、计算机设备及存储介质,以解决 现有技术中数据同步的实时性低、影响系统性能和可扩展性低的问题。
一种数据同步方法,包括第一服务端执行的如下步骤:
获取预先配置的数据源表和同步数据表;
从所述数据源表中获取目标数据源,并根据所述目标数据源从所述同步数据表中获取所述目标数据源中的目标数据表,对所述目标数据表进行监听,获取数据变化信息;
根据所述数据变化信息计算数据同步条数;
采用分页查询方式确定所述数据同步条数对应的分页数量,以及每页的同步数据;
将每页的所述同步数据封装成每页对应的消息中间件报文;
根据所述分页数量,从预设的线程池中为每个所述消息中间件报文分配空闲线程,并采用多线程的方式将所述消息中间件报文发送到预设的分布式消息中间件。
一种数据同步方法,包括第二服务端执行的如下步骤:
接收分布式消息中间件发送的订阅消息;
从所述订阅消息中获取待同步数据;
将所述待同步数据同步到目标数据库。
一种数据同步装置,包括第一服务端,该第一服务端包括:
获取模块,用于获取预先配置的数据源表和同步数据表;
监听模块,用于从所述数据源表中获取目标数据源,并根据所述目标数据源从所述同步数据表中获取所述目标数据源中的目标数据表,对所述目标数据表进行监听,获取数据变化信息;
计算模块,用于根据所述数据变化信息计算数据同步条数;
查询模块,用于采用分页查询方式确定所述数据同步条数对应的分页数量,以及每页的同步数据;
封装模块,用于将每页的所述同步数据封装成每页对应的消息中间件报文;
发送模块,用于根据所述分页数量,从预设的线程池中为每个所述消息中间件报文分配空闲线程,并采用多线程的方式将所述消息中间件报文发送到预设的 分布式消息中间件。
一种数据同步装置,包括第二服务端,该第二服务端包括:
接收模块,用于接收分布式消息中间件发送的订阅消息;
订阅模块,用于从所述订阅消息中获取待同步数据;
同步模块,用于将所述待同步数据同步到目标数据库。
一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现第一服务端执行的如下步骤:
获取预先配置的数据源表和同步数据表;
从所述数据源表中获取目标数据源,并根据所述目标数据源从所述同步数据表中获取所述目标数据源中的目标数据表,对所述目标数据表进行监听,获取数据变化信息;
根据所述数据变化信息计算数据同步条数;
采用分页查询方式确定所述数据同步条数对应的分页数量,以及每页的同步数据;
将每页的所述同步数据封装成每页对应的消息中间件报文;
根据所述分页数量,从预设的线程池中为每个所述消息中间件报文分配空闲线程,并采用多线程的方式将所述消息中间件报文发送到预设的分布式消息中间件。
一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现第二服务端执行的如下步骤:
接收分布式消息中间件发送的订阅消息;
从所述订阅消息中获取待同步数据;
将所述待同步数据同步到目标数据库。
一个或多个存储有计算机可读指令的可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器实现第一服务端执行的如下步骤:
获取预先配置的数据源表和同步数据表;
从所述数据源表中获取目标数据源,并根据所述目标数据源从所述同步数据表中获取所述目标数据源中的目标数据表,对所述目标数据表进行监听,获取数据变化信息;
根据所述数据变化信息计算数据同步条数;
采用分页查询方式确定所述数据同步条数对应的分页数量,以及每页的同步数据;
将每页的所述同步数据封装成每页对应的消息中间件报文;
根据所述分页数量,从预设的线程池中为每个所述消息中间件报文分配空闲线程,并采用多线程的方式将所述消息中间件报文发送到预设的分布式消息中间件。
一个或多个存储有计算机可读指令的可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器实现第二服务端执行的如下步骤:
接收分布式消息中间件发送的订阅消息;
从所述订阅消息中获取待同步数据;
将所述待同步数据同步到目标数据库。
上述数据同步方法、装置、计算机设备及存储介质中,第一服务端从获取到的预先配置的数据源表和同步数据表中,确定需要进行数据同步的目标数据源中的目标数据表,并对目标数据表进行监听,获取数据变化信息,然后根据数据变化信息计算数据同步条数,采用分页查询方式确定数据同步条数对应的分页数量,以及每页的同步数据,将每页的同步数据封装成每页对应的消息中间件报文,并根据分页数量,从预设的线程池中为每个消息中间件报文分配空闲线程后,采用多线程的方式将消息中间件报文发送到预设的分布式消息中间件;第二服务端通过订阅消息从分布式消息中间件实时获取待同步数据,并将待同步数据同步到目标数据库中。第一服务端作为分布式消息中间件的生产方,对各种异构数据源进行数据同步分析,采用监听方式实时获取数据变化,并将需要同步的数据采用多线程和分页查询的方式及时发送到分布式消息中间件,第 二服务端作为分布式消息中间件的消费方,利用分布式消息中间件的实时消息订阅机制,从分布式消息中间件及时获取待同步数据并同步到目标数据库,实现了各种异构数据源之间的实时低延迟的增量数据同步,提高了数据同步的实时性,并且多线程和分页查询的方式能够有效防止内存溢出,避免大量线程阻塞,提升系统性能,同时,采用数据源表和同步数据表能够对需要同步的数据进行灵活配置,提高可扩展性。本申请的一个或多个实施例的细节在下面的附图和描述中提出,本申请的其他特征和优点将从说明书、附图以及权利要求变得明显。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请一实施例中数据同步方法的一应用环境示意图;
图2是本申请一实施例中数据同步方法的一流程图;
图3是本申请一实施例中数据同步方法中步骤S3的一流程图;
图4是本申请一实施例中数据同步方法的步骤S9的一流程图;
图5是本申请一实施例中数据同步装置的一示意图;
图6是本申请一实施例中数据同步装置的另一示意图;
图7是本申请一实施例中计算机设备的一示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请提供的数据同步方法,可应用在如图1所示的应用环境中,该应用环境 包括第一服务端、第二服务端和分布式消息中间件,其中,第一服务端和分布式消息中间件之间,以及第二服务端和分布式消息中间件均通过网络进行连接,该网络可以是有线网络或者无线网络,第一服务端、第二服务端和分布式消息中间件具体均可以用独立的服务器或者多个服务器组成的服务器集群实现。第一服务端作为分布式消息中间件的生产方,实时生产出需要同步的数据并发送给分布式消息中间件,第二服务端作为分布式消息中间件的消费方,通过订阅消息从分布式消息中间件获取待同步数据并完成数据同步。
在一实施例中,如图2所示,提供一种数据同步方法,以该方法应用在图1中的第一服务端和第二服务端为例进行说明,具体包括步骤S1至步骤S9,详述如下:
S1:第一服务端获取预先配置的数据源表和同步数据表。
具体地,数据源表用于配置化管理各个业务系统的数据源,数据源表的字段包括但不限于:数据源ID、数据源名称、数据源地址、数据源状态、数据源创建时间和数据源修改时间等。
其中,数据源状态用于标识数据源是否正在被使用,数据源状态可以包括有效状态和无效状态,若数据源状态为有效状态,则说明数据源正在被使用,若数据源状态为无效状态,则说明数据源未被启用。
同步数据表定义了各个业务系统的数据源中需要进行数据同步的数据表的表信息,同步数据表的字段包括但不限于:数据源ID、数据源名称、数据表ID、数据表名称、同步标识、数据表创建时间和数据表修改时间等。其中,同步标识用于标识该数据表是否需要进行数据同步,即当该数据表中的数据发生变化时,是否需要将变化后的数据同步到与该数据表相关的其他数据表中。
需要说明的是数据源表和同步数据表可以预先设置,并可进行实时更新,用户可以根据业务系统的需要在数据源表和同步数据表中配置和修改需要进行数据同步的数据源和数据表。
进一步地,第一服务端可以为用户提供可视化操作界面,用户通过可视化操作界面能够方便快捷的配置数据源表和同步数据表中的信息。
S2:第一服务端从数据源表中获取目标数据源,并根据目标数据源从同步数据 表中获取目标数据源中的目标数据表,对目标数据表进行监听,获取数据变化信息。
具体地,第一服务端根据获取到的数据源表,读取数据源表中数据源状态为有效状态的数据源ID,将读取到的数据源ID对应的数据源作为目标数据源,并根据该目标数据源在同步数据表中查询该目标数据源所在的记录,并读取查询到的记录中数据表ID字段的值,将读取到的数据表ID对应的数据表作为目标数据表。
第一服务端对目标数据表进行监听,监听数据变化,当监听到目标数据表的增删改操作时,获取增删改操作导致的数据变化信息。
其中,第一服务端对目标数据表进行监听的具体方式可以根据实际应用的需要进行选择,例如,可以通过对目标数据表增加触发器Trigger的方式实现对目标数据表的监听,并且,不同类型的数据源可以使用不同的监听方式,具体可以根据数据源的类型采用与该类型相匹配的监听方式。
数据变化信息具体可以包括但不限于:目标数据表的数据表ID、目标数据表所在的目标数据源的数据源ID、发生数据变化的数据记录或字段,以及变化前和变化后的字段值等。
S3:第一服务端根据数据变化信息计算数据同步条数。
具体地,第一服务端根据步骤S2获取到的数据变化信息,计算需要进行数据同步的数据同步条数。
在一具体实施例中,若数据源为Oracle、Mysql等关系型数据库,则可以使用聚焦函数count计算数据同步条数。
S4:第一服务端采用分页查询方式确定数据同步条数对应的分页数量,以及每页的同步数据。
具体地,第一服务端预先设置分页查询方式下每页的最大数据条数,根据最大数据条数和数据同步条数,计算分页数量,具体计算过程为:假设最大数据条数为pageSize,数据同步条数为totalRecordCount,则计算totalRecordCount除以pageSize得到的商PageCount,以及余数lastPageCount,若lastPageCount为0,则分页数量为PageCount,若lastPageCount大于0,则分页数量为PageCount加1。
第一服务端根据计算得到的分页数量对数据变化信息中的数据记录,按照最大数据条数进行分页,得到每页的同步数据。
例如,若数据同步条数为10000条,每页的最大数据条数为1000条,则分页数量为10页,每页的同步数据条数为1000条;若数据同步条数为10000条,每页的最大数据条数为900条,则分页数量为12页,前11页每页的同步数据条数为900条,第12页的同步数据条数为100条。
S5:第一服务端将每页的同步数据封装成每页对应的消息中间件报文。
具体地,第一服务端将步骤S4得到的每一页的同步数据,按照预设的分布式消息中间件的报文格式,封装成消息中间件报文。例如,若分页数量为N,每一页的同步数据均被封装为一个消息中间件报文,共得到N个消息中间件报文,其中,N为正整数。
其中,预设的分布式消息中间件的报文格式具体可以是目标数据表的数据表ID、目标数据表所在的目标数据源的数据源ID、同步数据,以及预设的保留字段的顺序组合。
在本实施例中,对分布式消息中间件不做具体限定,其具体可以是Kafka、RabbitMQ、RocketMQ等,在实际应用中可以根据需要进行选择。优选地,采用RocketMQ作为分布式消息中间件,RocketMQ是一款开源的基于jms规范的分布式的消息中间件,RocketMQ具有严格保证消息顺序、提供丰富的消息拉取模式、高效的订阅者水平扩展能力、实时的消息订阅机制,以及亿级消息堆积能力等特点。
S6:第一服务端根据分页数量,从预设的线程池中为每个消息中间件报文分配空闲线程,并采用多线程的方式将消息中间件报文发送到预设的分布式消息中间件。
具体地,第一服务端将每个消息中间件报文存放在预设的队列中,第一服务端从预设的线程池中选取空闲线程,并从预设的队列中依次提取每个消息中间件报文,为每个消息中间件报文分配一个空闲线程,当空闲线程被全被分配完,即预设的线程池中的空闲线程数量为零时,若预设的队列中还有未被提取的消息中间件报文,则第一服务端暂停从预设的队列中获取消息中间件报文,直到 线程池中回收到空闲线程后继续获取消息中间件报文并进行空闲线程分配。
第一服务端采用多线程的方式将消息中间件报文同步发送到分布式消息中间件时,若当前已经被分配的空闲线程的数量超过预设的同步发送数量,则从被分配的空闲线程中选取同步发送数量的线程,并使用选取的线程将其包含的消息中间件报文同步发送到分布式消息中间件,同时,启动定时器等待预设的锁定时间后,再继续使用剩余的被分配的空闲线程发送剩余的消息中间件报文。通过这种方式实现分批次处理,以防止大量线程阻塞,从而提高系统的高可用性。
在一具体实施例中,第一服务端可以采用基于Java的Executorservice线程池技术提供线程池,例如,通过Java提供的newFixedThreadPool函数创建一个定长线程池,实现多线程同步进行消息中间件报文的发送。
S7:第二服务端接收分布式消息中间件发送的订阅消息。
具体地,分布式消息中间件提供消息订阅机制,第二服务端预先向分布式消息中间件订阅目标数据源和目标数据表对应的数据变化信息。
分布式消息中间件接收到第一服务端发送的消息中间件报文后,对消息中间件报文进行识别,根据数据表ID和数据源ID识别目标数据源和目标数据表对应的消息中间件报文,并对识别出的消息中间件报文进行解析,提取消息中间件报文中的同步数据,并将提取出的同步数据重新封装为订阅消息发送到第二服务端。
S8:第二服务端从订阅消息中获取待同步数据。
具体地,第二服务端按照订阅消息的消息格式对订阅消息进行解析,从订阅消息中获取目标数据源和目标数据表对应的待同步数据。
S9:第二服务端将待同步数据同步到目标数据库。
具体地,第二服务端根据待同步数据,在目标数据库中获取与待同步数据对应的源数据,比较待同步数据和源数据,进行相应的增加、修改、删除等操作,将待同步数据同步到目标数据库,完成目标数据库的数据同步。
可以理解的,目标数据库可以是与目标数据源同源的数据库,可以是与目标数据源不同源的数据库。
本实施例中,第一服务端从获取到的预先配置的数据源表和同步数据表中,确定需要进行数据同步的目标数据源中的目标数据表,并对目标数据表进行监听,获取数据变化信息,然后根据数据变化信息计算数据同步条数,采用分页查询方式确定数据同步条数对应的分页数量,以及每页的同步数据,将每页的同步数据封装成每页对应的消息中间件报文,并根据分页数量,从预设的线程池中为每个消息中间件报文分配空闲线程后,采用多线程的方式将消息中间件报文发送到预设的分布式消息中间件;第二服务端通过订阅消息从分布式消息中间件实时获取待同步数据,并将待同步数据同步到目标数据库中。第一服务端作为分布式消息中间件的生产方,对各种异构数据源进行数据同步分析,采用监听方式实时获取数据变化,并将需要同步的数据采用多线程和分页查询的方式及时发送到分布式消息中间件,第二服务端作为分布式消息中间件的消费方,利用分布式消息中间件的实时消息订阅机制,从分布式消息中间件及时获取待同步数据并同步到目标数据库,实现了各种异构数据源之间的实时低延迟的增量数据同步,提高了数据同步的实时性,并且多线程和分页查询的方式能够有效防止内存溢出,避免大量线程阻塞,提升系统性能,同时,采用数据源表和同步数据表能够对需要同步的数据进行灵活配置,提高可扩展性。
在一实施例中,如图3所示,在步骤S3中,第一服务端根据数据变化信息计算数据同步条数,具体包括步骤S31至步骤S34,详述如下:
S31:第一服务端获取数据变化信息对应的目标数据表的同步标识字段。
具体地,第一服务端根据数据变化信息包含的目标数据表的数据表ID,从同步数据表中读取数据表ID所在记录的同步标识字段。
同步标识字段用于标识数据表是否需要进行数据同步,即当该数据表中的数据发生变化时,是否需要将变化后的数据同步到与该数据表相关的其他数据表中。同步标识字段的字段值可以包括需要同步和不需要同步。
S32:若同步标识字段的取值为需要同步,则第一服务端保留该数据变化信息。
具体地,若步骤S31得到目标数据表的同步标识字段的字段值为需要同步,即需要将目标数据表中变化后的数据同步到与目标数据表相关的其他数据表中, 此时,第一服务端保留目标数据表的数据变化信息。
S33:若同步标识字段的取值为不需要同步,则第一服务端丢弃该数据变化信息。
具体地,若步骤S31得到目标数据表的同步标识字段的字段值为不需要同步,即无需将目标数据表中变化后的数据同步到与目标数据表相关的其他数据表中,此时,第一服务端直接丢弃目标数据表的数据变化信息。
S34:第一服务端根据保留的数据变化信息计算数据同步条数。
具体地,第一服务端根据步骤S32和步骤S33的筛选结果,对保留下来的数据变化信息进行数据同步条数的计算,其计算过程可以与步骤S3中描述的计算过程相同,为避免重复,此处不再赘述。
本实施例中,第一服务端根据数据变化信息对应的目标数据表的同步标识字段,确定是否需要保留该数据变化信息,进而对保留的数据变化信息计算数据同步条数,实现了对数据同步的灵活配置,提高可扩展性。
在一实施例中,在步骤S1之前,第一服务端还可以创建定时数据同步任务,详述如下:
第一服务端使用定时任务框架创建定时数据同步任务。
具体地,定时任务框架具体可以是Quartz,Quartz是一款开源的基于Java的作业调度框架,能够实现持久性作业,并对调度作业进行有效管理,Quartz由调度器Scheduler、任务JobDetail和触发器Trigger三部分组成,通过JobDetail创建定时数据同步任务,并使用调度器Scheduler和触发器Trigger实现对定时数据同步任务的定期触发和执行。
进一步地,在创建定时数据同步任务的基础上,在步骤S3中,第一服务端根据数据变化信息计算数据同步条数,具体还可以包括如下步骤,详述如下:
若定时数据同步任务被触发,则第一服务端根据数据变化信息计算数据同步条数。
具体地,通过定时任务框架创建的定时数据同步任务能够被定期触发和执行,当定时数据同步任务被触发时,第一服务端通过预先创建的定时任务框架,驱动该定时数据同步任务的执行,即根据数据变化信息计算数据同步条数,其计 算过程可以与上述实施例中对步骤S3中描述的计算过程相同,为避免重复,此处不再赘述。
本实施例中,第一服务端使用定时任务框架创建定时数据同步任务,并在定时数据同步任务被触发时,根据数据变化信息计算数据同步条数,实现对数据同步操作的定时调度,有序管理。
在一实施例中,如图4所示,在步骤S9中,第二服务端将待同步数据同步到目标数据库,具体包括步骤S91至步骤S93,详述如下:
S91:第二服务端对待同步数据进行准确性校验,得到校验结果。
具体地,准确性校验的内容具体可以包括重复数据检查和数据取值范围校验。其中,重复数据检查用于检查待同步数据是否与目标数据库中对应的数据重复,若重复则确认重复数据检查的结果为失败,若不重复则确认重复数据检查的结果为成功;数据取值范围校验用于校验待同步数据中字段的值是否符合该值字段的取值范围要求,若符合则确认数据取值范围校验的结果为成功,如不符合则确认数据取值范围校验的结果为失败。
当重复数据检查的结果和数据取值范围校验的结果均为成功,则确认准确定校验的校验结果为校验成功,当重复数据检查的结果为失败或数据取值范围校验的结果为失败,则确认准确定校验的校验结果为校验失败。
S92:若校验结果为检验成功,则第二服务端将待同步数据同步到目标数据库。
具体地,若步骤S91得到的校验结果为校验成功,则第二服务端确认待同步数据为合法数据,将该待同步数据同步到目标数据库,即比较待同步数据与目标数据库中对应的目标数据,并根据比较结果进行相应的增加、删除、修改等操作。
S93:若校验结果为检验失败,则第二服务端按照预设的告警方式进行同步数据异常告警。
具体地,若步骤S91得到的校验结果为校验失败,则第二服务端按照预设的告警方式进行同步数据异常告警。
按照预设的告警方式具体可以是通过向预设的监控平台发送告警信息的方式进 行同步数据异常告警,按照预设的告警方式还可以是通过日志的方式记录告警信息,其具体可以根据实际应用的需要进行设置,此处不做限制。
其中,告警信息可以包括同步时间、待同步数据的内容、目标数据库的标识信息、待同步数据对应的目标数据源的数据源ID和目标数据表的数据表ID等。
本实施例中,第二服务端通过对待同步数据进行准确性校验,确保同步到目标数据库的数据正确有效,从而提高数据同步的准确性,在准确性校验的校验结果为检验失败时,第二服务端按照预设的告警方式进行同步数据异常告警,能够及时记录未成功同步的数据,以便相关运维人员可以及时进行问题分析和修改维护。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
在一实施例中,提供一种数据同步装置,该数据同步装置与上述实施例中第一服务端执行的数据同步方法一一对应。如图5所示,该数据同步装置包括:获取模块51、监听模块52、计算模块53、查询模块54、封装模块54和发送模块56。各功能模块详细说明如下:
获取模块51,用于获取预先配置的数据源表和同步数据表;
监听模块52,用于从数据源表中获取目标数据源,并根据目标数据源从同步数据表中获取目标数据源中的目标数据表,对目标数据表进行监听,获取数据变化信息;
计算模块53,用于根据数据变化信息计算数据同步条数;
查询模块54,用于采用分页查询方式确定数据同步条数对应的分页数量,以及每页的同步数据;
封装模块55,用于将每页的同步数据封装成每页对应的消息中间件报文;
发送模块56,用于根据分页数量,从预设的线程池中为每个消息中间件报文分配空闲线程,并采用多线程的方式将消息中间件报文发送到预设的分布式消息中间件。
进一步地,计算模块53包括:
字段获取子模块531,用于获取数据变化信息对应的目标数据表的同步标识字段;
保留子模块532,用于若同步标识字段的取值为需要同步,则保留数据变化信息;
丢弃子模块533,用于若同步标识字段的取值为不需要同步,则丢弃数据变化信息;
条数计算子模块534,用于根据保留的数据变化信息计算数据同步条数。
进一步地,该数据同步装置还包括:
任务创建模块57,用于使用定时任务框架创建定时数据同步任务;
计算模块53还包括:
任务触发子模块530,用于若定时数据同步任务被触发,则根据数据变化信息计算数据同步条数。
在一实施例中,提供一种数据同步装置,该数据同步装置与上述实施例中第二服务端执行的数据同步方法一一对应。如图6所示,该数据同步装置包括:接收模块61、订阅模块62和同步模块63。各功能模块详细说明如下:
接收模块61,用于接收分布式消息中间件发送的订阅消息;
订阅模块62,用于从订阅消息中获取待同步数据;
同步模块63,用于将待同步数据同步到目标数据库。
进一步地,同步模块63包括:
校验子模块631,用于对待同步数据进行准确性校验,得到校验结果;
成功子模块632,用于若校验结果为检验成功,则将待同步数据同步到目标数据库;
失败子模块633,用于若校验结果为检验失败,则按照预设的告警方式进行同步数据异常告警。
关于数据同步装置的具体限定可以参见上文中对于数据同步方法的限定,在此不再赘述。上述数据同步装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执 行以上各个模块对应的操作。
在一实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图7所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括可读存储介质、内存储器。该可读存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为可读存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种数据同步方法中第一服务端或者第二服务端执行的步骤。本实施例所提供的可读存储介质包括非易失性可读存储介质和易失性可读存储介质。
在一实施例中,提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机可读指令,处理器执行计算机可读指令时实现上述实施例中数据同步方法中第一服务端或者第二服务端执行的步骤,例如图2所示的步骤S1至步骤S9中第一服务端或第二服务端执行的步骤。或者,处理器执行计算机可读指令时实现上述实施例中数据同步装置的各模块/单元的功能,例如图5所示模块51至模块56的功能,或者图6所示模块61至模块63的功能。为避免重复,此处不再赘述。
在一实施例中,提供了一个或多个存储有计算机可读指令的可读存储介质,本实施例所提供的可读存储介质包括非易失性可读存储介质和易失性可读存储介质;该可读存储介质上存储有计算机可读指令,计算机可读指令被处理器执行时实现上述方法实施例中数据同步方法中第一服务端或者第二服务端执行的步骤,或者,该计算机可读指令被处理器执行时实现上述装置实施例中数据同步装置中各模块/单元的功能。为避免重复,此处不再赘述。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质或易失性可读存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可 包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。
发明概述
技术问题
问题的解决方案
发明的有益效果

Claims (20)

  1. 一种数据同步方法,其中,所述数据同步方法包括第一服务端执行的如下步骤:
    获取预先配置的数据源表和同步数据表;
    从所述数据源表中获取目标数据源,并根据所述目标数据源从所述同步数据表中获取所述目标数据源中的目标数据表,对所述目标数据表进行监听,获取数据变化信息;
    根据所述数据变化信息计算数据同步条数;
    采用分页查询方式确定所述数据同步条数对应的分页数量,以及每页的同步数据;
    将每页的所述同步数据封装成每页对应的消息中间件报文;
    根据所述分页数量,从预设的线程池中为每个所述消息中间件报文分配空闲线程,并采用多线程的方式将所述消息中间件报文发送到预设的分布式消息中间件。
  2. 如权利要求1所述的数据同步方法,其中,所述根据所述数据变化信息计算数据同步条数包括:
    获取所述数据变化信息对应的所述目标数据表的同步标识字段;
    若所述同步标识字段的取值为需要同步,则保留所述数据变化信息;
    若所述同步标识字段的取值为不需要同步,则丢弃所述数据变化信息;
    根据保留的所述数据变化信息计算所述数据同步条数。
  3. 如权利要求1所述的数据同步方法,其中,所述获取预先配置的数据源表和同步数据表之前,所述数据同步方法还包括:
    使用定时任务框架创建定时数据同步任务;
    所述根据所述数据变化信息计算数据同步条数还包括:
    若所述定时数据同步任务被触发,则根据所述数据变化信息计算所述数据同步条数。
  4. 一种数据同步方法,其中,所述数据同步方法包括第二服务端执行的如下步骤:
    接收分布式消息中间件发送的订阅消息;
    从所述订阅消息中获取待同步数据;
    将所述待同步数据同步到目标数据库。
  5. 如权利要求4所述的数据同步方法,其中,所述将所述待同步数据同步到目标数据库包括:
    对所述待同步数据进行准确性校验,得到校验结果;
    若所述校验结果为检验成功,则将所述待同步数据同步到所述目标数据库;
    若所述校验结果为检验失败,则按照预设的告警方式进行同步数据异常告警。
  6. 一种数据同步装置,其中,所述数据同步装置包括第一服务端,所述第一服务端包括:
    获取模块,用于获取预先配置的数据源表和同步数据表;
    监听模块,用于从所述数据源表中获取目标数据源,并根据所述目标数据源从所述同步数据表中获取所述目标数据源中的目标数据表,对所述目标数据表进行监听,获取数据变化信息;
    计算模块,用于根据所述数据变化信息计算数据同步条数;
    查询模块,用于采用分页查询方式确定所述数据同步条数对应的分页数量,以及每页的同步数据;
    封装模块,用于将每页的所述同步数据封装成每页对应的消息中间件报文;
    发送模块,用于根据所述分页数量,从预设的线程池中为每个所述消息中间件报文分配空闲线程,并采用多线程的方式将所述消息中间件报文发送到预设的分布式消息中间件。
  7. 如权利要求6所述的数据同步装置,其中,所述计算模块包括:
    字段获取子模块,用于获取所述数据变化信息对应的所述目标数 据表的同步标识字段;
    保留子模块,用于若所述同步标识字段的取值为需要同步,则保留所述数据变化信息;
    丢弃子模块,用于若所述同步标识字段的取值为不需要同步,则丢弃所述数据变化信息;
    条数计算子模块,用于根据保留的所述数据变化信息计算所述数据同步条数。
  8. 如权利要求6所述的数据同步装置,其中,所述数据同步装置还包括:
    任务创建模块,用于使用定时任务框架创建定时数据同步任务;
    所述计算模块还包括:
    任务触发子模块,用于若定时数据同步任务被触发,则根据数据变化信息计算数据同步条数。
  9. 一种数据同步装置,其中,所述数据同步装置包括第二服务端,
    所述第二服务端包括:
    接收模块,用于接收分布式消息中间件发送的订阅消息;
    订阅模块,用于从所述订阅消息中获取待同步数据;
    同步模块,用于将所述待同步数据同步到目标数据库。
  10. 如权利要求9所述的数据同步装置,其中,所述同步模块包括:
    校验子模块,用于对待同步数据进行准确性校验,得到校验结果;
    成功子模块,用于若校验结果为检验成功,则将待同步数据同步到目标数据库;
    失败子模块,用于若校验结果为检验失败,则按照预设的告警方式进行同步数据异常告警。
  11. 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其中,所述处理器执行所述计算机可读指令时实现第一服务端执行的如下步骤:
    获取预先配置的数据源表和同步数据表;
    从所述数据源表中获取目标数据源,并根据所述目标数据源从所述同步数据表中获取所述目标数据源中的目标数据表,对所述目标数据表进行监听,获取数据变化信息;
    根据所述数据变化信息计算数据同步条数;
    采用分页查询方式确定所述数据同步条数对应的分页数量,以及每页的同步数据;
    将每页的所述同步数据封装成每页对应的消息中间件报文;
    根据所述分页数量,从预设的线程池中为每个所述消息中间件报文分配空闲线程,并采用多线程的方式将所述消息中间件报文发送到预设的分布式消息中间件。
  12. 如权利要求11所述的计算机设备,其中,所述根据所述数据变化信息计算数据同步条数包括:
    获取所述数据变化信息对应的所述目标数据表的同步标识字段;
    若所述同步标识字段的取值为需要同步,则保留所述数据变化信息;
    若所述同步标识字段的取值为不需要同步,则丢弃所述数据变化信息;
    根据保留的所述数据变化信息计算所述数据同步条数。
  13. 如权利要求11所述的计算机设备,其中,所述获取预先配置的数据源表和同步数据表之前,所述处理器执行所述计算机可读指令时还实现第一服务端执行的如下步骤:
    使用定时任务框架创建定时数据同步任务;
    所述根据所述数据变化信息计算数据同步条数还包括:
    若所述定时数据同步任务被触发,则根据所述数据变化信息计算所述数据同步条数。
  14. 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其中,所述处理器 执行所述计算机可读指令时实现第二服务端执行的如下步骤:
    接收分布式消息中间件发送的订阅消息;
    从所述订阅消息中获取待同步数据;
    将所述待同步数据同步到目标数据库。
  15. 如权利要求14所述的计算机设备,其中,所述将所述待同步数据同步到目标数据库包括:
    对所述待同步数据进行准确性校验,得到校验结果;
    若所述校验结果为检验成功,则将所述待同步数据同步到所述目标数据库;
    若所述校验结果为检验失败,则按照预设的告警方式进行同步数据异常告警。
  16. 一个或多个存储有计算机可读指令的可读存储介质,其中,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器实现第一服务端执行的如下步骤:
    获取预先配置的数据源表和同步数据表;
    从所述数据源表中获取目标数据源,并根据所述目标数据源从所述同步数据表中获取所述目标数据源中的目标数据表,对所述目标数据表进行监听,获取数据变化信息;
    根据所述数据变化信息计算数据同步条数;
    采用分页查询方式确定所述数据同步条数对应的分页数量,以及每页的同步数据;
    将每页的所述同步数据封装成每页对应的消息中间件报文;
    根据所述分页数量,从预设的线程池中为每个所述消息中间件报文分配空闲线程,并采用多线程的方式将所述消息中间件报文发送到预设的分布式消息中间件。
  17. 如权利要求16所述的可读存储介质,其中,所述根据所述数据变化信息计算数据同步条数包括:
    获取所述数据变化信息对应的所述目标数据表的同步标识字段;
    若所述同步标识字段的取值为需要同步,则保留所述数据变化信息;
    若所述同步标识字段的取值为不需要同步,则丢弃所述数据变化信息;
    根据保留的所述数据变化信息计算所述数据同步条数。
  18. 如权利要求16所述的可读存储介质,其中,所述获取预先配置的数据源表和同步数据表之前,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还实现第一服务端执行的如下步骤:
    使用定时任务框架创建定时数据同步任务;
    所述根据所述数据变化信息计算数据同步条数还包括:
    若所述定时数据同步任务被触发,则根据所述数据变化信息计算所述数据同步条数。
  19. 一个或多个存储有计算机可读指令的可读存储介质,其中,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器实现第二服务端执行的如下步骤:
    接收分布式消息中间件发送的订阅消息;
    从所述订阅消息中获取待同步数据;
    将所述待同步数据同步到目标数据库。
  20. 如权利要求19所述的可读存储介质,其中,所述将所述待同步数据同步到目标数据库包括:
    对所述待同步数据进行准确性校验,得到校验结果;
    若所述校验结果为检验成功,则将所述待同步数据同步到所述目标数据库;
    若所述校验结果为检验失败,则按照预设的告警方式进行同步数据异常告警。
PCT/CN2020/093352 2019-08-15 2020-05-29 数据同步方法、装置、计算机设备及存储介质 WO2021027363A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910755579.5A CN110704458B (zh) 2019-08-15 2019-08-15 数据同步方法、装置、计算机设备及存储介质
CN201910755579.5 2019-08-15

Publications (1)

Publication Number Publication Date
WO2021027363A1 true WO2021027363A1 (zh) 2021-02-18

Family

ID=69193510

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/093352 WO2021027363A1 (zh) 2019-08-15 2020-05-29 数据同步方法、装置、计算机设备及存储介质

Country Status (2)

Country Link
CN (1) CN110704458B (zh)
WO (1) WO2021027363A1 (zh)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112925811A (zh) * 2021-02-26 2021-06-08 北京百度网讯科技有限公司 数据处理的方法、装置、设备、存储介质及程序产品
CN112988817A (zh) * 2021-04-12 2021-06-18 携程旅游网络技术(上海)有限公司 数据比对方法、系统、电子设备和存储介质
CN113360491A (zh) * 2021-06-30 2021-09-07 杭州数梦工场科技有限公司 数据质量检验方法、装置、电子设备及存储介质
CN113377757A (zh) * 2021-06-24 2021-09-10 杭州数梦工场科技有限公司 数据对账方法、装置、电子设备及机器可读存储介质
CN113486010A (zh) * 2021-07-01 2021-10-08 远光软件股份有限公司 数据库的同步方法、装置、服务器和存储介质
CN113515532A (zh) * 2021-05-12 2021-10-19 平安国际智慧城市科技股份有限公司 基于数据交换的变更处理方法、装置、设备及存储介质
CN113612837A (zh) * 2021-07-30 2021-11-05 杭州朗和科技有限公司 数据处理方法、装置、介质和计算设备
CN114785809A (zh) * 2022-03-29 2022-07-22 医渡云(北京)技术有限公司 数据同步方法、装置、电子设备及计算机可读存储介质
CN115190113A (zh) * 2022-07-07 2022-10-14 武汉蔚能电池资产有限公司 数据同步方法、设备及存储介质
CN115730016A (zh) * 2023-01-28 2023-03-03 北京国科天迅科技有限公司 数据同步方法、系统、装置、计算机设备和存储介质
CN116016032A (zh) * 2023-01-06 2023-04-25 广西电子口岸有限公司 一种海关业务复杂报文封装方法
CN116303702A (zh) * 2022-12-27 2023-06-23 易方达基金管理有限公司 一种基于etl的数据并行处理方法、装置、设备和存储介质
CN116401090A (zh) * 2023-04-23 2023-07-07 中航信移动科技有限公司 一种基于数据更新的异常数据源确定方法
CN116401319A (zh) * 2023-06-09 2023-07-07 建信金融科技有限责任公司 数据同步方法及装置、电子设备和计算机可读存储介质
CN116610664A (zh) * 2023-07-19 2023-08-18 深圳高灯计算机科技有限公司 数据监控方法、装置、计算机设备、存储介质和产品

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110704458B (zh) * 2019-08-15 2023-04-18 平安科技(深圳)有限公司 数据同步方法、装置、计算机设备及存储介质
CN111258742B (zh) * 2020-02-17 2023-08-04 杭州依图医疗技术有限公司 一种数据同步的方法、系统、计算设备及存储介质
CN111309733A (zh) * 2020-02-20 2020-06-19 深圳震有科技股份有限公司 增量数据抽取处理方法及装置、计算机设备、介质
CN111400397B (zh) * 2020-02-29 2023-04-11 平安科技(深圳)有限公司 数据同步方法、装置、设备和计算机存储介质
CN111371900B (zh) * 2020-03-13 2022-07-12 北京奇艺世纪科技有限公司 一种监测同步链路健康状态的方法及系统
CN111427920B (zh) * 2020-03-16 2023-08-11 深圳市腾讯计算机系统有限公司 数据采集方法、装置、系统、计算机设备及存储介质
CN113407551A (zh) * 2020-03-17 2021-09-17 北京同邦卓益科技有限公司 数据一致性确定方法、装置、设备及存储介质
CN111400407B (zh) * 2020-04-10 2023-09-26 浙江大华技术股份有限公司 数据的同步方法及装置、存储介质及电子装置
CN111897808B (zh) * 2020-07-15 2023-04-11 苏宁金融科技(南京)有限公司 一种数据处理方法、装置、计算机设备及存储介质
CN112818054B (zh) * 2020-10-15 2022-05-06 广州南天电脑系统有限公司 数据同步方法、装置、计算机设备和存储介质
CN112559548B (zh) * 2020-12-27 2023-06-16 浙江融象数科控股有限公司 消息中间件的数据同步系统及方法
CN112699183A (zh) * 2020-12-31 2021-04-23 浙江集享电子商务有限公司 数据处理方法、系统、可读存储介质及计算机设备
CN113392088B (zh) * 2021-06-07 2024-03-26 北京来看科技有限公司 一种数据同步方法、装置、终端及存储介质
CN113254535B (zh) * 2021-06-08 2022-12-13 成都新潮传媒集团有限公司 一种mongodb到mysql的数据同步方法、装置及计算机可读存储介质
CN113656221B (zh) * 2021-08-18 2024-06-07 中国邮政储蓄银行股份有限公司 数据的处理方法、装置、计算机可读存储介质及处理器
CN113901141B (zh) * 2021-10-11 2022-08-05 京信数据科技有限公司 一种分布式数据同步方法及系统
CN114185896A (zh) * 2021-12-14 2022-03-15 中国平安财产保险股份有限公司 数据处理方法、装置、电子设备及存储介质
CN114584575B (zh) * 2022-05-06 2022-07-19 中海油田服务股份有限公司 船舶管理体系中的船岸通信方法及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104699541A (zh) * 2015-03-30 2015-06-10 北京奇虎科技有限公司 同步数据的方法、装置、数据传输组件及系统
CN105824865A (zh) * 2015-12-09 2016-08-03 广东亿迅科技有限公司 一种分布式数据库间数据同步系统
CN106557592A (zh) * 2016-12-02 2017-04-05 中铁程科技有限责任公司 数据同步方法、装置及服务器集群
CN107301196A (zh) * 2017-05-03 2017-10-27 北京小度信息科技有限公司 数据同步方法、装置、设备及监控服务器
CN110704458A (zh) * 2019-08-15 2020-01-17 平安科技(深圳)有限公司 数据同步方法、装置、计算机设备及存储介质

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106557497A (zh) * 2015-09-25 2017-04-05 阿里巴巴集团控股有限公司 一种数据同步方法和装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104699541A (zh) * 2015-03-30 2015-06-10 北京奇虎科技有限公司 同步数据的方法、装置、数据传输组件及系统
CN105824865A (zh) * 2015-12-09 2016-08-03 广东亿迅科技有限公司 一种分布式数据库间数据同步系统
CN106557592A (zh) * 2016-12-02 2017-04-05 中铁程科技有限责任公司 数据同步方法、装置及服务器集群
CN107301196A (zh) * 2017-05-03 2017-10-27 北京小度信息科技有限公司 数据同步方法、装置、设备及监控服务器
CN110704458A (zh) * 2019-08-15 2020-01-17 平安科技(深圳)有限公司 数据同步方法、装置、计算机设备及存储介质

Cited By (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112925811A (zh) * 2021-02-26 2021-06-08 北京百度网讯科技有限公司 数据处理的方法、装置、设备、存储介质及程序产品
CN112925811B (zh) * 2021-02-26 2024-04-02 北京百度网讯科技有限公司 数据处理的方法、装置、设备、存储介质及程序产品
CN112988817A (zh) * 2021-04-12 2021-06-18 携程旅游网络技术(上海)有限公司 数据比对方法、系统、电子设备和存储介质
CN112988817B (zh) * 2021-04-12 2024-03-12 携程旅游网络技术(上海)有限公司 数据比对方法、系统、电子设备和存储介质
CN113515532A (zh) * 2021-05-12 2021-10-19 平安国际智慧城市科技股份有限公司 基于数据交换的变更处理方法、装置、设备及存储介质
CN113515532B (zh) * 2021-05-12 2024-01-19 平安国际智慧城市科技股份有限公司 基于数据交换的变更处理方法、装置、设备及存储介质
CN113377757A (zh) * 2021-06-24 2021-09-10 杭州数梦工场科技有限公司 数据对账方法、装置、电子设备及机器可读存储介质
CN113377757B (zh) * 2021-06-24 2023-08-25 杭州数梦工场科技有限公司 数据对账方法、装置、电子设备及机器可读存储介质
CN113360491A (zh) * 2021-06-30 2021-09-07 杭州数梦工场科技有限公司 数据质量检验方法、装置、电子设备及存储介质
CN113360491B (zh) * 2021-06-30 2024-03-29 杭州数梦工场科技有限公司 数据质量检验方法、装置、电子设备及存储介质
CN113486010A (zh) * 2021-07-01 2021-10-08 远光软件股份有限公司 数据库的同步方法、装置、服务器和存储介质
CN113612837B (zh) * 2021-07-30 2023-08-08 杭州朗和科技有限公司 数据处理方法、装置、介质和计算设备
CN113612837A (zh) * 2021-07-30 2021-11-05 杭州朗和科技有限公司 数据处理方法、装置、介质和计算设备
CN114785809A (zh) * 2022-03-29 2022-07-22 医渡云(北京)技术有限公司 数据同步方法、装置、电子设备及计算机可读存储介质
CN115190113B (zh) * 2022-07-07 2024-04-16 武汉蔚能电池资产有限公司 数据同步方法、设备及存储介质
CN115190113A (zh) * 2022-07-07 2022-10-14 武汉蔚能电池资产有限公司 数据同步方法、设备及存储介质
CN116303702A (zh) * 2022-12-27 2023-06-23 易方达基金管理有限公司 一种基于etl的数据并行处理方法、装置、设备和存储介质
CN116303702B (zh) * 2022-12-27 2024-04-05 易方达基金管理有限公司 一种基于etl的数据并行处理方法、装置、设备和存储介质
CN116016032B (zh) * 2023-01-06 2023-08-11 广西电子口岸有限公司 一种海关业务报文封装方法
CN116016032A (zh) * 2023-01-06 2023-04-25 广西电子口岸有限公司 一种海关业务复杂报文封装方法
CN115730016A (zh) * 2023-01-28 2023-03-03 北京国科天迅科技有限公司 数据同步方法、系统、装置、计算机设备和存储介质
CN115730016B (zh) * 2023-01-28 2023-09-19 北京国科天迅科技有限公司 数据同步方法、系统、装置、计算机设备和存储介质
CN116401090B (zh) * 2023-04-23 2024-01-30 中航信移动科技有限公司 一种基于数据更新的异常数据源确定方法
CN116401090A (zh) * 2023-04-23 2023-07-07 中航信移动科技有限公司 一种基于数据更新的异常数据源确定方法
CN116401319B (zh) * 2023-06-09 2023-09-12 建信金融科技有限责任公司 数据同步方法及装置、电子设备和计算机可读存储介质
CN116401319A (zh) * 2023-06-09 2023-07-07 建信金融科技有限责任公司 数据同步方法及装置、电子设备和计算机可读存储介质
CN116610664A (zh) * 2023-07-19 2023-08-18 深圳高灯计算机科技有限公司 数据监控方法、装置、计算机设备、存储介质和产品
CN116610664B (zh) * 2023-07-19 2024-01-16 深圳高灯计算机科技有限公司 数据监控方法、装置、计算机设备、存储介质和产品

Also Published As

Publication number Publication date
CN110704458A (zh) 2020-01-17
CN110704458B (zh) 2023-04-18

Similar Documents

Publication Publication Date Title
WO2021027363A1 (zh) 数据同步方法、装置、计算机设备及存储介质
WO2020228177A1 (zh) 批量数据处理方法、装置、计算机设备及存储介质
US9760595B1 (en) Parallel processing of data
Thomson et al. The case for determinism in database systems
US9495201B2 (en) Management of bottlenecks in database systems
US10455264B2 (en) Bulk data extraction system
US9990392B2 (en) Distributed transaction processing in MPP databases
WO2020024469A1 (zh) 一种业务处理方法、调用管理系统和计算机设备
WO2020151181A1 (zh) 基于区块链的跨平台数据更新方法、装置和计算机设备
WO2021169275A1 (zh) Sdn 网络设备访问方法、装置、计算机设备及存储介质
WO2020232878A1 (zh) 基于Spring MVC的定时任务处理方法、装置和计算机设备
CN109241182B (zh) 大数据实时同步方法、装置、计算机设备及存储介质
WO2023231281A1 (zh) 数据处理方法、装置及电子设备
US10275289B2 (en) Coexistence of message-passing-like algorithms and procedural coding
CN110866011B (zh) 数据表同步方法、装置、计算机设备和存储介质
CN110704172B (zh) 集群系统定时任务调度方法及集群系统
US11853284B2 (en) In-place updates with concurrent reads in a decomposed state
CN109271869B (zh) 人脸特征值提取方法、装置、计算机设备及存储介质
US10740317B2 (en) Using message-passing with procedural code in a database kernel
CN113342839A (zh) 数据处理方法、装置、终端设备和存储介质
US9342351B1 (en) Systems and methods for efficient DB2 outage operations
CN111459913B (zh) 分布式数据库的容量扩展方法、装置及电子设备
US10810124B2 (en) Designations of message-passing worker threads and job worker threads in a physical processor core
WO2023185309A1 (zh) 数据同步方法和系统、计算机可读存储介质
CN111400097A (zh) 数据的备份方法、装置、系统和计算机可读存储介质

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: 20852865

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20852865

Country of ref document: EP

Kind code of ref document: A1