Data migration method and device, electronic equipment, chip and medium

By determining migration rules and using concurrency control mechanisms in the data warehouse, automated massive data migration and data consistency auditing are solved, the problems of manual dependence and insufficient auditing in the existing technology are solved, and the efficiency and accuracy of data migration are improved.

CN118796792APending Publication Date: 2024-10-18ZUNYI BRANCH OF CHINA MOBILE GRP GUIZHOU COMPANY +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311149635.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-06
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

The existing technology relies heavily on manual operations during the migration of massive data and lacks data audit methods, resulting in low migration efficiency and inability to guarantee data accuracy.

Method used

By determining migration rules in the first data warehouse, generating a list of data to be migrated, and using concurrency control and peak-shifting scheduling mechanisms to automatically migrate data, real-time monitoring of performance parameters, ensuring data consistency auditing, and achieving automation and efficiency of data migration.

Benefits of technology

It improves the efficiency and quality of data migration, reduces manual intervention, ensures the accuracy of data after migration, and reduces the cost of data migration projects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118796792A_ABST
    Figure CN118796792A_ABST
Patent Text Reader

Abstract

The invention provides a data migration method and device, electronic equipment, a chip and a medium, and relates to the technical field of data processing. The data migration method comprises the steps of determining a to-be-migrated data list based on a migration rule of data in a first data warehouse; according to the to-be-migrated data list, migrating the to-be-migrated data to a second data warehouse to form migrated data; and determining the data consistency of the migrated data so as to determine whether migration succeeds or not. Through the technical scheme provided by the invention, the problems that the migration efficiency is low and the accuracy of the migrated data cannot be guaranteed due to the fact that a related mass data migration technical scheme highly depends on manual operation and lacks an effective method for data auditing are solved, and the efficiency and quality of data migration are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a data migration method, device, electronic device, chip and medium. Background Art

[0002] With the rapid development of digitalization in all walks of life, the amount of data is growing at the petabyte (PB) level. Due to storage and computing power requirements, the data middle-end architecture needs to be upgraded and migrated every 2 to 3 years to meet the data support requirements during the company's digital transformation. Efficient and accurate migration of PB data to the new architecture is a major challenge in architecture upgrades. Usually, during the data migration process, due to the existence of massive data, complex business logic, and numerous database migration objects on the source side, most of the data migration is done manually or through traditional data synchronization. The relevant technical solutions are highly dependent on manual operations and lack effective methods for data auditing, resulting in low migration efficiency and the inability to guarantee the accuracy of data after migration. Summary of the invention

[0003] The present disclosure provides a data migration method, device, electronic device, chip and medium to solve the problem that the technical solution for mass data migration in the related technology is highly dependent on manual operation and lacks data audit, resulting in low migration efficiency and the inability to ensure the accuracy of data after migration. Based on the migration rules of the data in the first data warehouse, a list of data to be migrated is determined; according to the list of data to be migrated, the data to be migrated is migrated to the second data warehouse to form migrated data; the data consistency of the migrated data is determined to determine whether the migration is successful. The automation degree of mass data migration is improved, and the efficiency and quality of data migration are improved.

[0004] A first aspect embodiment of the present disclosure proposes a data migration method, which includes: determining a list of data to be migrated based on migration rules of data in a first data warehouse; migrating the data to be migrated to a second data warehouse to form migrated data according to the list of data to be migrated; and determining the data consistency of the migrated data to determine whether the migration is successful.

[0005] In one embodiment of the present disclosure, based on the migration rules of the data in the first data warehouse, determining the list of data to be migrated includes: configuring the migration rules, the migration rules including the feature rules, business rules, and data audit rules of the data to be migrated; obtaining a rule structured query language (SQL) template according to the migration rules; and determining the list of data to be migrated according to the rule SQL template.

[0006] In one embodiment of the present disclosure, determining a list of data to be migrated according to a rule SQL template includes: obtaining table information of the data to be migrated; obtaining a list generation script by calling the rule SQL template according to the table information of the data to be migrated and the migration rules; and obtaining a list of data to be migrated based on the list generation script.

[0007] In one embodiment of the present disclosure, according to the list of data to be migrated, migrating the data to be migrated to the second data warehouse to form migrated data includes: determining the data to be migrated according to the list of data to be migrated; initializing the concurrent process of migrating the data to be migrated; monitoring the performance parameters of the first data warehouse in real time; according to the concurrent processes and performance parameters, migrating the data to be migrated to the second data warehouse to form migrated data through concurrent control and peak-shifting scheduling mechanism.

[0008] In one embodiment of the present disclosure, real-time monitoring of the performance parameters of the first data warehouse includes: collecting performance data of the first data warehouse; analyzing the performance data to obtain performance parameters of the first data warehouse, wherein the performance parameters include at least one of the current number of connections, the maximum number of connections, and the central processing unit utilization.

[0009] In an embodiment of the present disclosure, the method further includes: outputting a migration log of the data to be migrated during the migration process; determining the migration progress of the data to be migrated according to the list of data to be migrated and the migration log; and outputting an exception log if there is an exception in the migration log.

[0010] In one embodiment of the present disclosure, according to concurrent processes and performance parameters, the data to be migrated is migrated to the second data warehouse to form migrated data through concurrent control and peak-shifting scheduling mechanism, including: according to the performance parameters, the number of concurrent processes is adjusted in real time, and concurrency control and peak-shifting scheduling are performed; through the concurrent control and peak-shifting scheduling mechanism, the data to be migrated is migrated to the second data warehouse to form migrated data.

[0011] In one embodiment of the present disclosure, determining the data consistency of the migrated data to determine whether the migration is successful includes: performing a data consistency audit on the migrated data according to data audit rules, a list of data to be migrated, and a migration log; if the consistency between the migrated data and the data to be migrated is less than a reprocessing threshold, the migration is successful; if the consistency between the migrated data and the data to be migrated is greater than or equal to the reprocessing threshold, the migration fails and a warning message is issued.

[0012] The second aspect of the embodiment of the present disclosure proposes a data migration device, which includes: a determination module, used to determine a list of data to be migrated based on the migration rules of data in a first data warehouse; a migration module, used to migrate the data to be migrated to a second data warehouse to form migrated data according to the list of data to be migrated; and an audit module, used to audit the migrated data and determine the consistency of the data.

[0013] The third aspect embodiment of the present disclosure proposes an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any one of the methods in the first aspect embodiment of the present disclosure.

[0014] The fourth aspect embodiment of the present disclosure proposes a non-transitory computer-readable storage medium storing computer instructions, characterized in that the computer instructions are used to enable a computer to execute the method in the first aspect embodiment of the present disclosure.

