Verification method and device in data migration process, equipment and medium

By asynchronously performing verification tasks to calculate file feature values ​​in parallel, the problem of consistency verification time-consuming in data migration is solved and the data migration efficiency is improved.

CN119201842APending Publication Date: 2024-12-27ZHENGZHOU INSPUR DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411092104.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-08
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

In the data migration process, the prior art requires reading of file contents due to the inability to obtain file characteristic values ​​directly during the data migration process, which consumes a lot of time and resources, reducing the data migration efficiency.

Method used

The verification task is performed asynchronously, and file feature values ​​are calculated in parallel through the verification thread pool, reducing waiting time and improving data migration efficiency.

Benefits of technology

Parallel verification is performed during data migration, which significantly reduces the waiting time, improves the efficiency of data migration, and makes it more rapid and efficient.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201842A_ABST
    Figure CN119201842A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a verification method and device in a data migration process, equipment and a medium. In the data migration process, target data in a source end database is obtained; asynchronously executing a first verification task corresponding to the target data to obtain a first feature value corresponding to the target data; migrating the initial migration data containing the target data to a target end database to obtain target migration data; asynchronously executing a second verification task corresponding to the target migration data to obtain a second feature value corresponding to the target migration data; according to the first characteristic value and the second characteristic value, consistency verification is carried out, the verification result corresponding to the target data is obtained, verification can be carried out while data migration is carried out by adopting a mode of asynchronously executing the verification task, so that the efficiency of the whole data migration process is improved, and the data migration efficiency is improved. The parallel processing mode reduces the waiting time in the data migration process, so that the data migration is quicker and more efficient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of data processing technology, and in particular, to a verification method in a data migration process, a verification device in a data migration process, an electronic device, and a computer-readable storage medium. Background Art

[0002] With the continuous development of technology, new storage technologies, database systems and data processing tools continue to emerge, prompting enterprises to migrate data to take advantage of new technologies. For example, migrating files from an old database to a new database, or integrating two different database systems into a unified platform, data migration is an essential step.

[0003] The existing technology for data migration usually adopts the method of full synchronization plus scheduled incremental synchronization. Full synchronization is to synchronize all the files of the source database to the target database, and then verify the consistency of the source database files and the target database files, and perform data migration again for inconsistent files. Incremental synchronization is to perform consistency checks on the source and target files before and after migration, migrate inconsistent files, and skip consistent files.

[0004] For file consistency verification, it is usually necessary to compare file feature values, which cannot be obtained directly. Instead, the file content must be read and then the feature values ​​calculated. Therefore, when a large number of files need to be migrated, file consistency verification takes a lot of time and resources. Summary of the invention

[0005] In view of the above problems, an embodiment of the present invention provides a verification method, device, electronic device and storage medium in a data migration process to overcome the above problems or at least partially solve the above problems.

[0006] An embodiment of the present invention discloses a verification method in a data migration process, which relates to a database, wherein the database includes a source database and a target database, and the method includes:

[0007] Acquire target data from the source database;

[0008] Asynchronously executing a first verification task corresponding to the target data to obtain a first characteristic value corresponding to the target data;

[0009] Migrating the initial migration data including the target data to the target-side database to obtain target migration data;

[0010] asynchronously executing a second verification task corresponding to the target migration data to obtain a second characteristic value corresponding to the target migration data;

[0011] A consistency check is performed based on the first eigenvalue and the second eigenvalue to obtain a check result corresponding to the target data.

[0012] Optionally, before acquiring the target data in the source database, the method further includes:

[0013] Creating a data migration task for the source data and the target database;

[0014] A verification rule for the data migration task is configured, where the verification rule is used to calculate the first characteristic value and the second characteristic value.

[0015] Optionally, the acquiring the target data in the source database includes:

[0016] All files in the source database are used as the target data, or files that have changed in the source database are used as the target data.

[0017] Optionally, taking the changed files in the source database as the target data includes:

