WO2020135551A1 - 一种数据库同步复制的方法和装置 - Google Patents

一种数据库同步复制的方法和装置 Download PDF

Info

Publication number
WO2020135551A1
WO2020135551A1 PCT/CN2019/128558 CN2019128558W WO2020135551A1 WO 2020135551 A1 WO2020135551 A1 WO 2020135551A1 CN 2019128558 W CN2019128558 W CN 2019128558W WO 2020135551 A1 WO2020135551 A1 WO 2020135551A1
Authority
WO
WIPO (PCT)
Prior art keywords
priority
database
table data
source
source table
Prior art date
Application number
PCT/CN2019/128558
Other languages
English (en)
French (fr)
Inventor
周日明
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Priority to EP19903920.7A priority Critical patent/EP3905064A4/en
Publication of WO2020135551A1 publication Critical patent/WO2020135551A1/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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/275Synchronous replication

Definitions

  • This application relates to the technical field of databases, and in particular to a method and device for synchronous database replication.
  • databases are typically divided into two subsystems: online transaction database (OLTP) and online analysis database (OLAP).
  • OLTP online transaction database
  • OLAP online analysis database
  • ETL process Extract, Transfer, Load
  • the source database will generate new change data.
  • This part of the change data is generally extracted and filtered from the archive log file (or archive log stream) according to the order in which the source database completes the transaction, and then parsed and loaded to the destination Database.
  • a database transaction will involve operations on multiple tables, and accordingly, it will be loaded into multiple tables in the destination database.
  • the multiple tables involved here are called Purpose table. Some tables may be more important for analysis, such as customer account tables, and some tables are not urgent for analysis, such as branch sub-business tables.
  • the former is called the core table, and the latter is called the peripheral table.
  • the inventor of the present invention found that the source database operates on the core table and the peripheral table in one transaction. But for the destination database, some analyses only need to analyze the core tables, and these analyses have higher priority and need to be transferred and loaded in a shorter time, while the peripheral tables are relatively less urgent. However, based on the transaction-based unloading process, the data changes of the core table and the peripheral table cannot be distinguished. Instead, the changed data of the core table and the peripheral table are subjected to the network transmission and loading process together, which takes up more time overhead.
  • the purpose of the embodiments of the present application is to provide a method and device for database synchronous replication.
  • the embodiments of the present application are implemented by the following aspects.
  • an embodiment of the present application provides a database synchronization replication method, including: setting a priority; extracting changed source table data from a source database; and converting the converted source table data based on the priority Load into the destination database.
  • an embodiment of the present application provides a database synchronous replication device, including: a strategy module for setting priorities; an extraction module for extracting changed source table data from a source database; and a loading module for Based on the priority, the converted source table data is loaded into the destination database.
  • an embodiment of the present application provides an electronic device, including: a memory, a processor, and computer-executable instructions stored on the memory and executable on the processor, the computer-executable instructions being When executed by the processor, the steps of the method described in the first aspect above are implemented.
  • an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium is used to store computer-executable instructions, and the computer-executable instructions are implemented by the processor as described in the first aspect above The steps of the method.
  • an embodiment of the present application provides a computer program product.
  • the computer program product includes a computer program stored on a non-transitory computer-readable storage medium.
  • the computer program includes program instructions. When the program instructions When executed by a computer, the computer is caused to perform the methods described in the above aspects.
  • FIG. 1 shows a schematic flowchart of a database synchronization replication method provided by an embodiment of the present application
  • FIG. 2 shows another schematic flowchart of a database synchronization replication method provided by an embodiment of the present application
  • FIG. 3 shows another schematic flowchart of a database synchronization replication method provided by an embodiment of the present application
  • FIG. 4 shows another schematic flowchart of a database synchronization replication method provided by an embodiment of the present application
  • FIG. 5 shows a schematic structural diagram of a database synchronization replication device provided by an embodiment of the present application
  • FIG. 6 shows a schematic diagram of a hardware structure of an electronic device that executes a database synchronization replication method provided by an embodiment of the present application.
  • FIG. 1 shows a schematic flowchart of a database synchronization replication method provided by an embodiment of the present application.
  • the method may be executed by an electronic device, such as a terminal device or a server device.
  • the method may be executed by software or hardware installed in the terminal device or the server device.
  • the server includes but is not limited to: a single server, a server cluster, a cloud server, or a cloud server cluster. As shown in the figure, the method may include the following steps.
  • the priority of the core table is higher, which can be set to 1, and the priority of the peripheral table is lower, which can be set to 2, 3, etc.
  • the priority can be set based on the subscription rules sent by the destination database, or according to the distribution strategy of the source database.
  • a static priority including:
  • archive logs For example, archive logs.
  • a method for database synchronization replication provided by an embodiment of the present application, by setting a priority, extracts changed source table data from a source database, and based on the priority, loads the converted source table data into In the destination database, important data can be loaded as soon as possible, reducing network delay, saving time overhead, and optimizing network transmission strategies.
  • FIG. 2 shows another schematic flowchart of a database synchronization replication method provided by an embodiment of the present application.
  • the method may be executed by an electronic device, such as a terminal device or a server device.
  • the method may be executed by software or hardware installed in the terminal device or the server device.
  • the server includes but is not limited to: a single server, a server cluster, a cloud server, or a cloud server cluster. As shown in the figure, the method may include the following steps.
  • the priority of the core table is higher, which can be set to 1, and the priority of the peripheral table is lower, which can be set to 2, 3, etc.
  • archive logs For example, archive logs.
  • S20 After S20, it also includes S21: when the source table data changes multiple times, save the last source table data.
  • This step includes two implementations. One is to keep the original value of the first change record and the new value of the last change record. The other is that the original value of the first change record is not retained, and only the new value of the latest change record is transmitted.
  • the dynamic priority may be calculated according to the weighting parameter and the priority.
  • the idea of implementing dynamic priority is to dynamically increase the corresponding weight.
  • set a weighting parameter weight according to the impact of the table on the statistical results, the weight of each record is converted, for example, if there are 100 change records in Table B, the impact is equivalent to Table A 1 change record, the weight of each record in Table B is 0.01.
  • the default weight is 1.
  • the setting method of the weight parameter is as follows:
  • the number of weighted records calculated by each parsing queue is different. For example, if there are 100 tables, 100 different weighted record values may be calculated.
  • the interval is divided according to the number of priority files. For example, there are 3 priority levels, and the 100 different values are divided into 3 interval segments, which are assigned to 3 different priorities.
  • the dynamic priority when the dynamic priority is higher than the priority, the dynamic priority may be set to the priority.
  • static priority is set, and in some tables, dynamic priority is set. Examples are as follows:
  • the processing strategy is as follows. First, the above dynamic priority calculation process is performed to obtain the dynamic priority of each table queue, and then the dynamic priority of each table queue is compared with its static priority. If the dynamic priority If the level is higher than the static priority, the dynamic priority will prevail; if the dynamic priority is lower than the static priority, the static priority will prevail. That is, take the maximum of the two.
  • the weighting parameter may be adjusted according to the type of operation.
  • Some statistics types are sensitive to the specific changes of the table, such as counting the amount of newly added data. At this time, they are only sensitive to the operation of the INSERT type. You can set a higher weight or fine-tune the weight separately. Examples are as follows:
  • the number of records of each type of operation is also recorded in the statistical information, and the weighted summation of each type of operation can be performed according to the dynamic priority. Level or dynamic fine-tuning calculation process for calculation.
  • the largest of the two items can be selected last. For example, the weighted sum of each operation is greater than the weight of the total number of records, the former is taken, and the latter is taken.
  • the priority may be adjusted according to a preset fine-tuning strategy.
  • the static priority is mainly used, and each level is fine-tuned according to the number of records. Examples are as follows:
  • This strategy defines a static priority for the table itself, but at the same time as the number of records increases, it can be raised to the previous priority level.
  • the policy priority does not need to be compared with other table queues. As long as the number of records multiplied by the weighting parameter (weight) is greater than 1, the priority is raised by one level. If the weighted result is less than 1, the static priority level is still used.
  • the source table data may be counted, and the priority may be adjusted according to the statistical result.
  • the parsing module parses each table, it counts the number of records corresponding to each table and saves it in the parsing queue. After the parsing queue sends the corresponding record number to the downstream link, the statistical quantity of the queue is updated. Perform statistics on the source table data, and adjust the priority according to the results of the statistics.
  • loading the converted source table data into the destination database may include the following strategies.
  • transmission is based on priority. Including the following methods:
  • a method for database synchronization replication provided by an embodiment of the present application, by setting a priority, extracts changed source table data from a source database, and based on the priority, loads the converted source table data into In the destination database, important data can be loaded as soon as possible, reducing network delay, saving time overhead, and optimizing network transmission strategies.
  • a method for database synchronous replication provided by an embodiment of the present application can save and merge the last piece of source table data when the source table data changes multiple times, which greatly reduces the amount of data to be transmitted and saves network transmission data the amount.
  • the method for database synchronization replication provided by the embodiments of the present application can finely control the synchronization process of tables through the setting of multiple dynamic priority strategies to meet the specific application scenario requirements of the business layer, and improve the synchronization efficiency. At the same time, the impact on the statistical results is reduced as low as possible.
  • FIG. 3 shows another schematic flowchart of a database synchronous replication method provided by an embodiment of the present application.
  • the method may be executed by an electronic device, such as a terminal device or a server device.
  • the method may be executed by software or hardware installed in the terminal device or the server device.
  • the server includes but is not limited to: a single server, a server cluster, a cloud server, or a cloud server cluster. As shown in the figure, the method may include the following steps.
  • the priority of the core table is higher, which can be set to 1, and the priority of the peripheral table is lower, which can be set to 2, 3, etc.
  • archive logs For example, archive logs.
  • S22 Generate a status summary of the source table data, where the status summary includes the loading status of the source table data, and send the status summary to the destination database.
  • a delay summary table can be introduced to let the destination database know the current data delay.
  • the delay summary table records how much data is delayed in the table on the current destination database.
  • the source-side parsing module preferentially synchronizes the statistical data to the delay summary table.
  • the destination database can determine the current table to be queried, and how much the data is different from the source database.
  • the database has some statistical summary system tables that record the data of each table, such as the total number of rows in the table.
  • the delay summary table can also be implemented in two ways. One way is to extend the above-mentioned delayed summary information on the existing statistical summary system table. You can also extend a new system table (delay summary table) to describe separately. The specific description here uses the new table method, which is the same as the extension in the existing system table.
  • the delay summary table can include field 1 as the table name, field 2 as the total number of records, field 3 as the synchronized time, field 4 through field 6 as the number of times to be synchronized for three types of operations (INSERT/UPDATE/DELETE), and field 7 as The total number of synchronizations.
  • Field 1 can also be a representation of the implementation of the table within the database, such as the table object unique number (OID).
  • OID table object unique number
  • the total number of records in field 2 is already counted in the existing database. The original statistical table is sufficient. Therefore, it is not necessary to set this field in this table.
  • Field 2 is described here for ease of understanding.
  • S23 Receive the transmission strategy sent by the destination server, and adjust the priority according to the transmission strategy.
  • the transmission strategy sent by the destination server includes the requirements on the transmission priority and other strategies defined by the destination server.
  • the user of the destination database can set the delay time or the degree of delay of the table according to the specific business situation. Therefore, this step allows the destination database to request the delay of the table, and the delay request can also be specified at the query time.
  • Allowable delay time If the difference between the synchronized time of the table in the delay summary table and the current time of the destination database is greater than the allowable delay time, the requirements are not met.
  • Allowable delay ratio If the ratio of the total number of times to be synchronized of the table in the delay summary table to the total number of records in the table is greater than the allowable delay ratio, the requirement is not met.
  • Delay ratio of allowed new additions If the ratio of the number of INSERTs to be synchronized to the total number of records in the delay summary table of the table is greater than the allowable delay ratio, the requirement is not met.
  • Delay ratio of allowed update times If the ratio of the number of UPDATEs to be synchronized to the total number of records in the table in the delay summary table is greater than the delay ratio, the requirement is not met.
  • Delay ratio of allowed deletion times If the ratio of the number of DELETE to be synchronized to the total number of records of the table in the delay summary table is greater than the allowed delay ratio, the requirement is not met.
  • the analysis of the real-time transmission strategy includes: the SQL parser expands the corresponding syntax tree to parse the above SQL clauses.
  • the extended clause is parsed into the attribute name and attribute value of the specific table.
  • the SQL parser adds related grammatical keywords and grammatical format of extended clauses (using equivalent expressions).
  • a grammar tree is composed of multiple grammatical node structures of different types (becomes Node). For table-building statements and query statements, the corresponding grammar node structure is expanded:
  • the query tree (SELECT) syntax tree expansion table scans the 5 attributes of the node. After the query statement is parsed, the corresponding attribute value is associated with the five attribute names of the scan node of the table.
  • the strategy needs to be stored persistently in the database.
  • a system table is used to save the metadata information of all tables.
  • One way is to expand the above five fields on the existing system table. You can also create a new system table (real-time transmission strategy table) to describe separately. The specific description here uses the new table method, which is the same as the extension in the existing system table.
  • the real-time transmission strategy table may include field 1 as the table name, field 2 as the allowable delay time, and field 3 as the allowable delay ratio.
  • Field 1 can also be a representation of the implementation of the table within the database, such as the table object unique number (OID).
  • OID table object unique number
  • Field 2 can use character description or time type, but the meaning is delay time.
  • Field 3 can also be divided into four specific types of fields (INSERT allows delay rate. UPDATE allows delay rate, DELETE allows delay rate, and total times allows delay rate).
  • processes or threads are assigned to the source table data of different priorities, and the converted source table data is loaded into the destination database.
  • priority is given to processing in terms of CPU processing time and network transmission.
  • the dynamic priority may be calculated according to the weighting parameter and the priority.
  • the dynamic priority when the dynamic priority is higher than the priority, the dynamic priority may be set to the priority.
  • the weighting parameter may be adjusted according to the type of operation.
  • the priority may be adjusted according to a preset fine-tuning strategy.
  • the source table data may be counted, and the priority may be adjusted according to the statistical result.
  • the synchronized time describes that all the change records before this time have been synchronized to the destination database.
  • the parsing module records the current time in each change record of the parsing queue (timestamp field). After the analysis queue distributes the changed data to the conversion module, the time stamp field of the change record is taken out and updated to the synchronized time field of the statistical data. The statistical data is finally transmitted by the real-time scheduling server to the real-time scheduling client, and the latter is written into the delay summary table.
  • the parsing module marks the synchronized time of the table as empty, which means that the change data of the table has been synchronized in real time.
  • the import module imports the changed data into the destination database, and then feeds back to the statistical data.
  • the import module imports the changed data, takes out the timestamp field from the change record, and then feeds back to the conversion module; the conversion module obtains the true source table through the mapping relationship between the source table and the destination table. Synchronized time; the conversion module feeds back the real synchronization time of the source table to the parsing module, and the parsing module updates the synchronized time field of the statistical table, and then synchronizes to the delay summary table of the destination database.
  • the SQL executor performs processing according to the parsed execution tree.
  • the interface of the real-time scheduling client needs to be called, and the real-time scheduling client returns whether the corresponding table satisfies the allowable delay requirement.
  • the specific interface is as follows:
  • the input parameter is the name of the table, or the unique ID (OID) of the table object is used.
  • OID unique ID
  • the on-demand scheduling client compares with the real-time transmission strategy table based on the information in the delay summary table.
  • the calculation method of the comparison is described in the grammar section of the real-time transmission strategy. If the delay requirement is met, then success is returned; if no delay requirement is not met, then failure is returned.
  • the real-time scheduling client when the real-time scheduling client detects that the delay requirement is not met, it initiates a request for real-time scheduling to the real-time scheduling server.
  • the real-time scheduling server informs the analysis module that the remaining untransmitted change data is processed with the highest priority.
  • the on-demand scheduling client is not returned to the SQL executor.
  • the real-time scheduling server still synchronizes the statistical data to the delay summary table in real time.
  • the real-time scheduling client periodically queries the delay summary table to make a new judgment until it meets the delay requirement. Only after returning from the function call, the SQL executor performs the process of reading the table data.
  • the real-time scheduling server synchronizes the statistical data to the real-time scheduling client in real time, and the latter writes the statistical data to the delay summary table.
  • the real-time scheduling server regularly synchronizes the statistical data to the real-time scheduling client at a higher time frequency.
  • the duration of the timer is the length of the statistical data delay. .
  • the second method is that the server calculates the variable of statistical data, and when the amount of change reaches a certain level, the client is immediately synchronized.
  • the calculation method of the change amount is to sum the change values of the number of times to be synchronized of all tables. When the sum value reaches a certain value, the statistical data is immediately synchronized to the client.
  • Both of these methods are push methods, which basically meet the real-time requirements.
  • the client can use the pull method, and when judging the delay, it can actively query the server once.
  • the server In addition to processing synchronous statistical data with the client, the server also processes real-time scheduling requests from the client. As described in the real-time scheduling client section above, if the client judges that the data of the delay summary does not meet the requirements for allowable delay, it will issue a scheduling command to the server. After receiving the scheduling command, the server transmits the scheduling command to the parsing module, so that the parsing queue transmits the changed data at the highest priority level. Here the highest priority is transmitted immediately.
  • real-time scheduling relay if the source and destination tables have not undergone intermediate conversion and the table names and fields of the source and destination tables are the same, the real-time scheduling client and the real-time scheduling server can communicate directly without going through the scheduling relay .
  • the server-side statistical data uses the source table table name, and the client is the destination table table name.
  • the two have a mapping relationship in the conversion statement of the conversion module.
  • a relay module real-time scheduling relay
  • the function of this module is to find the corresponding destination table through the source table, or find the corresponding source table through the destination table.
  • the basis for conversion is the conversion statement. Except for table name conversion, other information is transparently transmitted.
  • a method for database synchronization replication provided by an embodiment of the present application, by setting a priority, extracts changed source table data from a source database, and based on the priority, loads the converted source table data into In the destination database, important data can be loaded as soon as possible, reducing network delay, saving time overhead, and optimizing network transmission strategies.
  • a method for database synchronous replication provided by an embodiment of the present application can save and merge the last piece of source table data when the source table data changes multiple times, which greatly reduces the amount of data to be transmitted and saves network transmission data the amount.
  • the method for database synchronization replication provided by the embodiments of the present application can enable the user of the destination database to accurately know the data transmission status of each table, such as a delay situation, through the status summary.
  • the method for database synchronous replication provided by the embodiments of the present application enables the user of the destination database to set the transmission strategy such as the table delay time or the degree of delay according to the specific business conditions through the transmission strategy.
  • FIG. 4 shows another schematic flowchart of a database synchronization replication method provided by an embodiment of the present application.
  • the method may be executed by an electronic device, such as a terminal device or a server device.
  • the method may be executed by software or hardware installed in the terminal device or the server device.
  • the server includes but is not limited to: a single server, a server cluster, a cloud server, or a cloud server cluster. As shown in the figure, the method may include the following steps.
  • the priority of the core table is higher, which can be set to 1, and the priority of the peripheral table is lower, which can be set to 2, 3, etc.
  • the setting priority may include:
  • Step S11 Set the resolution priority.
  • Step S12 Set the conversion priority.
  • archive logs Parse the source table data extracted from the source database according to the parsing priority.
  • the source table data extracted from the source database is converted.
  • S22 Generate a status summary of the source table data, where the status summary includes the loading status of the source table data, and send the status summary to the destination database.
  • a delay summary table can be introduced to let the destination database know the current data delay.
  • the delay summary table records how much data is delayed in the table on the current destination database.
  • the source-side parsing module preferentially synchronizes the statistical data to the delay summary table.
  • the destination database can determine the current table to be queried, and how much the data is different from the source database.
  • S23 Receive the transmission strategy sent by the destination server, and adjust the priority according to the transmission strategy.
  • the transmission strategy sent by the destination server includes the requirements on the transmission priority and other strategies defined by the destination server. Therefore, this step allows the destination database to request the delay of the table. The delay request can also be specified at the query time.
  • processes or threads are assigned to the source table data of different priorities, and the converted source table data is loaded into the destination database.
  • priority is given to processing in terms of CPU processing time and network transmission.
  • the dynamic priority may be calculated according to the weighting parameter and the priority.
  • the dynamic priority when the dynamic priority is higher than the priority, the dynamic priority may be set to the priority.
  • the weighting parameter may be adjusted according to the type of operation.
  • the priority may be adjusted according to a preset fine-tuning strategy.
  • the source table data may be counted, and the priority may be adjusted according to the statistical result.
  • a method for database synchronization replication provided by an embodiment of the present application, by setting a priority, extracts changed source table data from a source database, and based on the priority, loads the converted source table data into In the destination database, important data can be loaded as soon as possible, reducing network delay, saving time overhead, and optimizing network transmission strategies.
  • a method for database synchronous replication provided by an embodiment of the present application can save and merge the last piece of source table data when the source table data changes multiple times, which greatly reduces the amount of data to be transmitted and saves network transmission data the amount.
  • the method for database synchronization replication provided by the embodiments of the present application can enable the user of the destination database to accurately know the data transmission status of each table, such as a delay situation, through the status summary.
  • the method for database synchronous replication provided by the embodiments of the present application enables the user of the destination database to set the transmission strategy such as the table delay time or the degree of delay according to the specific business conditions through the transmission strategy.
  • the method for database synchronization replication provided by the embodiments of the present application can finely control the synchronization process of tables by setting the resolution priority and the conversion priority, to meet the specific application scenario requirements of the business layer, and to improve synchronization At the same time as efficiency, as low as possible to reduce the impact on statistical results.
  • FIG. 5 shows a schematic structural diagram of an apparatus for synchronous database replication provided by an embodiment of the present application.
  • the apparatus 100 includes a policy module 110, an extraction module 120, and a loading module 130.
  • the policy module 110 is used to set priorities.
  • the extraction module 120 is used to extract the changed source table data from the source database.
  • the loading module 130 is used to load the converted source table data into the destination database based on the priority.
  • the extraction module 120 is used to save the last piece of source table data when the source table data changes multiple times.
  • the extraction module 120 is used to generate a status summary of the source table data after extracting the changed source table data from the source database, where the status summary includes the loading status of the source table data ; Send the status summary to the destination database.
  • the extraction module 120 is further configured to receive the transmission strategy sent by the destination server after extracting the changed source table data from the source database, and adjust the priority according to the transmission strategy.
  • the loading module 130 is configured to allocate processes or threads to the source table data of different priorities based on the priority, and load the converted source table data into the destination database.
  • the strategy module 110 is used to set a resolution priority before extracting the changed source table data from the source database, and to extract from the source database according to the resolution priority analysis The source table data.
  • the strategy module 110 is used to set a conversion priority; according to the conversion priority, the source table data extracted from the source database is converted.
  • the policy module 110 is used to calculate the dynamic priority based on the weighting parameter and the priority.
  • the policy module 110 is used to set the dynamic priority to the priority when the dynamic priority is higher than the priority.
  • the policy module 110 is used to adjust the weighting parameter according to the type of operation.
  • the strategy module 110 is used to adjust the priority according to a preset fine-tuning strategy.
  • the extraction module 120 is further configured to perform statistics on the source table data after extracting the changed source table data from the source database; adjust the priority according to the statistical results level.
  • the device 100 provided by the embodiment of the present application can execute the methods described in the foregoing method embodiments, and realize the functions and beneficial effects of the methods described in the foregoing method embodiments, which will not be repeated here.
  • FIG. 6 shows a schematic diagram of a hardware structure of an electronic device that executes a database synchronization replication method provided by an embodiment of the present application.
  • the electronic device may have a relatively large difference due to different configurations or performance, and may include a Or more than one processor 701 and memory 702, and one or more stored application programs or data may be stored in the memory 702.
  • the memory 702 may be short-term storage or persistent storage.
  • the application stored in the memory 702 may include one or more modules (not shown in the figure), and each module may include a series of computer-executable instructions in the electronic device.
  • the processor 701 may be configured to communicate with the memory 702 and execute a series of computer-executable instructions in the memory 702 on the electronic device.
  • the electronic device may further include one or more power supplies 703, one or more wired or wireless network interfaces 704, one or more input/output interfaces 705, one or more keyboards 706, and so on.
  • the electronic device includes a memory, a processor, and computer-executable instructions stored on the memory and executable on the processor, and the computer-executable instructions are executed by the processor The following process is implemented: setting the priority; extracting the changed source table data from the source database; and loading the converted source table data into the destination database based on the priority.
  • an electronic device that executes a database synchronization replication method provided by an embodiment of the present application can execute the methods described in the foregoing method embodiments, and realize the functions and beneficial effects of the methods described in the foregoing method embodiments And will not be repeated here.
  • Server a device that provides computing services.
  • the composition of the server includes a processor, hard disk, memory, system bus, etc.
  • the server is similar to a general-purpose computer architecture, but due to the need to provide highly reliable services, the processing power, stability, and reliability , Security, scalability, manageability and other aspects are higher. Other electronic devices with data interaction function.
  • an embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium is used to store computer-executable instructions that are executed by a processor
  • the following processes are implemented: setting priority; extracting changed source table data from the source database; and loading the converted source table data into the destination database based on the priority.
  • the computer-readable storage medium includes read-only memory (Read-Only Memory, ROM for short), random access memory (Random Access Memory, RAM for short), magnetic disk or optical disk, etc.
  • an embodiment of the present application further provides a computer program product
  • the computer program product includes a computer program stored on a non-transitory computer-readable storage medium
  • the computer program includes program instructions .
  • the following processes are implemented: setting priority; extracting the changed source table data from the source database; based on the priority, loading the converted source table data into the destination database .
  • the computer program product provided by the embodiment of the present application can execute the methods described in the foregoing method embodiments, and realize the functions and beneficial effects of the methods described in the foregoing method embodiments, which will not be repeated here.