[0015] The fifth aspect embodiment of the present disclosure proposes a computer program product, characterized in that it includes a computer program, and when the computer program is executed by a processor, it implements any method in the first aspect embodiment of the present disclosure.

[0016] The sixth aspect embodiment of the present disclosure proposes a chip, characterized in that it includes one or more interface circuits and one or more processors; the interface circuit is used to receive signals from the memory of the electronic device and send signals to the processor, the signals include computer instructions stored in the memory, and when the processor executes the computer instructions, the electronic device executes any one of the methods in the first aspect embodiment of the present disclosure.

[0017] In summary, according to the data migration method proposed in the present disclosure, based on the migration rules of the data in the first data warehouse, the list of data to be migrated is determined, and the data to be migrated is obtained. According to the list of data to be migrated, the data to be migrated is migrated to the second data warehouse to form migrated data, and the migration of the data to be migrated between data warehouses is completed; the data consistency of the migrated data is determined to determine whether the migration is successful, and the consistency check of the migrated data and the original data to be migrated is completed to ensure the correctness of the data. Through the data migration scheme disclosed in the present disclosure, the efficiency and quality of data migration are improved.

[0018] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0020] Figure 1 A flowchart of a data migration method according to an embodiment of the present disclosure;

[0021] Figure 2A flowchart of determining a list of data to be migrated based on a migration rule of data in a first data warehouse according to an embodiment of the present disclosure;

[0022] Figure 3 The present invention is a flowchart of determining a list of data to be migrated according to a regular SQL template according to an embodiment of the present invention.

[0023] Figure 4 The present invention is a flowchart of migrating data to be migrated to a second data warehouse to form migrated data according to a list of data to be migrated according to an embodiment of the present invention.

[0024] Figure 5 The present invention is a flowchart of a method for real-time monitoring of performance parameters of a first data warehouse according to an embodiment of the present invention.

[0025] Figure 6 The present invention is a flowchart of managing migration logs in a process of migrating data to be migrated to a second data warehouse to form migrated data according to a list of data to be migrated according to an embodiment of the present invention.

[0026] Figure 7 A flow chart of data migration log management in one implementation of this embodiment;

[0027] Figure 8 A flowchart of an embodiment of the present disclosure for migrating data to be migrated to a second data warehouse to form migrated data according to concurrent processes and performance parameters through concurrent control and peak-shifting scheduling mechanisms;

[0028] Fig. 9 A schematic diagram of concurrency control showing an implementation of an embodiment of the present disclosure;

[0029] Fig.10 A flowchart of determining data consistency of migrated data to determine whether the migration is successful according to an embodiment of the present disclosure;

[0030] Fig.11 A flowchart of data consistency audit shown in one implementation of the disclosed embodiment;

[0031] Fig.12 A flowchart of a data migration method according to an embodiment of the present disclosure;

[0032] Fig.13 A schematic diagram of the structure of a data migration device according to an embodiment of the present disclosure;

[0033] Fig.14 A schematic diagram of a working process of a data migration device according to an embodiment of the present disclosure;

[0034] Fig.15It is a block diagram of an electronic device for implementing the data migration method disclosed in the present invention according to an exemplary embodiment. DETAILED DESCRIPTION

[0035] Embodiments of the present disclosure are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout identify the same or similar originals or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limiting the present disclosure.

[0036] With the rapid development of business, and the equipment life cycle and processing capacity have reached the design period, in order to more effectively support the business system, it has become an important task to quickly migrate the original system to a more advanced architecture platform. In the big data scenario, how to achieve smooth migration of multi-source and multi-dimensional data has put forward higher requirements for system migration.

[0037] At present, there is still a technical gap in the automated migration tools for massive data, and the existing methods are mainly manual migration. 20 GB), with a large object volume of more than 100,000. During the data migration process, due to the massive data, complex business logic and numerous database objects in the database to be migrated, the traditional data synchronization method is used for data migration. The difficulties to be overcome include:

[0038] Difficult to determine the scope: Due to the complex data lineage, numerous database table objects, and long data cycle, it takes a lot of time to confirm the effective data synchronization scope, and storage legacy is inevitable.

[0039] Difficult to track the process: The data migration process is not automated enough, so the progress of table data migration needs to be tracked and summarized manually, making it difficult to control the progress.

[0040] Difficult to improve efficiency: Due to the large amount of data to be migrated and the single data synchronization method, it is impossible to select a scientific data synchronization method for historical data or current data, and ultimately it is impossible to effectively improve the data migration efficiency.

[0041] Difficult to control quality: The system has high requirements for the accuracy of the migrated data, so it is necessary to use manual scripting to audit and verify the migrated data, which takes a lot of time to check the quality of the migrated data. In addition, due to the low degree of standardization, a lot of manpower is needed to troubleshoot problems.

[0042] Difficulty in compensating for errors: Tasks in business systems are highly dependent on data. If an exception or error occurs in the data migration of a table, it will affect the use of multiple data interfaces. In severe cases, it will affect data assessment, resulting in high error compensation costs.

[0043] During data migration, especially the migration of massive data, the relevant technical solutions are highly dependent on manual operations and lack effective methods for data auditing, resulting in low migration efficiency and the inability to guarantee the accuracy of data after migration.

[0044] For the parts of data migration that are highly dependent on manual operations, the automation level of relevant data migration technical solutions is low, and much work requires manual intervention, including the following four aspects:

[0045] 1. Rely on manual sorting of migration table lists. Due to the complex data lineage, numerous database table objects, and long data storage cycle, sorting out the migration table list not only takes a lot of manpower and time, but is also prone to omissions.

[0046] 2. The migration progress cannot be tracked in real time. The low degree of automation in data migration requires manual tracking and summary of the table data migration progress, making it difficult to control the progress.

[0047] 3. Lack of solutions for handling abnormal situations. The existing technical solutions do not have automated solutions for handling abnormal situations, and all rely on manual inspection and discovery and manual initiation of data synchronization, which is prone to omissions.

[0048] 4. There is no effective concurrency control mechanism. Massive data migration is prone to resource exhaustion due to the large amount of data and complex data structure. How to flexibly control concurrency is particularly important for big data migration. The concurrency control of existing technical solutions still needs to be implemented by computer + manual monitoring, and the degree of automation is low.

[0049] For the part of data migration that lacks effective methods for data auditing, most of the auditing methods for data migration technology solutions after migration use manually written scripts to audit and verify the migrated data. This data quality auditing method not only has a low degree of reusability but also takes a long time. Due to the low degree of standardization of the auditing methods, most problems require manual intervention and one-by-one investigation.

[0050] The present disclosure aims to solve the above-mentioned effective methods in the related art that are highly dependent on manual operations and lack data auditing, and mainly solve the following problems:

[0051] 1. Automatically obtain the migration list: Before migration, manually formulate data synchronization rules and automatically generate a list to be migrated by defining rule processing logic to avoid data under-migration due to manual omissions.

[0052] 2. Realize the whole process management of migration: During the data migration process, output detailed records of data synchronization tasks. This device has added process management function, which summarizes basic information such as logs and migration list tables, calculates the overall progress of current data migration in real time, makes the migration process transparent, and realizes the whole process management of migration process.

[0053] 3. Use concurrency control and peak-shifting scheduling mechanisms: During the migration process, monitor the performance of the source database in real time, use concurrency control and peak-shifting scheduling mechanisms to ensure efficient data migration without affecting the continuity of the original business.

[0054] 4. Add automated data consistency auditing methods: Configure data consistency auditing rules. After data migration is completed, automatically start data quality checks and output data auditing results.

[0055] 5. Introduce an automatic exception processing mechanism: By automatically identifying the processing status and verifying the data audit results, the exception is retried. If the retry is still unsuccessful, it will automatically be transferred to the alarm event table and the technical staff will be notified.

[0056] The method proposed in the present disclosure is applied to data migration tasks, and its application has a wide range of scenarios. The present disclosure improves the speed and quality of data migration, reduces the man-day consumption in data migration projects, and improves the efficiency and quality of data migration. It can be widely used in the fields of big data, databases, cloud storage, etc. The application scenarios are not limited in the embodiments of the present disclosure.

[0057] The data migration method provided by the present application is described in detail below with reference to the accompanying drawings.

[0058] Figure 1 FIG. 1 is a flow chart of a data migration method according to an embodiment of the present disclosure. Figure 1 As shown, the data migration method includes:

[0059] Step 101: Determine a list of data to be migrated based on migration rules of data in a first data warehouse.

[0060] In the present disclosure, the first data warehouse is a database for storing data to be migrated, which can be a relational database, such as MySQL, Oracle, Microsoft SQL Server (SQL Server), IBM DB2, Access. It can also be a non-relational database, such as MongoDB, Redis, etc. In particular, it is a large database with massive data. The migration rules are rules set for the migration target data, which are used to select the data to be migrated from the first data warehouse. The list of data to be migrated is a list or form, which contains information such as database name, table name, table structure, table size, etc. The data to be migrated for data migration in the first data warehouse. The data to be migrated that meets the migration rules is determined through the data stored in the first data warehouse and the set migration rules.

[0061] Step 102: Migrate the data to be migrated to the second data warehouse according to the list of data to be migrated to form migrated data.

[0062] In the present disclosure, the second data warehouse is the target data warehouse for the data to be migrated. The second data warehouse and the first data warehouse may be the same type of database or different types of databases. The migrated data is the data to be migrated in the first data warehouse and migrated to the second data warehouse. According to the determined list of data to be migrated, the data to be migrated in the first data warehouse is migrated to the second data warehouse to obtain the migrated data.

[0063] Step 103: determine the data consistency of the migrated data to determine whether the migration is successful.

[0064] In the present disclosure, after the data to be migrated is completely migrated to the second data warehouse, the migrated data is audited according to the migration rules, migration logs, and migration lists. According to the audit results, it can be determined whether the data migration is successful.

[0065] In summary, according to the data migration method proposed in the present disclosure, based on the migration rules of the data in the first data warehouse, the list of data to be migrated is determined, thereby determining the data that needs to be migrated; according to the list of data to be migrated, the data to be migrated is migrated to the second data warehouse to form migrated data, completing the automated migration of massive data and improving the efficiency of data migration; determining the data consistency of the migrated data to determine whether the migration is successful, ensuring the consistency of data migration. This overcomes the problem that the migration of massive data is highly dependent on manual operations and lacks data auditing, and improves the efficiency and quality of data migration.

[0066] Figure 2 This is a flow chart of determining a list of data to be migrated based on migration rules of data in a first data warehouse according to an embodiment of the present disclosure. Figure 2 right Figure 1 Step 101 is further described based on Figure 2 The embodiment shown, Figure 2 The steps include:

[0067] Step 201, configure migration rules, which include feature rules, business rules, and data audit rules of the data to be migrated.

[0068] In this embodiment, several commonly used migration rules are solidified through business experience or expert judgment to configure migration rules, including: feature rules of the data to be migrated, business rules, and data audit rules.

[0069] In one implementation of this embodiment, the characteristic rules of the data to be migrated, that is, the characteristic rules of the table to be migrated, include information such as table size, number of records, whether partitioned, primary key, index, keyword, etc.

[0070] In one implementation of this embodiment, the business rules of the data to be migrated include: key tables, key fields, migration methods, etc. The migration method is based on the size of the table. Large tables use batch incremental migration rules, and small tables use full incremental migration rules.

[0071] In one implementation of this embodiment, data auditing can be configured into dimensions such as field aggregation value, indicator level, row level (hash value), etc.

[0072] In this embodiment, the existing rules are analyzed to see whether they meet the requirements in combination with the business scenario of the database to be migrated. The rule configuration supports autonomous configuration of personalized synchronization rules and supports solidifying personalized rules into the database system or device.

[0073] Step 202: Obtain a rule SQL template according to the migration rule.

[0074] In this embodiment, the SQL template of the migration rule is obtained through the configured migration rule, so as to automatically search for the data to be migrated that meets the rule in the data warehouse.

[0075] Using the solidified rules to generate the SQL template can provide a technical basis for the next step of generating the list to be migrated. In one implementation of this embodiment, if there are new rules in step 201, it is necessary to manually formulate the SQL template.

[0076] Step 203: Determine the list of data to be migrated according to the regular SQL template.

[0077] In this embodiment, the database table to be migrated is determined, the rule list is read, and the rule applicable to the current scenario is selected, such as full migration, incremental migration, partition reading, etc. The corresponding rule SQL template is called to generate a script for the list of data to be migrated, and then the script is run to obtain the list of data to be migrated.

[0078] In one implementation of this embodiment, a migration list is generated using keyword matching rules. The rule configuration table rule_config is as follows:

[0079]

[0080] Note: 1 means read, 0 means do not read. To do not read, you need to insert a read rule. To read, take out the parameters from the corresponding rule subtable.

[0081] The keyword matching configuration table key_config is as follows:

[0082]

[0083] The migration rule SQL template generated based on the rule configuration table rule_config and the keyword matching configuration table key_config is as follows:

[0084] create table Sql_mode(id int not null comment'Rule number', sql_mode intnot null comment'SQL template', primary key(`id`)) engine=innodb comment'SQL template';

[0085] Sql_mode.sql_mode=select*from rule_config a,key_config b,all_tablesc where a.id=b.id and a.id='1001'and c.table_name like b.key_match;