[0018] Setting a monitoring thread for the source database;

[0019] All files in the source database are monitored by the monitoring thread, and the files that have changed in the source database are used as the target data.

[0020] Optionally, the asynchronously executing the first verification task corresponding to the target data to obtain the first characteristic value corresponding to the target data includes:

[0021] Encapsulating the target data as the first verification task;

[0022] Adding the first verification task to a verification task queue in the source database;

[0023] Automatically obtain the first verification task in the verification task queue through a verification thread pool, wherein the verification thread pool includes multiple verification threads;

[0024] Execute the first verification task according to the verification thread to obtain a first characteristic value corresponding to the target data;

[0025] The first feature value is stored in a file feature value library.

[0026] Optionally, the asynchronously executing the second verification task corresponding to the target migration data to obtain the second characteristic value corresponding to the target migration data includes:

[0027] Sending the target migration data to the source database;

[0028] Encapsulating the target migration data as the second verification task;

[0029] Adding the second verification task to the head of the verification task queue;

[0030] Automatically obtaining the second verification task in the verification task queue through the verification thread pool;

[0031] Execute the second verification task according to the verification thread to obtain a second file feature value corresponding to the target migration data;

[0032] The second file characteristic value is stored in a verification file, and the verification file is located in the target end database.

[0033] Optionally, the method further includes:

[0034] storing the first feature value corresponding to the target data in the file feature value library, and adding an update mark for the target data;

[0035] Using the target data with the update mark as the initial migration data;

[0036] The performing consistency check according to the first characteristic value and the second characteristic value to obtain a check result corresponding to the target migration data includes:

[0037] Searching according to the file feature value library to obtain a first feature value corresponding to the target data in the initial migration data;

[0038] Obtaining, according to the verification file, a second characteristic value corresponding to the target data in the target migration data;

[0039] comparing the first characteristic value with the second characteristic value;

[0040] If the first characteristic value is consistent with the second characteristic value, the target data is successfully migrated, and the update mark corresponding to the target data is cancelled;

[0041] If the first characteristic value and the second characteristic value are inconsistent, the migration of the target data fails, and the update mark corresponding to the target data is retained.

[0042] The embodiment of the present invention further discloses a verification device in a data migration process, which relates to a database, wherein the database includes a source database and a target database, including:

[0043] A data acquisition module, used to acquire target data from the source database;

[0044] A first verification module, used for asynchronously executing a first verification task corresponding to the target data to obtain a first characteristic value corresponding to the target data;

[0045] A data migration module, used to migrate the initial migration data including the target data to the target-side database to obtain the target migration data;

[0046] A second verification module, configured to asynchronously execute a second verification task corresponding to the target migration data to obtain a second characteristic value corresponding to the target migration data;

[0047] A consistency check module is used to perform a consistency check based on the first eigenvalue and the second eigenvalue to obtain a check result corresponding to the target data.

[0048] The embodiment of the present invention further discloses an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0049] The memory is used to store computer programs;

[0050] The processor is used to implement the method described in the embodiment of the present invention when executing the program stored in the memory.

[0051] The embodiment of the present invention further discloses a computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, enables the processors to execute the method described in the embodiment of the present invention.

[0052] The embodiments of the present invention include the following advantages:

[0053] In an embodiment of the present invention, during the data migration process, the target data in the source database is obtained; the first verification task corresponding to the target data is asynchronously executed to obtain the first characteristic value corresponding to the target data; the initial migration data containing the target data is migrated to the target database to obtain the target migration data; the second verification task corresponding to the target migration data is asynchronously executed to obtain the second characteristic value corresponding to the target migration data; a consistency check is performed based on the first characteristic value and the second characteristic value to obtain the verification result corresponding to the target data. By adopting the method of asynchronously executing the verification task, the verification can be performed while the data is migrating, thereby improving the efficiency of the entire data migration process. This parallel processing method reduces the waiting time during the data migration process, making the data migration faster and more efficient. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 is a flowchart of a verification method in a data migration process provided in an embodiment of the present invention;