Landscapes

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

Abstract

一种数据库同步复制的方法和装置,该方法包括:设置优先级(S10);从源数据库中抽取变化的源表数据(S20);基于所述优先级,将转换后的所述源表数据加载到目的数据库中(S30)。

Description

一种数据库同步复制的方法和装置
交叉引用
本发明要求在2018年12月29日提交至中国专利局、申请号为201811640691.6、发明名称为“一种数据库同步复制的方法和装置”的中国专利申请的优先权,该申请的全部内容通过引用结合在本发明中。
技术领域
本申请涉及数据库技术领域,尤其涉及一种数据库同步复制的方法和装置。
背景技术
根据应用场景的不同,数据库典型地分为在线交易数据库(OLTP)和在线分析数据库(OLAP)两个子系统。日常使用和维护中,将已经完成的交易数据从OLTP子系统抽取出来,加载到OLAP子系统中,一般称为卸数过程或者ETL过程(抽取Extract、转换Transfer、加载Load)。在这里,前者称为源数据库,后者称为目的数据库。
随着在线业务的执行,源数据库会产生新的变更数据,这部分变更数据一般按照源数据库完成事务的先后顺序,从归档日志文件(或者归档日志流)中抽取过滤出来,然后解析加载到目的数据库中。
由于源数据库的数据变更是以数据库事务为单位进行的,一个数据库事务会涉及到对多个表的操作,相应地,会加载到目的数据库的多个表中,这里涉及的多个表称为目的表。有的表对分析来说可能更为重要,如客户账务表,有的表对分析来说并不紧迫,如分支子业务表。这里称前者为核心表、称后者为外围表。
基于此,本发明的发明人发现,源数据库在一个事务中对核心表和外围表进行操作。但对目的数据库来说,有些分析只需要对核心表进行分析,并且这些分析优先级更高,需要在更短的时间内完成传输和加载,而外围表相对来说则没有那么紧迫。但基于事务为单位的卸数过程,不能将核心表和外围表的数据变更区分出来,而是将核心表和外围表的变化数据一同进行网络传输和加载过程,占用了更多的时间开销。
公开于该背景技术部分的信息仅仅旨在增加对本发明的总体背景的理解,而不应当被视为承认或以任何形式暗示该信息构成已为本领域一般技术人员所公知的现有技术。
发明内容
本申请实施例的目的是提供一种数据库同步复制的方法和装置,本申请实施例是通过以下各方面实现的。
第一方面,本申请实施例提供了一种数据库同步复制的方法,包括:设置优先级;从源数据库中抽取变化的源表数据;基于所述优先级,将转换后的所述源表数据加载到目的数据库中。
第二方面,本申请实施例提供了一种数据库同步复制的装置,包括:策略模块,用于设置优先级;抽取模块,用于从源数据库中抽取变化的源表数据;加载模块,用于基于所述优先级,将转换后的所述源表数据加载到目的数据库中。
第三方面,本申请实施例提供了一种电子设备,包括:存储器、处理器和存储在所述存储器上并可在所述处理器上运行的计算机可执行指令,所述计算机可执行指令被所述处理器执行时实现如上述第一方面所述的方法的步骤。
第四方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质用于存储计算机可执行指令,所述计算机可执行指令被处理器执行时实现如上述第一方面所述的方法的步骤。
第五方面,本申请实施例提供了一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行以上各个方面所述的方法。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1示出本申请实施例提供的一种数据库同步复制的方法的一种流程示意图;
图2示出本申请实施例提供的一种数据库同步复制的方法的另一种流程示意图;
图3示出本申请实施例提供的一种数据库同步复制的方法的另一种流程示意图;
图4示出本申请实施例提供的一种数据库同步复制的方法的另一种流程示意图;
图5示出本申请实施例提供的一种数据库同步复制的装置的结构示意图;
图6示出执行本申请实施例提供的一种数据库同步复制的方法的电子设备的硬件结构示意图。
具体实施方式
为了使本技术领域的人员更好地理解本申请中的技术方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。
图1示出本申请实施例提供的一种数据库同步复制的方法的一种流程示意图,该方法可以由电子设备执行,例如终端设备或服务端设备。换言之,所述方法可以由安装在终端设备或服务端设备的软件或硬件来执行。所述服务端包括但不限于:单台服务器、服务器集群、云端服务器或云端服务器集群等。如图所示,该方法可以包括以下步骤。
S10:设置优先级。
例如可以为需要在短时间内完成传输和加载的表数据设置较高的优先级,反之,为不急于处理的表数据设置较低的优先级。比如核心表的优先级更高,可以设置为1,外围表的优先级更低,可以设置为2、3等。
本步骤可以基于目的数据库发送的订阅规则设置优先级,也可以根据源数据库的分发策略设置优先级。
具体地,可以包括设置静态优先级,包括:
直接设定源表的优先级,如下方式:
set priority ST1=1,ST2=2;
与转换语句合设,如下方式:
Select A,B,C from ST1 into DT1 with priority=2;
在目的表上设置,如下方式:
Select A,B,C from ST1 into DT1;Select D,E,F from ST2 into DT2;set priority DT1=1,DT2=2。
S20:从源数据库中抽取变化的源表数据。
例如如归档日志。
S30:基于所述优先级,将转换后的所述源表数据加载到目的数据库中。
加载优先级别高的源表数据时在CPU处理时间、网络传输等方面均优先得到处理。
由此,本申请实施例提供的一种数据库同步复制的方法,通过设置优先 级,从源数据库中抽取变化的源表数据,基于所述优先级,将转换后的所述源表数据加载到目的数据库中,使重要的数据能够尽速得到加载,减少网络延迟、节约时间开销,优化网络传输策略。
图2示出本申请实施例提供的一种数据库同步复制的方法的另一种流程示意图,该方法可以由电子设备执行,例如终端设备或服务端设备。换言之,所述方法可以由安装在终端设备或服务端设备的软件或硬件来执行。所述服务端包括但不限于:单台服务器、服务器集群、云端服务器或云端服务器集群等。如图所示,该方法可以包括以下步骤。
S10:设置优先级。
例如可以为需要在短时间内完成传输和加载的表数据设置较高的优先级,反之,为不急于处理的表数据设置较低的优先级。比如核心表的优先级更高,可以设置为1,外围表的优先级更低,可以设置为2、3等。
S20:从源数据库中抽取变化的源表数据。
例如如归档日志。
S20后还包括S21:当源表数据发生多次变化时,保存最后一条源表数据。
当同一条记录发生多次变更操作时,可以对多次变更操作进行合并,仅保留最后一次操作的最终数据,从而节省了传输带宽和处理时间。
本步骤包括两种实现方式,一种是保留首条变更记录的记录原值和最后一条变更记录的记录新值。另一种是不保留首条变更记录原值,只传输最新变更记录的记录新值。
S30:基于所述优先级,将转换后的所述源表数据加载到目的数据库中。
加载优先级别高的源表数据时在CPU处理时间、网络传输等方面均优先得到处理。
在一种可能的实现方式中,可以根据加权参数和所述优先级,计算动态优先级。
优先级别不高的表,随着变更记录数量的增加,因其对下游系统的统计结果影响会增大,出现这种情况时,也需要尽快地同步给目的数据库。除了上述静态的优先级策略外,可以设置动态优先级来解决该问题。
动态优先级实现的思路是,动态地增加相应的权重。不需要对表指定具体优先级别,而是设定一个加权参数weight,根据该表对统计结果的影响,折算每条记录的权重,比如表B如果存在100条变更记录,其影响相当于表A的1条变更记录,则表B每条记录的权重为0.01。另外,对于高优先级别的表,默认权重为1。
权重参数的设置方式如下:
1)直接设定源表的优先级,如下方式:
“set weight ST1=0.1,ST2=0.01;”
2)与转换语句合设,如下方式:
“Select A,B,C from ST1 into DT1 with weight=0.1;”
3)在目的表上设置,如下方式:
“Select A,B,C from ST1 into DT1;Select D,E,F from ST2 into DT2;set weight DT1=0.1,DT2=0.01;”
下面阐述动态优先级的计算过程。
步骤:1)将解析队列的记录数(即变更次数)乘以该表的记录权重(即weight参数),等到加权记录数;
2)比较每个解析队列的加权记录数。加权记录数越大,则其优先级越高。
因为存在较多的解析队列,每个解析队列计算后的加权记录数都有不同,比如有100个表,则可能会计算出100个不同的加权记录值。这里按优先级档数进行区间划分,比如有3个有优先级别,将这100个不同值按3个区间段划分,归属到3种不同的优先级上。
在一种可能的实现方式中,可以当动态优先级高于所述优先级时,将所述动态优先级设置为所述优先级。
在有些表设置了静态优先级,有些表设置了动态优先级的情况。举例如下:
“Select A,B,C from ST1 into DT1 with priority=2;
Select D,E,F from ST2 into DT2 with weight 0.1;”
存在混合情况时,处理策略如下,先执行上述的动态优先级计算过程,得出每个表队列的动态优先级,然后将每个表队列的动态优先级与其静态优先级进行比较,如果动态优先级别比静态优先级更高,则以动态优先级为准;如果动态优先级比静态优先级更低,则以静态优先级为准。即取两者的最大值。
在一种可能的实现方式中,可以根据操作类型对所述加权参数进行调整。
有些统计类型对表的特定变化敏感,比如统计新增的数据量,这时只对INSERT类型的操作比较敏感,可以单独设置更高的权重或者微调权重。举例如下:
“Select A,B,C from ST1 into DT1 with insert_weight=0.1 and update_weight=0.01 and delete_weight=0.01;”
“Select A,B,C from ST1 into DT1 with priority=2 and insert_weight=0.1 and update_weight=0.01 and delete_weight=0.01;”
因为归档日志解析的时候已经区分了INSERT/UPDATE/DELETE三种操作类型,统计信息中也记录了每个操作类型的记录数,对每一项操作类型进 行加权求和即可,再按照动态优先级或者动态微调的计算过程进行计算。
如果策略语句中还设置总记录数的权重,最后取值这两项的最大者即可。比如每项操作加权之和大于总记录数加权,则取前者,反之取后者。
在一种可能的实现方式中,可以根据预设的微调策略对所述优先级进行调整。
例如,以静态优先级为主,每个级别内部按记录条数进行微调。举例如下:
“Select A,B,C from ST1 into DT1 with priority=2 and weight=0.01;”
该策略对表本身定义了静态优先级,但同时随着记录数的增加,可以提升到上一个优先级别。
该策略优先级不需要与其他表队列进行比较,只要记录数乘以加权参数(weight)大于1,则将该优先级提升一级,如果加权结果后小于1,则仍采用静态优先级别。
在一种可能的实现方式中,可以在所述从源数据库中抽取变化的源表数据之后,对所述源表数据进行统计,根据所述统计的结果,调整所述优先级。
解析模块在解析每个表的时候,统计每个表对应记录的数量,保存在解析队列中。解析队列将对应记录数发送到下游环节后,更新该队列的统计数量。对所述源表数据进行统计,根据所述统计的结果,调整所述优先级。
所述基于所述优先级,将转换后的所述源表数据加载到目的数据库中可以包括以下策略。
为了使优先级高的表更快地导入到目标数据库,可以采用不同的资源控制策略。包括如下一些方法:
1.为不同优先级表分派不同的进程或者线程,通过操作系统层面的API为这些进程或者线程设置优先级,使得优先级更高的进程或者线程可以更快地得到调度。
2.在同一个进程或者线程中处理,每次总是优先处理最高优先级队里中的任务。优先级高的任务处理完毕后,才开始处理低优先级任务。
3.在同一个进程或者线程中处理,处理低优先级任务时,在特定的子过程中,检查是否有高优先级任务需要处理,如果存在高优先级的任务,暂停低优先级任务子过程,先处理高优先级任务,然后在恢复低优先级任务。
4.在业务比较繁忙时间段里,暂停低优先级任务,只处理优先级更高的任务。待处理压力下降后,再处理低优先级任务。暂停低优先级任务的方式,可以将低优先级队列里的数据暂时进行落盘,待恢复时进行处理。
在网络传输层面,按照优先级来传输。包括如下一些方法:
1.在分发(子)模块中,优先发送高优先级队里的变更数据。高优先级的变更数据发送完毕后,才开始发送低优先级队列里的变更数据。
2.为不同优先级的数据分配不同链路,通过网络层设置不同的网络服务级别。这些策略有:基于二层的CoS字段(IEEE802.1p)的优先级、基于IP层的IP优先级字段ToS优先级、基于IP层的IP层的DSCP(Differentiated Services Codepoint)字段优先级。该策略与网络环境有关系,适合在局域网络中使用。
3.为不同优先级队列配置不同路径的网络,高优先级的走时延更小,带宽更大的网络(如光纤、专网),低优先级的走共享网络等。该策略适合在跨数据中心、存在地理距离的时候使用。
由此,本申请实施例提供的一种数据库同步复制的方法,通过设置优先级,从源数据库中抽取变化的源表数据,基于所述优先级,将转换后的所述源表数据加载到目的数据库中,使重要的数据能够尽速得到加载,减少网络延迟、节约时间开销,优化网络传输策略。
此外,本申请实施例提供的一种数据库同步复制的方法,通过当源表数据发生多次变化时,保存最后一条源表数据能够合并传输,使得需要传输的数据量大幅减少,节省网络传输数据量。
此外,本申请实施例提供的一种数据库同步复制的方法,通过多种动态优先级策略的设置,能够精细化地控制表的同步过程,满足业务层特定的应用场景要求,在提高同步效率的同时,尽量低减少了对统计结果的影响。
图3示出本申请实施例提供的一种数据库同步复制的方法的另一种流程示意图,该方法可以由电子设备执行,例如终端设备或服务端设备。换言之,所述方法可以由安装在终端设备或服务端设备的软件或硬件来执行。所述服务端包括但不限于:单台服务器、服务器集群、云端服务器或云端服务器集群等。如图所示,该方法可以包括以下步骤。
S10:设置优先级。
例如可以为需要在短时间内完成传输和加载的表数据设置较高的优先级,反之,为不急于处理的表数据设置较低的优先级。比如核心表的优先级更高,可以设置为1,外围表的优先级更低,可以设置为2、3等。
S20:从源数据库中抽取变化的源表数据。
例如如归档日志。
S21:当源表数据发生多次变化时,保存最后一条源表数据。
当同一条记录发生多次变更操作时,可以对多次变更操作进行合并,仅保留最后一次操作的最终数据,从而节省了传输带宽和处理时间。
S22:生成源表数据的状态摘要,所述状态摘要包括所述源表数据的加载状态,将所述状态摘要发送至所述目的数据库。
例如,可以引入延迟摘要表,让目的数据库知道当前数据延迟的情况。延迟摘要表记录了当前目的数据库上的表存在多少数据的延迟。虽然该表的 变化数据尚未没有同步到目的数据库,但源端的解析模块优先将统计数据同步到延迟摘要表中。根据延迟摘要表,目的数据库即可判断出当前要查询的表,其数据与源数据库存在多大的差异。
与元数据表类似,数据库存在一些统计摘要的系统表,会记录每个表的数据情况,比如表的总记录行数。与策略表类似,延迟摘要表也可以通过两种方式来实施。一种方式是可以在现有的统计摘要系统表上扩展上述延迟的摘要信息。也可以自己扩展一个新的系统表(延迟摘要表)来单独描述。这里具体描述采用新表方式,在已有系统表中扩展与此类同。
延迟摘要表可以包括字段1为表名、字段2为记录总数、字段3为已同步时刻、字段4到字段6为三种操作类型(INSERT/UPDATE/DELETE)的待同步次数、字段7位待同步的总次数。字段1也可以是表在数据库内部的实现表示,比如是表对象唯一编号(OID)。字段2记录总数在现有数据库中已经有统计,采用原有的统计表即可,因此也可以不需要在该表中设置该字段。这里描述字段2是便于理解。
这里对字段3已同步时刻做一些额外说明,如果该表没有变更记录需要处理,则该字段设置为空,表明已经实时同步了。
S23:接收目的服务器发送的传输策略,根据所述传输策略调整所述优先级。
目的服务器发送的传输策略包括目的服务器定义的对传输优先级等策略的要求,目的数据库的使用者可以根据具体业务的情况,对表的延迟时间、或者延迟程度进行设置。由此,通过本步骤允许目的数据库对表的延迟提出要求,延迟要求还可以在查询时刻指定。
例如,可以通过两种方式设置表的实时传输策略:第一种是在建表(CREATE TABLE)时刻就进行设置;第二种方式是在查询语句(SELECT)中指定。
第一种方式,在建表语句(DDL)扩展允许延迟的子句。扩展的方式举例如下:
1)CREATE TABLE A(a int,b varchar,...)with allow_delay_time=5s;
2)CREATE TABLE A(a int,b varchar,...)with allow_delay_ratio=5%;
3)CREATE TABLE A(a int,b varchar,...)with allow_insert_delay_ratio=5%;
4)CREATE TABLE A(a int,b varchar,...)with allow_update_delay_ratio=5%;
5)CREATE TABLE A(a int,b varchar,...)with allow_delete_delay_ratio=5%;
6)CREATE TABLE A(a int,b varchar,...)with allow_delay_time=5s and  allow_delay_ratio=5%;
第二种方式,查询SQL(DQL)扩展允许延迟的条件。扩展方式举例如下:
1)SELETE a,b,...FROM A where@allow_delay_time=5s;
2)SELETE a,b,...FROM A where@allow_delay_ratio=5%;
3)SELETE a,b,...FROM A where@allow_insert_delay_ratio=5%;
4)SELETE a,b,...FROM A where@allow_insert_delay_ratio=5%and @allow_update_delay_ratio=5%;
上述扩展子句中,存在如下关键字:
1)允许延迟时间(allow_delay_time);
2)允许延迟比率(allow_delay_ratio);
3)允许新增次数的延迟比率(allow_insert_delay_ratio);
4)允许更新次数的延迟比率(allow_update_delay_ratio);
5)允许删除次数的延迟比率(allow_delete_delay_ratio);
判断规则如下:
允许延迟时间:如果延迟摘要表中该表的已同步时刻与目的数据库的当前时间的差值大于允许延迟时间,则不满足要求。
允许延迟比率:如果延迟摘要表中该表的待同步总次数与表的总记录数的比值大于该允许延迟比率,则不满足要求。
允许新增次数的延迟比率:如果延迟摘要表中该表的待同步INSERT次数与表的总记录数的比值大于该允许延迟比率,则不满足要求。
允许更新次数的延迟比率:如果延迟摘要表中该表的待同步UPDATE次数与表的总记录数的比值大于该延迟比率,则不满足要求。
允许删除次数的延迟比率:如果延迟摘要表中该表的待同步DELETE次数与表的总记录数的比值大于该允许延迟比率,则不满足要求。
这些关键字可以通过与条件(AND)进行组合,语义上,如果某一项不满足允许的延迟要求,则不满足该延迟要求。
实时传输策略的解析包括:SQL解析器扩展相应的语法树解析上述SQL子句。以上SQL经过SQL解析器处理时,扩展子句解析成具体表的属性名和属性值。具体地,SQL解析器增加相关的语法关键字、扩展子句的语法格式(采用等值表达式)。
一棵语法树由多个类型不同的语法节点结构组成(成为Node)。针对建表语句和查询语句,对相应的语法节点结构进行扩展:
1)建表语句(CREATE TABLE)的语法树扩展表节点的五个属性。建表语句通过解析后,将相应属性值关联到表五个属性名上,即如上所述的五个关键字。
2)查询语句(SELECT)的语法树扩展表扫描节点的5个属性。查询语句 通过解析后,将相应属性值关联到对该表的扫描节点的五个属性名上。
如果建表语句(CREATE TABLE)中扩展了实时传输策略,则需要将该策略持久化存储到数据库中。一般保存在数据库的元数据库中,使用一个系统表来保存所有表的元数据信息。一种方式是可以在现有的系统表上扩展上述五个字段。也可以自己新建立一个系统表(实时传输策略表)来单独描述。这里具体描述采用新表方式,在已有系统表中扩展与此类同。
实时传输策略表可以包括字段1为表名、字段2为允许延迟的时间、字段3为允许延迟的比率。
字段1也可以是表在数据库内部的实现表示,比如是表对象唯一编号(OID)。
字段2可以采用字符描述或者时间类型,但意义均为延迟时间。
字段3也可以分开为四个具体类型的字段(INSERT允许延迟率。UPDATE允许延迟率、DELETE允许延迟率、总次数允许延迟率)。
查询语句(SELECT)的延迟策略只在该语句执行过程中起作用,因此不需要持久化存储。
S30:基于所述优先级,将转换后的所述源表数据加载到目的数据库中。
基于所述优先级,为不同优先级的所述源表数据分配进程或线程,将转换后的所述源表数据加载到目的数据库中。加载优先级别高的源表数据时在CPU处理时间、网络传输等方面均优先得到处理。
在一种可能的实现方式中,可以根据加权参数和所述优先级,计算动态优先级。
在一种可能的实现方式中,可以当所述动态优先级高于所述优先级时,将所述动态优先级设置为所述优先级。
在一种可能的实现方式中,可以根据操作类型对所述加权参数进行调整。
在一种可能的实现方式中,可以根据预设的微调策略对所述优先级进行调整。
在一种可能的实现方式中,可以在所述从源数据库中抽取变化的源表数据之后,对所述源表数据进行统计,根据所述统计的结果,调整所述优先级。
已同步时刻是描述已经将该时刻之前的所有变化记录同步到了目的数据库。解析模块在解析日志时,将当前的时间记录在解析队列的每个变更记录中(时戳字段)。解析队列将变更数据分发到转换模块后,取出变更记录的时戳字段,更新到统计数据的已同步时刻字段中。统计数据最后由实时调度服务端传给实时调度客户端,由后者写入到延时摘要表中。另外,如果解析队列中变更记录已经处理完毕了,则解析模块将该表已同步时刻标记为空,意思是该表的变化数据已经实时得到同步了。
这种方式仍然存在误差,因为变更记录可能仅是从解析模块分发给了转 换模块,还没有导入到目的数据库上。正确实现方式是,导入模块将变更数据导入到目的数据库后,再反馈到统计数据中。为了跟准确地反应已同步时刻,导入模块将变更数据导入后,从变更记录中取出时戳字段,再反馈给转换模块;转换模块通过源表和目的表关联的映射关系,得到源表真正的已同步时刻;转换模块将源表真正的同步时刻反馈给解析模块,由解析模块更新到统计表的已同步时刻字段中,进而同步到目的数据库的延迟摘要表里。
关于实时调度客户端,SQL执行器依据解析后的执行树进行处理,在处理到表扫描节点时,需要调用实时调度客户端的接口,由实时调度客户端返回对应表是否满足允许延迟的要求。具体接口如下:
bool is_delay_allowed(char*table_names);
输入参数是表的名字,或者采用表对象的唯一编号(OID)。也可能存在多个表,采用分隔符号(如逗号)一次传输多个表。
按需调度客户端根据延迟摘要表的信息,与实时传输策略表进行比较,比较的计算方法在实时传输策略的语法章节中进行了描述。如果满足延迟要求,则返回成功;如果没有不满足延迟要求,则返回失败。
在一种可能的实现方式中,实时调度客户端检测到没有达到延迟要求时,发起实时调度的请求给实时调度服务端。实时调度服务端通知解析模块剩余未传输的变化数据以最高优先级处理。
直到所有延迟数据都已经传输到目的数据库后,按需调度客户端才返回给SQL执行器。
因为在数据传输过程中,统计数据会发生变化,实时调度服务端仍然将统计数据实时同步到延迟摘要表中,实时调度客户端定期查询延迟摘要表,进行重新的判断,直到达到满足延迟要求后才从该函数调用中返回,SQL执行器进行读取表数据的过程。
关于实时调度服务端,实时调度服务器实时地将统计数据同步给实时调度客户端,由后者将统计数据写入到延迟摘要表中。
实时同步统计数据,有几种不同的实现方式。由于统计数据量非常少,在网络上传输的开销较少,实时调度服务端以较高的时间频度,定期地同步统计数据给实时调度客户端,定时器的时长即为统计数据延迟的时长。
第二种方式是,服务端计算统计数据的变量化,当变化量达到一定程度时,立即给客户端进行同步。变化量的计算方法为将所有表的待同步次数的变化值求和,当该求和值达到一定数值时,立即将统计数据同步到客户端。
这两种方式都是推送方式,基本上满足实时性的要求。在一种可能的实现方式中,如果要求统计数据完全的实时一致,客户端可以采用拉取方式,在判断延迟时,可以向服务端主动查询一次。
服务端处理向客户端同步统计数据外,还要处理客户端的实时调度请求。 正如上述实时调度客户端章节所描述的,如果客户端判断延迟摘要的数据不满足允许延迟的要求,将向服务端发起调度命令。服务端收到该调度命令后,向解析模块传递该调度命令,让解析队列以最高优先级的级别传递变更数据。这里最高优先级即立刻进行传输。
关于实时调度中继,如果源表和目的表没有经过中间转换,源表和目的表的表名、字段都相同,则实时调度客户端和实时调度服务端可以直接通信,不需要经过调度中继。
如果目的表和源表有所不同,比如表名不一样,服务端的统计数据用的是源表表名,而客户端是目的表表名,两者在转换模块的转换语句中有映射关系。这样需要在转换模块中引入中继模块(实时调度中继),这个模块的作用是通过源表找到对应的目的表,或者通过目的表找到对应的源表。转换的依据是转换语句。除了表名转换外,其他信息均进行透传。
由此,本申请实施例提供的一种数据库同步复制的方法,通过设置优先级,从源数据库中抽取变化的源表数据,基于所述优先级,将转换后的所述源表数据加载到目的数据库中,使重要的数据能够尽速得到加载,减少网络延迟、节约时间开销,优化网络传输策略。
此外,本申请实施例提供的一种数据库同步复制的方法,通过当源表数据发生多次变化时,保存最后一条源表数据能够合并传输,使得需要传输的数据量大幅减少,节省网络传输数据量。
此外,本申请实施例提供的一种数据库同步复制的方法,通过状态摘要能够使目的数据库的使用者能够准确地获知每个表的数据的传输状态,例如延迟情况。
此外,本申请实施例提供的一种数据库同步复制的方法,通过传输策略能够使得目的数据库的使用者可以根据具体业务的情况,对表的延迟时间、或者延迟程度等传输策略进行设置。
图4示出本申请实施例提供的一种数据库同步复制的方法的另一种流程示意图,该方法可以由电子设备执行,例如终端设备或服务端设备。换言之,所述方法可以由安装在终端设备或服务端设备的软件或硬件来执行。所述服务端包括但不限于:单台服务器、服务器集群、云端服务器或云端服务器集群等。如图所示,该方法可以包括以下步骤。
S10:设置优先级。
例如可以为需要在短时间内完成传输和加载的表数据设置较高的优先级,反之,为不急于处理的表数据设置较低的优先级。比如核心表的优先级更高,可以设置为1,外围表的优先级更低,可以设置为2、3等。
在一种可能的实现方式中,所述设置优先级可以包括:
步骤S11:设置解析优先级。
步骤S12:设置转换优先级。
S20:从源数据库中抽取变化的源表数据。
例如如归档日志。根据所述解析优先级解析从所述源数据库中抽取出的所述源表数据。
根据所述转换优先级,转换从所述源数据库中抽取出的所述源表数据。
S21:当源表数据发生多次变化时,保存最后一条源表数据。
当同一条记录发生多次变更操作时,可以对多次变更操作进行合并,仅保留最后一次操作的最终数据,从而节省了传输带宽和处理时间。
S22:生成源表数据的状态摘要,所述状态摘要包括所述源表数据的加载状态,将所述状态摘要发送至所述目的数据库。
例如,可以引入延迟摘要表,让目的数据库知道当前数据延迟的情况。延迟摘要表记录了当前目的数据库上的表存在多少数据的延迟。虽然该表的变化数据尚未没有同步到目的数据库,但源端的解析模块优先将统计数据同步到延迟摘要表中。根据延迟摘要表,目的数据库即可判断出当前要查询的表,其数据与源数据库存在多大的差异。
S23:接收目的服务器发送的传输策略,根据所述传输策略调整所述优先级。
目的服务器发送的传输策略包括目的服务器定义的对传输优先级等策略的要求,由此,通过本步骤允许目的数据库对表的延迟提出要求,延迟要求还可以在查询时刻指定。
S30:基于所述优先级,将转换后的所述源表数据加载到目的数据库中。
基于所述优先级,为不同优先级的所述源表数据分配进程或线程,将转换后的所述源表数据加载到目的数据库中。加载优先级别高的源表数据时在CPU处理时间、网络传输等方面均优先得到处理。
在一种可能的实现方式中,可以根据加权参数和所述优先级,计算动态优先级。
在一种可能的实现方式中,可以当所述动态优先级高于所述优先级时,将所述动态优先级设置为所述优先级。
在一种可能的实现方式中,可以根据操作类型对所述加权参数进行调整。
在一种可能的实现方式中,可以根据预设的微调策略对所述优先级进行调整。
在一种可能的实现方式中,可以在所述从源数据库中抽取变化的源表数据之后,对所述源表数据进行统计,根据所述统计的结果,调整所述优先级。
由此,本申请实施例提供的一种数据库同步复制的方法,通过设置优先级,从源数据库中抽取变化的源表数据,基于所述优先级,将转换后的所述源表数据加载到目的数据库中,使重要的数据能够尽速得到加载,减少网络 延迟、节约时间开销,优化网络传输策略。
此外,本申请实施例提供的一种数据库同步复制的方法,通过当源表数据发生多次变化时,保存最后一条源表数据能够合并传输,使得需要传输的数据量大幅减少,节省网络传输数据量。
此外,本申请实施例提供的一种数据库同步复制的方法,通过状态摘要能够使目的数据库的使用者能够准确地获知每个表的数据的传输状态,例如延迟情况。
此外,本申请实施例提供的一种数据库同步复制的方法,通过传输策略能够使得目的数据库的使用者可以根据具体业务的情况,对表的延迟时间、或者延迟程度等传输策略进行设置。
此外,本申请实施例提供的一种数据库同步复制的方法,通过设置解析优先级,以及设置转换优先级,能够精细化地控制表的同步过程,满足业务层特定的应用场景要求,在提高同步效率的同时,尽量低减少了对统计结果的影响。
图5示出本申请实施例提供的一种数据库同步复制的装置的结构示意图,该装置100包括:策略模块110、抽取模块120和加载模块130。
策略模块110用于设置优先级。抽取模块120用于从源数据库中抽取变化的源表数据。加载模块130用于基于所述优先级,将转换后的所述源表数据加载到目的数据库中。
在一种可能的实现方式中,抽取模块120用于当所述源表数据发生多次变化时,保存最后一条源表数据。
在一种可能的实现方式中,抽取模块120用于在所述从源数据库中抽取变化的源表数据之后,生成源表数据的状态摘要,所述状态摘要包括所述源表数据的加载状态;将所述状态摘要发送至所述目的数据库。
在一种可能的实现方式中,抽取模块120还用于在所述从源数据库中抽取变化的源表数据之后,接收目的服务器发送的传输策略,根据所述传输策略调整所述优先级。
在一种可能的实现方式中,加载模块130用于基于所述优先级,为不同优先级的所述源表数据分配进程或线程,将转换后的所述源表数据加载到目的数据库中。
在一种可能的实现方式中,策略模块110用于在所述从源数据库中抽取变化的源表数据之前,设置解析优先级,并且根据所述解析优先级解析从所述源数据库中抽取出的所述源表数据。
在一种可能的实现方式中,策略模块110用于设置转换优先级;根据转换优先级,转换从所述源数据库中抽取出的所述源表数据。
在一种可能的实现方式中,策略模块110用于根据加权参数和所述优先 级,计算动态优先级。
在一种可能的实现方式中,策略模块110用于当所述动态优先级高于所述优先级时,将所述动态优先级设置为所述优先级。
在一种可能的实现方式中,策略模块110用于根据操作类型对所述加权参数进行调整。
在一种可能的实现方式中,策略模块110用于根据预设的微调策略对所述优先级进行调整。
在一种可能的实现方式中,抽取模块120还用于在所述从源数据库中抽取变化的源表数据之后,对所述源表数据进行统计;根据所述统计的结果,调整所述优先级。
本申请实施例提供的该装置100,可执行前文方法实施例中所述的各方法,并实现前文方法实施例中所述的各方法的功能和有益效果,在此不再赘述。
图6示出执行本申请实施例提供的一种数据库同步复制的方法的电子设备的硬件结构示意图,如图所示,该电子设备可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上的处理器701和存储器702,存储器702中可以存储有一个或一个以上存储应用程序或数据。其中,存储器702可以是短暂存储或持久存储。存储在存储器702的应用程序可以包括一个或一个以上模块(图示未示出),每个模块可以包括对该电子设备中的一系列计算机可执行指令。在一种可能的实现方式中,处理器701可以设置为与存储器702通信,在该电子设备上执行存储器702中的一系列计算机可执行指令。该电子设备还可以包括一个或一个以上电源703,一个或一个以上有线或无线网络接口704,一个或一个以上输入输出接口705,一个或一个以上键盘706等。
在一个具体的实施例中,该电子设备包括存储器、处理器和存储在所述存储器上并可在所述处理器上运行的计算机可执行指令,所述计算机可执行指令被所述处理器执行时实现以下流程:设置优先级;从源数据库中抽取变化的源表数据;基于所述优先级,将转换后的所述源表数据加载到目的数据库中。
由此,执行本申请实施例提供的一种数据库同步复制的方法的电子设备可执行前文方法实施例中所述的各方法,并实现前文方法实施例中所述的各方法的功能和有益效果,在此不再赘述。
服务器:提供计算服务的设备,服务器的构成包括处理器、硬盘、内存、系统总线等,服务器和通用的计算机架构类似,但是由于需要提供高可靠的服务,因此在处理能力、稳定性、可靠性、安全性、可扩展性、可管理性等方面要求较高。其他具有数据交互功能的电子装置。
在一种可能的实现方式中,本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质用于存储计算机可执行指令,所述计算机可执行指令被处理器执行时实现以下流程:设置优先级;从源数据库中抽取变化的源表数据;基于所述优先级,将转换后的所述源表数据加载到目的数据库中。
由此,所述计算机可执行指令被处理器执行时能够执行前文方法实施例中所述的各方法,并实现前文方法实施例中所述的各方法的功能和有益效果,在此不再赘述。
其中,所述的计算机可读存储介质包括只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等。
在一种可能的实现方式中,本申请实施例还提供了一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,实现以下流程:设置优先级;从源数据库中抽取变化的源表数据;基于所述优先级,将转换后的所述源表数据加载到目的数据库中。
由此,执行本申请实施例提供的计算机程序产品能够执行前文方法实施例中所述的各方法,并实现前文方法实施例中所述的各方法的功能和有益效果,在此不再赘述。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所述仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。