[0086] In this embodiment, a regular SQL template is determined through the migration rules of the data in the first data warehouse, and then a list of data to be migrated is obtained based on the regular SQL template, which provides a source of data to be migrated for data migration and greatly improves the automation of data migration. Among them, the use of regular SQL templates to self-determine the list of data to be migrated particularly reflects the automation of this embodiment.

[0087] Figure 3 This is a flow chart of determining a list of data to be migrated according to a regular SQL template according to an embodiment of the present disclosure. Figure 3 right Figure 2 Step 203 is described in detail. Figure 3 The steps include:

[0088] Step 301: Obtain table information of data to be migrated.

[0089] In this embodiment, the table information of the data to be migrated is the basic information of the table in the database to be migrated, including table size, number of records, whether it is partitioned, primary key, index, keyword, etc. The database to be migrated corresponding to the data to be migrated is determined, the database table to be migrated is selected from the database to be migrated, and the basic information of the database table is recorded.

[0090] Step 302: According to the table information of the data to be migrated and the migration rules, a list generation script is obtained by calling a rule SQL template.

[0091] In this embodiment, according to the table information of the data to be migrated and the configured migration rules, the rule SQL template is called, and the migration information specified by the migration rules is used to select the migration information from the table information of the data to be migrated, so as to obtain the list generation script.

[0092] Step 303: Generate a script based on the list to obtain a list of data to be migrated.

[0093] In this embodiment, based on the list generation script, after executing the list generation script, a list of data to be migrated can be automatically generated, avoiding the problem of insufficient data migration due to manual omission. After obtaining the list of data to be migrated, the data to be migrated recorded in the list needs to be migrated.

[0094] Figure 4 This is a flow chart of an embodiment of the present disclosure, which migrates the data to be migrated to the second data warehouse to form migrated data according to the list of data to be migrated. Figure 4 right Figure 1 Step 102 is specifically described, based on Figure 4 The embodiment shown, Figure 4 The following steps are involved:

[0095] Step 401: determine the data to be migrated according to the list of data to be migrated.

[0096] In this embodiment, the information of all the data to be migrated is obtained through the list of data to be migrated, such as the file size, storage location, and association relationship between various files of the data to be migrated.

[0097] Step 402, initializing a concurrent process for migrating the data to be migrated.

[0098] In this embodiment, after determining the data to be migrated, the first data warehouse starts the migration. First, the concurrent process of migrating the data to be migrated is initialized. In combination with the current performance of the first data warehouse, the number of concurrent processes of data migration is initialized.

[0099] Step 403: monitor the performance parameters of the first data warehouse in real time.

[0100] In this embodiment, before and during data migration, the performance parameters of the first data warehouse are monitored in real time, and performance parameters such as the current number of connections, the maximum number of connections, and the processor usage of the first data warehouse are recorded.

[0101] Step 404 , according to the concurrent processes and performance parameters, through the concurrent control and peak-shifting scheduling mechanism, migrate the data to be migrated to the second data warehouse to form migrated data.

[0102] In this embodiment, during the migration process of the data to be migrated from the first data warehouse to the second data warehouse to form the migrated data, the real-time concurrent process number and real-time performance parameters of the server of the first data warehouse are utilized, and the concurrency control and peak-shifting scheduling mechanism are utilized to adjust the migration speed in real time.

[0103] In this embodiment, the data to be migrated determined by the list of data to be migrated is migrated to the second data warehouse through the server of the first data warehouse, and the concurrent processes that affect the migration progress are dynamically adjusted through performance parameters to achieve the best and fastest data migration. The server resource scheduling during the data migration process depends on the real-time monitoring value of the performance.

[0104] Figure 5 This is a flow chart of a method for real-time monitoring of performance parameters of a first data warehouse according to an embodiment of the present disclosure. Figure 5 right Figure 4 Step 403 is specifically described based on the following Figure 5 The embodiment shown, Figure 5 The following steps are involved:

[0105] Step 501: Collect performance data of the first data warehouse.

[0106] In this embodiment, the server of the first data warehouse collects the performance data of the local machine, and the performance data includes but is not limited to the current number of connections, the maximum number of connections, the CPU utilization, the memory usage, and the disk capacity. The current number of connections is the number of other data transmission lines or links currently connected to the server of the first data warehouse, the maximum number of connections is the maximum number of lines or links for data transmission that the server of the first data warehouse can support, and the CPU utilization is the occupancy rate of the central processing unit (CPU) of the server of the first data warehouse when migrating data. Here, the server of the first data warehouse is used to provide computing resources, storage resources, network resources, etc. for migrating data, and it can be a small computer, a large computer, a supercomputer, etc.

[0107] Step 502: Analyze the performance data to obtain performance parameters of the first data warehouse, wherein the performance parameters include at least one of the current number of connections, the maximum number of connections, and the utilization rate of the central processing unit.

[0108] In this embodiment, the performance parameters of the first data warehouse are obtained by analyzing or screening the performance data of the first data warehouse collected in real time. The performance parameters include at least one of the current number of connections, the maximum number of connections, and the CPU utilization rate, which can be used to accurately and in real time reflect the current state of the first data warehouse, so as to provide data support for resource scheduling of data migration.

[0109] Figure 6 This is a flowchart of the migration log management in the process of migrating the data to be migrated to the second data warehouse to form the migrated data according to the list of data to be migrated according to the embodiment of the present disclosure. Figure 6 right Figure 4 Step 404 is specifically described based on the following Figure 6 The embodiment shown, Figure 6 The steps include:

[0110] Step 601: output the migration log of the data to be migrated during the migration process.

[0111] In this embodiment, during the data migration process, a migration log of the data to be migrated during the migration process is output in real time. The migration log includes the name, size, and partial or complete content of the database table that has been migrated.

[0112] Step 602: Determine the migration progress of the data to be migrated according to the list of data to be migrated and the migration log.

[0113] In this embodiment, according to the Figure 3 The migration progress of the data to be migrated is determined by the list of data to be migrated and the migration log recorded in real time during the migration process. For example, the list of data to be migrated contains a total of 100 data tables to be migrated, and the data tables are named data table 1, data table 2, ..., data table 99, and data table 100. If the current log record is migrated to data table 80, it means that the migration progress is 80%.

[0114] Step 603: If there is an exception in the migration log, the exception log is output.

[0115] In this embodiment, if an exception is recorded in the migration log, the exception content is output, and the exception content includes the program module where the exception occurs and an error code.

[0116] Figure 7 FIG. 1 is a flow chart of data migration log management in one implementation of this embodiment. Figure 7As shown, mass data migration is a time-consuming and error-prone process. In order to better monitor the migration progress in real time and capture abnormal information, the log management unit is used. It mainly records the logs during the migration process and manages the logs to provide basic data for automatic processing of abnormal operations, including:

[0117] 1. Record the migration process log: During the data migration process, output detailed records of data synchronization tasks.

[0118] 2. Migration progress management: based on Figure 3 The embodiment manages the migration progress by using the list of data to be migrated and the migration log. The migration list contains table size information, and the overall progress of the current data migration is calculated in real time based on the summary of the process log, thus achieving transparent management of the entire process of data migration.

[0119] 3. Exception log output: During the data migration process, the output exception log provides a basis for automatic processing of abnormal jobs.

[0120] In this embodiment, the whole process of data migration provides process log records, which is convenient for obtaining the migration progress. At the same time, when an exception is captured, an exception log is output, which provides a complete record and exception monitoring reference for data migration.

[0121] Figure 8 This is a flowchart of an embodiment of the present disclosure, which migrates the data to be migrated to the second data warehouse to form migrated data according to concurrent processes and performance parameters through concurrent control and peak-shifting scheduling mechanism. Figure 8 right Figure 4 or Figure 5 For specific explanation, based on Figure 8 The embodiment shown, Figure 8 The steps include:

[0122] Step 801, according to the performance parameters, the number of concurrent processes is adjusted in real time to perform concurrency control and peak-shifting scheduling.

[0123] In this embodiment, according to Figure 5 The performance parameters of the embodiment adjust the number of concurrent processes of the server of the first data warehouse in real time to complete the concurrent control of computing power and peak-shifting scheduling.

[0124] Step 802: Migrate the data to be migrated to the second data warehouse to form migrated data through concurrency control and peak-shifting scheduling mechanism.

[0125] In this embodiment, the performance parameters are used to control the concurrency of computing power and the peak-shifting scheduling of computing power, so that the data to be migrated is migrated from the first data warehouse to the second data warehouse to form migrated data.

[0126] Fig. 9FIG. 1 is a schematic diagram of concurrency control according to an implementation of an embodiment of the present disclosure. Fig. 9 As shown, concurrency control includes a concurrency control unit, an algorithm model, and a concurrent execution unit, wherein the algorithm model is determined according to the CPU utilization W, the current number of connections Z, and the maximum number of connections S. The maximum number of connections S is set by the migration program, and the current number of connections Z is less than or equal to the maximum number of connections S. The resource utilization is highest when the CPU utilization is between 70% and 80% for a long time. The concurrency control model determined based on this is modeled as the following algorithm:

[0127] If 70% ≤ W ≤ 80%, the concurrency control program continues to load data according to the current number of connections Z;

[0128] If W<70%, start additional connection data Y1, Y1=min(S, Z*0.7 / W)-Z; in other words, adjust the number of running connections to Z+Y1.

[0129] If W>80%, reduce the connected data Y2, Y2=Z*0.8 / WZ; in other words, adjust the number of running connections to Z+Y2.

[0130] In this embodiment, the concurrency control and peak-shifting scheduling mechanism enables data to be migrated uninterruptedly in an unattended environment, thereby improving the efficiency of data migration.

[0131] Fig.10 This is a flow chart of an embodiment of the present disclosure for determining the data consistency of migrated data to determine whether the migration is successful. Fig.10 right Figure 1 Step 103 is specifically described based on Fig.10 The embodiment shown, Fig.10 The steps include:

[0132] Step 1001, perform data consistency audit on the migrated data according to the data audit rules, the list of data to be migrated and the migration log.

[0133] In this embodiment, the data audit rules are the verification rules for the migrated data determined by the user when configuring the migration rules; the list of data to be migrated is the list of data to be migrated obtained by the data table to be migrated through the migration rule SQL template; for the data migration process, detailed records of the data synchronization tasks are recorded as migration logs; according to the audit rules before data migration, the list of data to be migrated, and the migration logs during the data migration process, the data consistency of the migrated data is audited and checked to ensure whether the migrated data is the same as the original data.

[0134] Step 1002: If the consistency between the migrated data and the data to be migrated is less than the reprocessing threshold, the migration is successful.

[0135] In this embodiment, the reprocessing threshold is a preset integer value indicating the number of reprocessing times when an exception occurs during migration. If the consistency of the migrated data is less than the reprocessing threshold after the audit, it means that the exception that occurred during the data migration process has been automatically reprocessed and the migration of the data has been successfully completed.

[0136] Step 1003: If the consistency between the migrated data and the data to be migrated is greater than or equal to the reprocessing threshold, the migration fails and a warning message is issued.

[0137] In this embodiment, if the consistency of the migrated data is greater than or equal to the reprocessing threshold after the audit, it means that the anomalies occurring during the data migration process exceed the preset reprocessing times, resulting in serious anomalies, and an early warning message needs to be issued to the system administrator to prompt the fault information.

[0138] Fig.11 FIG. 1 is a flowchart of data consistency auditing shown in an implementation manner of the present disclosure. Fig.11 As shown in the figure, during the data migration process, due to failures in the network, server, software, etc., there may be data inconsistencies between the source database (data to be migrated) and the target database (migrated data). In order to ensure data accuracy, a data consistency audit step is essential after the migration is completed. The data audit step is mainly combined with Figure 2 , Figure 3 and Figure 7 The implementation example of the present invention is to execute and audit the rules, including:

[0139] 1. Read audit rules: Read Figure 2 The business rules and data audit dimension rules configured in the embodiment determine the scope and dimension of the audit;

[0140] 2. Read log records: Read Figure 7 Detailed records of the migration log during the migration process in Figure 3 The migration list rule attributes obtained in the audit determine the scope and method of audit;

[0141] 3. Data consistency audit: According to the audit rules and audit scope determined in the first two steps, audit the migrated tables and output the audit results. The abnormal records provide basic data for automatic processing of abnormal operations.

[0142] Fig.12 Flow chart of a data migration method according to an embodiment of the present disclosure. Fig.12In the embodiment shown, in this embodiment, this solution is divided into 6 steps: establishing a rule configuration center; establishing a migration list automatic generation unit; establishing a full-process log management unit; establishing a concurrent control and peak scheduling mechanism; establishing a data consistency audit unit; and establishing an abnormal task automatic processing mechanism.

[0143] Step 1: Establish a rule configuration center.

[0144] This step mainly formulates data synchronization and data audit rules to provide a rule basis for generating a list to be migrated, including:

[0145] 1. Configuration synchronization rules: Based on business experience and expert judgment, several common rules are solidified, including:

[0146] (1) Characteristics of the table to be migrated: table size, number of records, whether it is partitioned, primary key, index, keyword, etc.

[0147] (2) Business rules: key tables, key fields, migration methods, etc. The migration method is based on the size of the table. Large tables use batch incremental migration rules, and small tables use full incremental migration rules.