[0055] Figure 2 It is a schematic diagram of a process for calculating a file feature value by a source database provided in an embodiment of the present invention;

[0056] Figure 3 is a schematic diagram of a data consistency check process provided in an embodiment of the present invention;

[0057] Figure 4 is a structural block diagram of a verification device in a data migration process provided in an embodiment of the present invention;

[0058] Figure 5 is a block diagram of an electronic device provided in an embodiment of the present invention;

[0059] Figure 6 is a schematic diagram of a computer-readable medium provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0060] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0061] As an example, in the process of data migration, the prior art usually calculates the file feature value of the pre-migration data and the post-migration data before and after the data migration, and then performs consistency check on the data before and after the migration according to the file feature value, and determines whether the data migration is successful through the result of the consistency check. However, the file feature value needs to be calculated by reading the data content, which takes a long time. Therefore, when a large amount of data needs to be migrated, the consistency check of the data consumes a lot of resources and time, resulting in an increase in the waiting time during the data migration process, which reduces the efficiency of data migration.

[0062] In this regard, the advantage of the present invention over the prior art is that, during the data migration process, the file feature values ​​are calculated by asynchronously executing verification tasks, and verification can be performed while data is migrating, thereby improving the efficiency of the entire data migration process. This parallel processing method reduces the waiting time during the data migration process, making data migration faster and more efficient.

[0063] Reference Figure 1 , shows a flowchart of the steps of a verification method in a data migration process provided in an embodiment of the present invention, involving a database, the database including a source database and a target database, and specifically may include the following steps:

[0064] Step 101: Obtain target data from the source database;

[0065] In the embodiment of the present invention, data migration involves a source database and a target database. The source database is the starting point of data migration and is used to provide data to be migrated. The target database is the destination of data migration and is used to receive and store migrated data. The target data to be migrated in the source database is obtained in advance to calculate the file feature value, thereby reducing the waiting time during the migration process. Specifically, the source database can be an old version database and the target database can be a new version database, or the source database can be a local database and the target database can be a cloud database. The present invention does not limit this.

[0066] In a preferred embodiment of the present invention, before step 101, obtaining the target data in the source database, the method further includes:

[0067] Creating a data migration task for the source data and the target database;

[0068] A verification rule for the data migration task is configured, where the verification rule is used to calculate the first characteristic value and the second characteristic value.

[0069] In an embodiment of the present invention, before performing data migration, it is first necessary to create a data migration task for the source data and the target database. The data migration task defines the specific operations of data migration, including steps such as data acquisition, data processing, data transmission and data storage, and further configures the verification rules corresponding to the data migration task. The characteristic values ​​of the data are calculated by the verification rules and consistency verification is performed. In an embodiment of the present invention, by creating a data migration task, it is possible to clarify the migration target, plan the migration process, allocate resources and perform risk management. By configuring the verification rules, it is possible to ensure data integrity, improve migration efficiency, ensure data consistency, ensure the smooth progress of data migration, and improve the overall quality and efficiency of data migration. Among them, the verification rules can be configured according to the needs of the data migration task. For example, the verification rules can include file name, file size, file modification time, file characteristic value, etc., and the present invention does not limit this.

[0070] Specifically, a configuration module is set up to store the verification rules of the data migration task. The user can configure the verification rules in the configuration module through the service interface and dynamically adjust the verification rules according to the needs of data migration. Optionally, a graphical interface is set up to call the service interface through the graphical interface to configure the verification rules, so as to provide visual display and editing of the verification rules.

[0071] In a preferred embodiment of the present invention, step 101, obtaining target data in the source database, includes:

[0072] All files in the source database are used as the target data, or files that have changed in the source database are used as the target data.