Claims (15)

  1. 一种数据库同步复制的方法,其中,包括:
    设置优先级;
    从源数据库中抽取变化的源表数据;
    基于所述优先级,将转换后的所述源表数据加载到目的数据库中。
  2. 根据权利要求1所述的方法,其中,在从源数据库中抽取变化的源表数据之后,还包括:
    当所述源表数据发生多次变化时,保存最后一条源表数据。
  3. 根据权利要求1所述的方法,其中,在所述从源数据库中抽取变化的源表数据之后,还包括:
    生成源表数据的状态摘要,所述状态摘要包括所述源表数据的加载状态;
    将所述状态摘要发送至所述目的数据库。
  4. 根据权利要求1所述的方法,其中,在所述从源数据库中抽取变化的源表数据之后,还包括:
    接收目的服务器发送的传输策略,根据所述传输策略调整所述优先级。
  5. 根据权利要求1所述的方法,其中,基于所述优先级,将转换后的所述源表数据加载到目的数据库中包括:
    基于所述优先级,为不同优先级的所述源表数据分配进程或线程,将转换后的所述源表数据加载到目的数据库中。
  6. 根据权利要求1所述的方法,其中,所述设置优先级包括:
    在所述从源数据库中抽取变化的源表数据之前,设置解析优先级,并且根据所述解析优先级解析从所述源数据库中抽取出的所述源表数据。
  7. 根据权利要求1所述的方法,其中,所述设置优先级包括:
    设置转换优先级;
    根据所述转换优先级,转换从所述源数据库中抽取出的所述源表数据。
  8. 根据权利要求1所述的方法,其中,所述设置优先级包括:
    根据加权参数和所述优先级,计算动态优先级。
  9. 根据权利要求2所述的方法,其中,所述设置优先级包括:
    当所述动态优先级高于所述优先级时,将所述动态优先级设置为所述优先 级。
  10. 根据权利要求2所述的方法,其中,所述设置优先级包括:
    根据操作类型对所述加权参数进行调整。
  11. 根据权利要求1所述的方法,其中,所述设置优先级包括:
    根据预设的微调策略对所述优先级进行调整。
  12. 根据权利要求1所述的方法,其中,在所述从源数据库中抽取变化的源表数据之后,还包括:
    对所述源表数据进行统计;
    根据所述统计的结果,调整所述优先级。
  13. 一种数据库同步复制的装置,其中,包括:
    策略模块,用于设置优先级;
    抽取模块,用于从源数据库中抽取变化的源表数据;
    加载模块,用于基于所述优先级,将转换后的所述源表数据加载到目的数据库中。
  14. 一种电子设备,包括:
    处理器;以及
    被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使用所述处理器执行以下操作:
    设置优先级;
    从源数据库中抽取变化的源表数据;
    基于所述优先级,将转换后的所述源表数据加载到目的数据库中。
  15. 一种计算机可读介质,所述计算机可读介质存储一个或多个程序,所述一个或多个程序当被包括多个应用程序的电子设备执行时,使得所述电子设备执行以下操作:
    设置优先级;
    从源数据库中抽取变化的源表数据;
    基于所述优先级,将转换后的所述源表数据加载到目的数据库中。