[0148] (3) Data audit dimension rules: Data audit can be configured as field aggregate value, indicator level, row level (hash value) and other dimensions

[0149] The rule configuration center analyzes whether the existing rules meet the needs in combination with the business scenarios of the database to be migrated. It supports the independent configuration of personalized synchronization rules and also supports the solidification of personalized rules into the device.

[0150] 2. Generate rule SQL template: Generate SQL template for the solidified rules to provide a basis for generating the list to be migrated in the next step. If there are new rules in step 1, you need to manually generate the rule SQL template.

[0151] Step 2: Create a unit for automatically generating migration lists.

[0152] 1. Determine the database to be migrated: Select the database table to be migrated, and fill in the basic information of the database corresponding table into the configuration table;

[0153] 2. Read the rule list: Based on step 1 in step 1, read the currently configured synchronization rule list;

[0154] 3. Select applicable rules: Based on the rule list read in step 2 of step 2, select applicable rules according to the usage scenario of the database to be migrated, such as full migration, incremental migration, partition reading, etc.

[0155] 4. Call the rule SQL template: Based on step 2 of step 1 and step 3 of step 2, call the corresponding SQL template according to the basic information of the database to be migrated and the selected rules to generate the script for the list of data to be migrated;

[0156] 5. Automatically generate a list of data to be migrated: Based on step 4 in step 2, run the SQL generation script to obtain the migration table list of the corresponding database, which contains information such as the library name, table name, table structure, and table size.

[0157] Step 3: Establish concurrency control and peak-shifting scheduling mechanisms.

[0158] 1. Initialize concurrent processes: Initialize the number of concurrent processes for data synchronization based on the current performance of the source database;

[0159] 2. Real-time monitoring of source database performance: During the data migration process, the source database performance data is continuously collected and analyzed, and the real-time performance (number of connections, maximum number of connections, CPU value, etc.) change trend of the source database is fed back;

[0160] 3. Concurrency control and peak-shifting scheduling: Based on step 2 of step 3, according to the current performance of the source database (number of connections, maximum number of connections, CPU value, etc.), the previous section on concurrency control and data auditing has explained the use of concurrency control algorithms to adjust the number of concurrent processes in real time, thereby achieving peak-shifting scheduling. The establishment of this mechanism ensures that data can be migrated uninterruptedly even when no one is on duty, achieving the goal of improving the efficiency of migration without affecting the source database.

[0161] Step 4: Full process log management unit.

[0162] Massive data migration is a time-consuming and error-prone process. In order to better monitor the migration progress in real time and capture abnormal information, we introduce a log management unit. This step mainly records the logs during the migration process and manages the logs to provide basic data for automatic processing of abnormal jobs, including:

[0163] 1. Record process log: During the data migration process, output detailed records of data synchronization tasks;

[0164] 2. Migration progress management: Based on step 5 of step 2 and step 1 of step 4, the migration list contains table size information. The overall progress of the current data migration is calculated in real time based on the process log, realizing transparent management of the entire data migration process.

[0165] 3. Exception log output: During the data migration process, the output exception log provides a basis for automatic processing of abnormal jobs.

[0166] Step 5: Establish a data consistency audit unit.

[0167] During the data migration process, due to failures in the network, server, software, etc., there may be data inconsistencies between the source database and the target database. In order to ensure data accuracy, a data consistency audit step is essential after the migration is completed. The data audit step mainly combines steps one, two, and four to execute and audit the rules, including:

[0168] 1. Read audit rules: Read the business rules and data audit dimension rules configured in step 1 to determine the scope and dimensions of the audit;

[0169] 2. Read log records: Read the detailed records in step 4, and determine the scope and method of audit based on the migration records and the migration list rule attributes obtained in step 2;

[0170] 3. Data consistency audit: According to the audit rules and audit scope determined in the first two steps, audit the migrated tables and output the audit results. The abnormal records provide basic data for automatic processing of abnormal operations.

[0171] Step 6: Establish an automatic processing mechanism for abnormal tasks.

[0172] This step mainly analyzes the abnormal records output by steps 4 and 5 and starts the abnormal task processing process. After the reprocessing process is completed, the consistency audit task is automatically started, and this is repeated until the task ends normally or the reprocessing threshold is reached, the reprocessing process is exited and an early warning message is issued. At present, general data migration solutions pay more attention to the efficiency of migration, but lack concurrency control, peak-shifting scheduling mechanism and automatic auditing of data consistency. In the process of mass data migration, in order to improve the speed of migration, the existing technical solutions often initialize the data migration process with the maximum number of concurrencies and keep the high-speed migration state. In the absence of a concurrency control mechanism, when the amount of data transmitted is too large, it is easy to cause the migration to be interrupted due to exhaustion of server resources. When the migration is interrupted and started again, since it does not support breakpoint continuation, it is basically necessary to start the migration from the beginning, resulting in low overall migration efficiency. At the same time, the existing technical solution lacks a data automatic audit module. Although the data migration is completed, it causes data errors, which is not applicable in systems with extremely high requirements for data accuracy. Therefore, based on the disclosed method and the rule dimension of massive data matching, the concurrency control and data consistency automatic auditing functions are solved, and the accuracy of the data is guaranteed while ensuring the efficiency of data migration.

[0173] Through the data migration method provided by the present invention, based on the migration rules of the data in the first data warehouse, a list of data to be migrated is determined, and the data to be migrated is obtained. According to the list of data to be migrated, the data to be migrated is migrated to the second data warehouse to form migrated data, and the migration of the data to be migrated between the data warehouses is completed; the data consistency of the migrated data is determined to determine whether the migration is successful, and the consistency check of the migrated data and the data to be migrated is automatically completed to ensure the correctness of the data. Through the data migration scheme disclosed in the present invention, the problem that the relevant technical schemes for mass data migration are highly dependent on manual operations and lack effective methods for data auditing, which leads to low migration efficiency and the inability to guarantee the accuracy of data after migration, is solved, thereby improving the efficiency and quality of data migration.

[0174] Corresponding to the methods provided in the above-mentioned embodiments, the present disclosure also provides a data migration device. Since the device provided in the embodiment of the present disclosure corresponds to the methods provided in the above-mentioned embodiments, the implementation method of the method is also applicable to the device provided in this embodiment and will not be described in detail in this embodiment.

[0175] Fig.13 FIG. 1 is a schematic diagram of the structure of a data migration device 1300 according to an embodiment of the present disclosure. Fig.13 As shown, the data migration device includes: a determination module 1310, used to determine a list of data to be migrated based on the migration rules of the data in the first data warehouse; a migration module 1320, used to migrate the data to be migrated to the second data warehouse to form migrated data according to the list of data to be migrated; and an audit module 1330, used to audit the migrated data and determine the consistency of the data.