[0073] In an embodiment of the present invention, if the source database is migrating data to the target database for the first time, full synchronization is required to ensure the integrity of the data. Therefore, all files in the source database are selected for characteristic value calculation so that all files can be checked for consistency during the data migration process. If the first data migration has been completed, only incremental synchronization can be performed subsequently, and only the changed files can be migrated, which reduces the workload and time of data migration. Therefore, the changed files in the source database are obtained as target data for calculation to obtain the file characteristic values ​​of the target data.

[0074] In a preferred embodiment of the present invention, taking the changed files in the source database as the target data includes:

[0075] Setting a monitoring thread for the source database;

[0076] All files in the source database are monitored by the monitoring thread, and the files that have changed in the source database are used as the target data.

[0077] In an embodiment of the present invention, a monitoring module for the source database is set, and then all files in the source database are monitored according to multiple monitoring threads in the monitoring module, and the changed files in the source database are used as target data, and the characteristic value of the file is calculated to perform consistency verification for subsequent data migration. In an embodiment of the present invention, by setting a monitoring thread and monitoring the changed files in the source database, real-time data synchronization can be achieved, migration efficiency can be improved, resource consumption can be reduced, data integrity can be ensured, the data migration process can be simplified, and business interruption can be avoided.

[0078] Step 102: asynchronously execute a first verification task corresponding to the target data to obtain a first characteristic value corresponding to the target data;

[0079] In an embodiment of the present invention, the target data is encapsulated as a verification task, and the verification task is processed in an asynchronous execution manner, so that the verification task and the data migration task are carried out in parallel without blocking the data migration process. In this way, data verification can be performed while data is migrating, reducing the waiting time during the migration process and improving the overall migration efficiency.

[0080] In a preferred embodiment of the present invention, step 102, asynchronously executing a first verification task corresponding to the target data to obtain a first characteristic value corresponding to the target data, includes:

[0081] Encapsulating the target data as the first verification task;

[0082] Adding the first verification task to a verification task queue in the source database;

[0083] Automatically obtain the first verification task in the verification task queue through a verification thread pool, wherein the verification thread pool includes multiple verification threads;

[0084] Execute the first verification task according to the verification thread to obtain a first characteristic value corresponding to the target data;

[0085] The first feature value is stored in a file feature value library.

[0086] In an embodiment of the present invention, the target data is encapsulated as a corresponding verification task and placed in a verification task queue for storing verification tasks to be executed, and the verification tasks in the verification task queue are automatically obtained in order through the verification thread pool, and the verification tasks are processed in parallel by multiple verification threads of the verification thread pool to obtain the characteristic values ​​corresponding to the target data, and the characteristic values ​​are stored in the file characteristic value library. In an embodiment of the present invention, by calculating and storing the characteristic values ​​of the target data in parallel, it is possible to ensure that the target data is verified according to the characteristic values ​​during the data migration process, verify the integrity of the data, avoid spending a lot of time waiting for the calculation of the file characteristic values ​​during the data migration process, and improve the efficiency of data migration. Among them, the file characteristic value library is used to store the characteristic values ​​corresponding to the files in the source database, and the file characteristic value library can be an h2database database (H2 Database, Java embedded relational database) or a mysql database (MySQLDatabase Management System, relational database), and the present invention does not limit this.

[0087] In addition, before adding the verification task to the verification task queue, the file name of the target data is compared with the file name in the verification task queue. If the verification task corresponding to the file has been stored in the verification task queue, it will not be added to the verification task queue. If the verification task is not in the verification task queue, it will continue to be added to the verification task queue to avoid repeated calculation of file feature values ​​due to frequent changes to the same file.

[0088] Optionally, in an embodiment of the present invention, the load of the source database can be monitored in real time by a monitoring thread, and the number of concurrent verification threads can be dynamically adjusted according to the load of the source database to optimize resource utilization.

[0089] Step 103: Migrate the initial migration data including the target data to the target-side database to obtain target migration data;