PCT/CN2019/128558 2018-12-29 2019-12-26 一种数据库同步复制的方法和装置 WO2020135551A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP19903920.7A EP3905064A4 (en) 2018-12-29 2019-12-26 METHOD AND APPARATUS FOR SYNCHRONOUS REPLICATION OF A DATABASE

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811640691.6 2018-12-29
CN201811640691.6A CN111382199A (zh) 2018-12-29 2018-12-29 一种数据库同步复制的方法和装置

Publications (1)

Publication Number Publication Date
WO2020135551A1 true WO2020135551A1 (zh) 2020-07-02

Family

ID=71129158

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/128558 WO2020135551A1 (zh) 2018-12-29 2019-12-26 一种数据库同步复制的方法和装置

Country Status (3)

Country Link
EP (1) EP3905064A4 (zh)
CN (1) CN111382199A (zh)
WO (1) WO2020135551A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11803568B1 (en) * 2020-03-25 2023-10-31 Amazon Technologies, Inc. Replicating changes from a database to a destination and modifying replication capacity

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112783868A (zh) * 2021-02-10 2021-05-11 中国工商银行股份有限公司 分布式数据库表结构灰度升级方法、装置及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6581075B1 (en) * 2000-12-28 2003-06-17 Nortel Networks Limited System and method for database synchronization
EP1569120A1 (en) * 2004-02-24 2005-08-31 Hitachi, Ltd. Computer system for recovering data based on priority of the data
CN103870602A (zh) * 2014-04-03 2014-06-18 中国科学院地理科学与资源研究所 数据库空间分片复制方法及系统
CN105094972A (zh) * 2015-07-28 2015-11-25 百度在线网络技术(北京)有限公司 数据库操作任务的处理方法和装置
CN105512207A (zh) * 2015-11-27 2016-04-20 上海携程商务有限公司 争抢式的数据复制方法

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7478112B2 (en) * 2004-12-16 2009-01-13 International Business Machines Corporation Method and apparatus for initializing data propagation execution for large database replication
GB2531537A (en) * 2014-10-21 2016-04-27 Ibm Database Management system and method of operation
US9886347B2 (en) * 2015-01-08 2018-02-06 International Business Machines Corporation Data replication in a database management system
US9965328B2 (en) * 2015-09-23 2018-05-08 International Business Machines Corporation Selective and piecemeal data loading for computing efficiency
US10795881B2 (en) * 2015-12-18 2020-10-06 Sap Se Table replication in a database environment
CN106933534B (zh) * 2015-12-31 2020-07-28 阿里巴巴集团控股有限公司 一种数据同步方法和装置
CN106775990A (zh) * 2016-12-31 2017-05-31 中国移动通信集团江苏有限公司 请求调度方法和装置
CN107102894A (zh) * 2017-04-07 2017-08-29 百度在线网络技术(北京)有限公司 任务调度方法、装置和系统
US10613944B2 (en) * 2017-04-18 2020-04-07 Netapp, Inc. Systems and methods for backup and restore of distributed master-slave database clusters
US11113307B2 (en) * 2017-05-15 2021-09-07 Oracle International Corporation Entity identifier synchronization across data centers
CN107391758B (zh) * 2017-08-24 2020-08-04 阿里巴巴集团控股有限公司 数据库切换方法、装置及设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6581075B1 (en) * 2000-12-28 2003-06-17 Nortel Networks Limited System and method for database synchronization
EP1569120A1 (en) * 2004-02-24 2005-08-31 Hitachi, Ltd. Computer system for recovering data based on priority of the data
CN103870602A (zh) * 2014-04-03 2014-06-18 中国科学院地理科学与资源研究所 数据库空间分片复制方法及系统
CN105094972A (zh) * 2015-07-28 2015-11-25 百度在线网络技术(北京)有限公司 数据库操作任务的处理方法和装置
CN105512207A (zh) * 2015-11-27 2016-04-20 上海携程商务有限公司 争抢式的数据复制方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3905064A4 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11803568B1 (en) * 2020-03-25 2023-10-31 Amazon Technologies, Inc. Replicating changes from a database to a destination and modifying replication capacity