[0176] In some embodiments, the determination module 1310 is used to: configure migration rules, the migration rules include feature rules, business rules, and data audit rules for the data to be migrated; obtain a rule SQL template based on the migration rules; and determine a list of data to be migrated based on the rule SQL template.

[0177] In some embodiments, the determination module 1310 determines the list of data to be migrated according to the rule SQL template in the following manner: obtaining table information of the data to be migrated; obtaining a list generation script by calling the rule SQL template according to the table information of the data to be migrated and the migration rules; and obtaining a list of data to be migrated based on the list generation script.

[0178] In some embodiments, the migration module 1320 is used to: determine the data to be migrated according to the list of data to be migrated;

[0179] Initialize the concurrent process of migrating the data to be migrated; monitor the performance parameters of the first data warehouse in real time; according to the concurrent process and performance parameters, migrate the data to be migrated to the second data warehouse to form the migrated data through concurrent control and peak-shifting scheduling mechanism.

[0180] In some embodiments, the migration module 1320 monitors the performance parameters of the first data warehouse in real time in the following manner: collecting performance data of the first data warehouse; analyzing the performance data to obtain performance parameters of the first data warehouse, wherein the performance parameters include at least one of the current number of connections, the maximum number of connections, and the CPU utilization.

[0181] In some embodiments, the migration module 1320 is further used to: output a migration log of the data to be migrated during the migration process; determine the migration progress of the data to be migrated according to the list of data to be migrated and the migration log; and output an exception log if there is an exception in the migration log.

[0182] In some embodiments, the migration module 1320 adopts the following methods according to concurrent processes and performance parameters, through concurrent control and peak-shifting scheduling mechanism, to migrate the data to be migrated to the second data warehouse to form migrated data, including: adjusting the number of concurrent processes in real time according to performance parameters, performing concurrent control and peak-shifting scheduling; through concurrent control and peak-shifting scheduling mechanism, migrating the data to be migrated to the second data warehouse to form migrated data.

[0183] In some embodiments, the audit module 1330 is used to: perform data consistency audit on the migrated data according to data audit rules, the list of data to be migrated and the migration log; if the consistency between the migrated data and the data to be migrated is less than the reprocessing threshold, the migration is successful; if the consistency between the migrated data and the data to be migrated is greater than or equal to the reprocessing threshold, the migration fails and a warning message is issued.

[0184] Fig.14 The following is a schematic diagram of the working process of a data migration device according to an embodiment of the present disclosure. Fig.14 In the embodiment shown, in this embodiment, the data of data warehouse A flows into data warehouse B through this device. This process requires manual intervention only in the rule center, and other links are all automated. Step 1: First, analyze the table objects to be migrated in data warehouse A, and form corresponding rules based on the object characteristics. Configure the feature rules of the objects to be migrated (table size, number of records, whether partitioned, primary key, index, keyword, etc.), business rules (key tables, key fields, migration methods, etc.), and data audit dimension rules (field aggregation value, indicator level, row level (hash value)) into the configuration center.

[0185] Step 2: This device generates a list to be migrated based on the migration object feature rules configured by the configuration center.

[0186] Step 3: Initialize concurrent processes and start data migration. At this time, log management and concurrency control take effect at the same time. The log management unit records the data migration log (recording the table name, the number of migrated items, the size of migrated data, etc.), providing data basis for the subsequent data audit unit and exception handling unit. The progress of the current migration can be calculated in real time based on the migration list parameters in the first step combined with the migration log; the concurrency control function module reads the relevant parameters of the server where the source database is located in real time (number of connections, maximum number of connections, CPU value, etc.), and uses the concurrency control algorithm to adjust the number of concurrent processes, so that the data migration speed is always kept at a high level and can ensure that the migration process will not stop due to exhaustion of server resources.

[0187] Step 4: After the data migration is completed, the data audit function and exception handling function are automatically started. Data audit is performed according to the data audit rules in the first step, the rule attributes in the migration list in the second step, and the migration log records in the third step, and the audit results are recorded. The exception handling function is not only started after the data migration is completed, but also if there are records with inconsistent audit results after the data audit is completed.

[0188] In summary, through the data migration device, based on the migration rules of the data in the first data warehouse, the list of data to be migrated is determined; according to the list of data to be migrated, the data to be migrated is migrated to the second data warehouse to form migrated data; the data consistency of the migrated data is determined to determine whether the migration is successful. This device solves the problem that the technical solution for mass data migration is highly dependent on manual operation and lacks effective methods for data auditing, which leads to low migration efficiency and the inability to guarantee the accuracy of data after migration, and improves the efficiency and quality of data migration.

[0189] In addition, the device has a wide range of application scenarios, improves the speed and quality of data migration, reduces the man-day consumption in data migration projects, and improves the overall quality. After practical application and scientific verification of three column storage database migration projects, the workload per PB was reduced by 40% compared with before the technological innovation. Taking data migration in an actual project as an example, the total data volume is 1PB.

[0190] In the data preparation phase, the traditional data preparation method requires 10 man-days to prepare data, classify and optimize tables, and prepare for data migration. After using the migration tool, the actual data preparation work only takes 5 man-days to complete, increasing efficiency by 200%.

[0191] During the data migration phase, the efficiency of traditional data migration methods is about 1TB / hour. With the data migration tool, the migration efficiency can be increased to 5TB / hour due to the increase in concurrency. Due to the different cold and hot data migration methods, the overall migration time is reduced from 10 man-days to 4 man-days;

[0192] During the data audit phase, the traditional data verification method takes about 3 man-days to complete the data audit. Using the data migration tool, it only took 1 man-day to complete the 1PB data audit.

[0193] The total cost is reduced by (5+6+2) / (10+10+3)≈57%, and the total cost of the data migration project is reduced by 57%. This is highly scalable.

[0194] In the embodiments provided in the present application, the methods and devices provided in the embodiments of the present application are introduced. In order to implement the functions in the methods provided in the embodiments of the present application, the electronic device may include a hardware structure and a software module, and implement the functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. A function of the functions may be executed in the form of a hardware structure, a software module, or a hardware structure plus a software module.

[0195] Fig.15 is a block diagram of an electronic device 1300 for implementing the above data migration method according to an exemplary embodiment.

[0196] For example, the electronic device 1500 may be a mobile phone, a computer, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0197] Reference Fig.15 , the electronic device 1500 may include one or more of the following components: a processing component 1502 , a memory 1504 , a power component 1506 , a multimedia component 1508 , an audio component 1510 , an input / output (I / O) interface 1512 , a sensor component 1514 , and a communication component 1516 .