[0090] In an embodiment of the present invention, initial migration data refers to data extracted from a source database and prepared for migration during the data migration process. The initial migration data includes target data. The initial migration data in the source database is migrated and stored in the target database to obtain target migration data.

[0091] Step 104: asynchronously execute a second verification task corresponding to the target migration data to obtain a second characteristic value corresponding to the target migration data;

[0092] In an embodiment of the present invention, a second round of verification is performed on the target migration data that has been migrated to the target database. Similar to the first verification task, the second verification task is also processed in an asynchronous execution manner, so that the verification task and the data migration task are performed in parallel, which will not block the data migration process, reduce the waiting time during the migration process, and thus improve the overall migration efficiency.

[0093] In a preferred embodiment of the present invention, step 104, asynchronously executing a second verification task corresponding to the target migration data to obtain a second characteristic value corresponding to the target migration data, includes:

[0094] Sending the target migration data to the source database;

[0095] Encapsulating the target migration data as the second verification task;

[0096] Adding the second verification task to the head of the verification task queue;

[0097] Automatically obtaining the second verification task in the verification task queue through the verification thread pool;

[0098] Execute the second verification task according to the verification thread to obtain a second file feature value corresponding to the target migration data;

[0099] The second file characteristic value is stored in a verification file, and the verification file is located in the target end database.

[0100] In an embodiment of the present invention, after data migration, the migrated files are generated as a migration file list, and the target database transmits the migration file list to the source database through the service interface. The migrated files in the migration file list are encapsulated as corresponding verification tasks and put into the queue head of the verification task queue to ensure that the verification thread preferentially calculates the characteristic values ​​of the new migration files of the target database. The verification tasks are further executed concurrently by multiple verification threads to obtain the characteristic values ​​corresponding to the migrated files, and the characteristic values ​​are stored in the verification files in the target database through the service interface. The characteristic values ​​of the target migration data are obtained through parallel calculation, which is helpful for subsequent verification of the consistency of the migration data, reduces the time waiting for the characteristic value calculation, and improves the efficiency of data migration.

[0101] Optionally, the verification file stores the second characteristic value through a key-value pair data structure, which is conducive to the subsequent acquisition of the characteristic value, and the verification file can be a temporary verification file, which is automatically deleted after the consistency check is completed to reduce the storage space occupied by the target database.

[0102] Step 105: Perform a consistency check based on the first eigenvalue and the second eigenvalue to obtain a check result corresponding to the target data.

[0103] In an embodiment of the present invention, data consistency verification is performed using the first eigenvalue and the second eigenvalue calculated previously, and the eigenvalue is a value of a fixed length calculated from the file content. By comparing the two eigenvalues, it is possible to determine whether the target data has maintained consistency during the migration process, and generate a verification result. The verification result provides an important evaluation basis for the quality of data migration, which is conducive to timely discovering and resolving problems in the data migration process, and ensuring the smooth progress of data migration.

[0104] In a preferred embodiment of the present invention, the method further comprises:

[0105] storing the first feature value corresponding to the target data in the file feature value library, and adding an update mark for the target data;

[0106] Using the target data with the update mark as the initial migration data;

[0107] The performing consistency check according to the first characteristic value and the second characteristic value to obtain a check result corresponding to the target migration data includes:

[0108] Searching according to the file feature value library to obtain a first feature value corresponding to the target data in the initial migration data;

[0109] Obtaining, according to the verification file, a second characteristic value corresponding to the target data in the target migration data;

[0110] comparing the first characteristic value with the second characteristic value;

[0111] If the first characteristic value is consistent with the second characteristic value, the target data is successfully migrated, and the update mark corresponding to the target data is cancelled;

[0112] If the first characteristic value and the second characteristic value are inconsistent, the migration of the target data fails, and the update mark corresponding to the target data is retained.