Also Published As

Publication number Publication date
EP3905064A4 (en) 2022-05-18
EP3905064A1 (en) 2021-11-03
CN111382199A (zh) 2020-07-07

Similar Documents

Publication Publication Date Title
US20200242129A1 (en) System and method to improve data synchronization and integration of heterogeneous databases distributed across enterprise and cloud using bi-directional transactional bus of asynchronous change data system
US9589041B2 (en) Client and server integration for replicating data
EP2954424B1 (en) Method, device, and system for peer-to-peer data replication and method, device, and system for master node switching
US8788254B2 (en) Monitoring and control of contact centers with dynamic temporal dimension
Grover et al. Data Ingestion in AsterixDB.
WO2015145536A1 (ja) データベース管理システム及びデータベース間の同期制御方法
CN108121827B (zh) 一种全量数据的同步方法及装置
JP7220807B2 (ja) データ読み取り方法、装置、コンピュータ装置及びコンピュータプログラム
CN106294757B (zh) 一种基于超图划分的分布式数据库及其集群分区方法
WO2020135551A1 (zh) 一种数据库同步复制的方法和装置
WO2019109854A1 (zh) 分布式数据库数据处理方法、装置、存储介质及电子装置
WO2023005075A1 (zh) 数据的容灾恢复方法、系统、终端设备及计算机存储介质
WO2021036684A1 (zh) 分布式数据同步方法、装置、设备及可读存储介质
US10331672B2 (en) Stream data processing method with time adjustment
CN112084206A (zh) 数据库的事务请求处理方法、相关设备及存储介质
JP2015088072A (ja) 受信したデータごとに集計処理を行うシステム、方法およびプログラム
WO2023082681A1 (zh) 基于批流一体的数据处理方法、装置、计算机设备和介质
CN112199427A (zh) 一种数据处理方法和系统
CN109241194A (zh) 基于高性能集群分布的数据库系统的负载均衡方法及装置
CN111782671A (zh) 一种基于分布式数据库实现cdc的优化方法
CN108090056B (zh) 数据查询方法、装置及系统
WO2022156542A1 (zh) 数据访问方法、系统和存储介质
WO2022127866A1 (zh) 数据处理方法、装置、电子设备、存储介质
CN106897316B (zh) 一种信令数据的处理方法和装置
CN114676199A (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: 19903920

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2019903920

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2019903920

Country of ref document: EP

Effective date: 20210729