[0198] The processing component 1502 generally controls the overall operation of the electronic device 1500, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1502 may include one or more processors 1520 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 1502 may include one or more modules to facilitate the interaction between the processing component 1502 and other components. For example, the processing component 1502 may include a multimedia module to facilitate the interaction between the multimedia component 1508 and the processing component 1502.

[0199] The memory 1504 is configured to store various types of data to support operations on the electronic device 600. Examples of such data include instructions for any application or method operating on the electronic device 1500, contact data, phone book data, messages, pictures, videos, etc. The memory 1504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0200] The power supply component 1506 provides power to the various components of the electronic device 1500. The power supply component 1506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 1500.

[0201] The multimedia component 1508 includes a screen that provides an output interface between the electronic device 1500 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1508 includes a front camera and / or a rear camera. When the electronic device 1500 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0202] The audio component 1510 is configured to output and / or input audio signals. For example, the audio component 1510 includes a microphone (MIC), and when the electronic device 1500 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1504 or sent via the communication component 1516. In some embodiments, the audio component 1510 also includes a speaker for outputting audio signals.

[0203] I / O interface 1512 provides an interface between processing component 1502 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0204] The sensor assembly 1514 includes one or more sensors for providing various aspects of status assessment for the electronic device 1500. For example, the sensor assembly 1514 can detect the open / closed state of the electronic device 1500, the relative positioning of components, such as the display and keypad of the electronic device 1500, and the sensor assembly 1514 can also detect the position change of the electronic device 1500 or a component of the electronic device 1500, the presence or absence of user contact with the electronic device 1500, the orientation or acceleration / deceleration of the electronic device 1500, and the temperature change of the electronic device 1500. The sensor assembly 1514 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1514 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1514 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0205] The communication component 1516 is configured to facilitate wired or wireless communication between the electronic device 1500 and other devices. The electronic device 1500 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G LTE, 5G NR (NewR15dio) or a combination thereof. In an exemplary embodiment, the communication component 1516 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1516 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0206] In an exemplary embodiment, the electronic device 1500 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above methods.

[0207] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1504 including instructions, and the instructions can be executed by the processor 1520 of the electronic device 1500 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0208] The embodiments of the present disclosure further provide a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the data migration method described in the above embodiments of the present disclosure.

[0209] An embodiment of the present disclosure further provides a computer program product, including a computer program, which executes the data migration method described in the above embodiment of the present disclosure when a processor executes the computer program.

[0210] An embodiment of the present disclosure also proposes a chip, which includes one or more interface circuits and one or more processors; the interface circuit is used to receive signals from a memory of an electronic device and send signals to the processor, the signals include computer instructions stored in the memory, and when the processor executes the computer instructions, the electronic device executes the data migration method described in the above embodiments of the present disclosure.

[0211] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0212] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0213] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present disclosure includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present disclosure belong.

[0214] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processing module, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (control method), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or otherwise processing in a suitable manner if necessary, and then stored in a computer memory.

[0215] It should be understood that the various parts of the embodiments of the present disclosure can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0216] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0217] In addition, each functional unit in each embodiment of the present disclosure may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium. The above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0218] Although the embodiments of the present disclosure have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present disclosure. A person skilled in the art may make changes, modifications, substitutions and variations to the above embodiments within the scope of the present disclosure.

Claims

1. A data migration method, characterized in that: The method comprises: Determine a list of data to be migrated based on migration rules of the data in the first data warehouse; According to the list of data to be migrated, migrate the data to be migrated to the second data warehouse to form migrated data; The data consistency of the migrated data is determined to determine whether the migration is successful.

2. The method according to claim 1, characterized in that: The step of determining the list of data to be migrated based on the migration rules of the data in the first data warehouse includes: Configure the migration rules, which include feature rules, business rules, and data audit rules for the data to be migrated; According to the migration rule, a rule SQL template is obtained; According to the regular SQL template, the list of data to be migrated is determined.

3. The method according to claim 2, characterized in that Determining the list of data to be migrated according to the rule SQL template includes: Obtaining table information of the data to be migrated; According to the table information of the data to be migrated and the migration rule, a list generation script is obtained by calling the rule SQL template; Based on the list generation script, the list of data to be migrated is obtained.

4. The method according to claim 1, characterized in that: The step of migrating the data to be migrated to the second data warehouse to form migrated data according to the list of data to be migrated includes: Determining the data to be migrated according to the list of data to be migrated; Initialize a concurrent process for migrating the data to be migrated; monitoring the performance parameters of the first data warehouse in real time; According to the concurrent processes and the performance parameters, the data to be migrated is migrated to the second data warehouse to form the migrated data through concurrent control and peak-shifting scheduling mechanism.

5. The method according to claim 4, characterized in that The real-time monitoring of the performance parameters of the first data warehouse includes: Collecting performance data of the first data warehouse; The performance data is analyzed to obtain performance parameters of the first data warehouse, wherein the performance parameters include at least one of the current number of connections, the maximum number of connections, and the utilization rate of the central processing unit.

6. The method according to claim 4, characterized in that The method further comprises: Outputting a migration log of the data to be migrated during the migration process; Determining the migration progress of the data to be migrated according to the list of data to be migrated and the migration log; If there is an exception in the migration log, the exception log is output.

7. The method according to claim 4 or 5, characterized in that: The step of migrating the data to be migrated to the second data warehouse to form the migrated data according to the concurrent process and the performance parameter through concurrent control and peak-shifting scheduling mechanism includes: According to the performance parameters, the number of concurrent processes is adjusted in real time to perform concurrency control and peak-shifting scheduling; Through the concurrency control and peak-shifting scheduling mechanism, the data to be migrated is migrated to the second data warehouse to form the migrated data.

8. The method according to any one of claims 2 to 7, characterized in that: Determining the data consistency of the migrated data to determine whether the migration is successful includes: Performing a data consistency audit on the migrated data according to the data audit rules, the list of data to be migrated and the migration log; If the consistency between the migrated data and the data to be migrated is less than the reprocessing threshold, the migration is successful; If the consistency between the migrated data and the data to be migrated is greater than or equal to the reprocessing threshold, the migration fails and a warning message is issued.

9. A data migration device, characterized in that: The device comprises: A determination module, used to determine a list of data to be migrated based on a migration rule of data in the first data warehouse; A migration module, configured to migrate the data to be migrated to a second data warehouse to form migrated data according to the list of data to be migrated; The audit module is used to audit the migrated data and determine the data consistency.

10. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 8.

11. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-8.

12. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 8.

13. A chip, characterized in that: It comprises one or more interface circuits and one or more processors; the interface circuit is used to receive a signal from a memory of an electronic device and send the signal to the processor, the signal includes a computer instruction stored in the memory, and when the processor executes the computer instruction, the electronic device executes the method described in any one of claims 1 to 8.