[0113] In an embodiment of the present invention, in the source database, the first characteristic value of the target data is stored in the file characteristic value library, and an update mark is added to it to identify that these data are newly updated or need special attention. The target data with the update mark is regarded as the initial migration data, migrated to the target database to obtain the target migration data, and the target migration data is calculated to obtain the second characteristic value corresponding to the target migration data and stored in the verification file. Then, in the process of consistency verification, the first characteristic value corresponding to the target data in the initial migration data is retrieved from the file characteristic value library, and the second characteristic value corresponding to the target data in the target migration data is obtained from the verification file, and the first characteristic value is compared with the second characteristic value. If the first characteristic value and the second characteristic value are consistent, it means that the target data migration is successful, and the update mark corresponding to the target data is cancelled. If the first characteristic value and the second characteristic value are inconsistent, it means that the target data migration has failed, and the update mark corresponding to the target data is retained for subsequent processing or re-migration. In an embodiment of the present invention, by real-time monitoring of source file changes and asynchronous calculation of file characteristic values, the waiting time for consistency verification of all data before and after the execution of the data migration task is reduced, and the file characteristic values ​​can be reused to reduce the resource consumption of repeated calculation of characteristic values ​​for unchanged files.

[0114] As an example, see Figure 2 , shows a schematic diagram of a process for calculating file feature values ​​in a source-end database provided in an embodiment of the present invention; specifically, target files for which file feature values ​​need to be calculated are identified from the source-end database. If there are no files with the same names as these target files in the verification task queue, these target files are encapsulated into verification tasks and added to the verification task queue. The verification thread pool extracts verification tasks from the verification task queue in a predetermined order, and uses multiple verification threads to concurrently execute verification tasks, calculates feature values ​​of the target files, and stores these feature values ​​in a file feature value library for subsequent data consistency verification.

[0115] As an example, see Figure 3, shows a schematic diagram of a process of calculating file feature values ​​of a source database provided in an embodiment of the present invention; specifically, in the process of data migration, once the initial migration data is successfully migrated to the target database, a migration file list containing all the migrated target files is generated, and this list is then sent back to the source database, and is encapsulated as a verification task corresponding to the migrated target file in the source database, and is preferentially added to the queue head of the verification task queue to ensure that they can be preferentially processed by the verification thread in the verification thread pool, and then the verification thread pool will respond quickly, extract the verification task from the queue head, and start calculating the feature value of the migrated target file. If the verified file is the target file in the source database, then the calculated feature value will be stored in the file feature value library, on the contrary, if the verified file is the migrated target file in the target database, then the corresponding file feature value will be stored in the verification file, and finally the verification result of the target file is determined by comparing the feature values ​​of the target file before and after migration in the file feature value library and the verification file.

[0116] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0117] Reference Figure 4 , shows a structural block diagram of a verification device in a data migration process provided in an embodiment of the present invention, which may specifically include the following modules:

[0118] The data acquisition module 401 is used to acquire the target data in the source database;

[0119] A first verification module 402, configured to asynchronously execute a first verification task corresponding to the target data to obtain a first characteristic value corresponding to the target data;

[0120] The data migration module 403 is used to migrate the initial migration data including the target data to the target end database to obtain the target migration data;

[0121] A second verification module 404 is used to asynchronously execute a second verification task corresponding to the target migration data to obtain a second characteristic value corresponding to the target migration data;

[0122] The consistency check module 405 is used to perform a consistency check based on the first eigenvalue and the second eigenvalue to obtain a check result corresponding to the target data.

[0123] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0124] In addition, the present application also provides an electronic device, such as Figure 5 As shown, it includes a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504.

[0125] Memory 503, used for storing computer programs;

[0126] The processor 501 is used to implement the model training method described in the above embodiment when executing the program stored in the memory 503.

[0127] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0128] The communication interface is used for communication between the above terminal and other devices.

[0129] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0130] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0131] like Figure 6 As shown, in another embodiment provided in the present application, a computer-readable storage medium 601 is also provided, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the model training method described in the above embodiment.

[0132] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

[0133] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0134] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0135] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. A verification method in a data migration process, characterized in that: A database is involved, the database includes a source database and a target database, and the method includes: Acquire target data from the source database; Asynchronously executing a first verification task corresponding to the target data to obtain a first characteristic value corresponding to the target data; Migrating the initial migration data including the target data to the target-side database to obtain target migration data; asynchronously executing a second verification task corresponding to the target migration data to obtain a second characteristic value corresponding to the target migration data; A consistency check is performed based on the first eigenvalue and the second eigenvalue to obtain a check result corresponding to the target data.

2. The method according to claim 1, characterized in that Before obtaining the target data in the source database, the method further includes: Creating a data migration task for the source data and the target database; A verification rule for the data migration task is configured, where the verification rule is used to calculate the first characteristic value and the second characteristic value.

3. The method according to claim 1, characterized in that The acquiring of target data in the source database includes: All files in the source database are used as the target data, or files that have changed in the source database are used as the target data.

4. The method according to claim 3, characterized in that The taking the changed files in the source database as the target data includes: Setting a monitoring thread for the source database; All files in the source database are monitored by the monitoring thread, and the files that have changed in the source database are used as the target data.

5. The method according to claim 1, characterized in that The asynchronously executing the first verification task corresponding to the target data to obtain the first characteristic value corresponding to the target data includes: Encapsulating the target data as the first verification task; Adding the first verification task to a verification task queue in the source database; Automatically obtain the first verification task in the verification task queue through a verification thread pool, wherein the verification thread pool includes multiple verification threads; Execute the first verification task according to the verification thread to obtain a first characteristic value corresponding to the target data; The first feature value is stored in a file feature value library.

6. The method according to claim 5, characterized in that The asynchronously executing the second verification task corresponding to the target migration data to obtain the second characteristic value corresponding to the target migration data includes: Sending the target migration data to the source database; Encapsulating the target migration data as the second verification task; Adding the second verification task to the head of the verification task queue; Automatically obtaining the second verification task in the verification task queue through the verification thread pool; Execute the second verification task according to the verification thread to obtain a second file feature value corresponding to the target migration data; The second file characteristic value is stored in a verification file, and the verification file is located in the target end database.

7. The method according to claim 6, characterized in that The method further comprises: storing the first feature value corresponding to the target data in the file feature value library, and adding an update mark for the target data; Using the target data with the update mark as the initial migration data; The performing consistency check according to the first characteristic value and the second characteristic value to obtain a check result corresponding to the target migration data includes: Searching according to the file feature value library to obtain a first feature value corresponding to the target data in the initial migration data; Obtaining, according to the verification file, a second characteristic value corresponding to the target data in the target migration data; comparing the first characteristic value with the second characteristic value; If the first characteristic value is consistent with the second characteristic value, the target data is successfully migrated, and the update mark corresponding to the target data is cancelled; If the first characteristic value and the second characteristic value are inconsistent, the migration of the target data fails, and the update mark corresponding to the target data is retained.

8. A verification device in a data migration process, characterized in that: Involving a database, the database includes a source database and a target database, including: A data acquisition module, used to acquire target data from the source database; A first verification module, used for asynchronously executing a first verification task corresponding to the target data to obtain a first characteristic value corresponding to the target data; A data migration module, used to migrate the initial migration data including the target data to the target-side database to obtain the target migration data; A second verification module, configured to asynchronously execute a second verification task corresponding to the target migration data to obtain a second characteristic value corresponding to the target migration data; A consistency check module is used to perform a consistency check based on the first eigenvalue and the second eigenvalue to obtain a check result corresponding to the target data.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used to store computer programs; The processor is used to implement the method according to any one of claims 1 to 7 when executing the program stored in the memory.

10. A computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, cause the processors to perform the method according to any one of claims 1 to 7.