CN115426290A - Data migration and verification method and device, computer equipment and storage medium - Google Patents

Data migration and verification method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115426290A
CN115426290A CN202211170630.4A CN202211170630A CN115426290A CN 115426290 A CN115426290 A CN 115426290A CN 202211170630 A CN202211170630 A CN 202211170630A CN 115426290 A CN115426290 A CN 115426290A
Authority
CN
China
Prior art keywords
file
migration
export
directory
verification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211170630.4A
Other languages
Chinese (zh)
Inventor
李婧媛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202211170630.4A priority Critical patent/CN115426290A/en
Publication of CN115426290A publication Critical patent/CN115426290A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Landscapes

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

Abstract

The application relates to the technical field of data transmission, and provides a data migration and verification method, a data migration and verification device, computer equipment and a storage medium, wherein the data migration and verification method comprises the following steps: extracting a migration object and a migration directory in the export indication information, setting a data file corresponding to the migration object as an export file, and associating the export file with the migration directory; migrating the exported files to a migration directory, and setting the exported files stored in the migration directory as imported files; loading the file name of the exported file into the imported file to ensure that the file name of the exported file is consistent with the file name of the imported file, and recording the file name into a case template to obtain a test case; checking whether the exported file and the imported file are consistent or not; if the contents are consistent, generating a verification result that the migration is successful; and if the contents are not consistent, generating a verification result with the migration failure. The method and the device improve the data migration efficiency, ensure the consistency and reliability of data migration, and improve the verification accuracy and the verification efficiency.

Description

Data migration and verification method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of data transmission technologies, and in particular, to a data migration and verification method and apparatus, a computer device, and a storage medium.
Background
The database migration is an operation of migrating a data file from one database to another database, and when a functional test is performed on a database migration class scene, the consistency of data in the database before and after migration needs to be compared.
However, the inventor finds that the current data consistency test usually adopts manual verification, which not only has low verification efficiency, but also has low verification accuracy, and brings great inconvenience to data migration and verification work.
Disclosure of Invention
The application provides a data migration and verification method and device, computer equipment and a storage medium, which are used for solving the problems that the verification efficiency is low and the verification accuracy is not high due to the fact that manual verification is adopted at present, and great inconvenience is brought to data migration and verification work.
In a first aspect, the present application provides a data migration and verification method, including:
receiving derived indication information sent by a terminal;
extracting a migration object and a migration directory in the export indication information, setting a data file corresponding to the migration object as an export file, and associating the export file with the migration directory;
receiving a migration instruction sent by a terminal, executing a migration process according to the migration instruction, migrating the export file to a migration directory associated with the export file, and setting the export file stored in the migration directory as an import file;
loading the file name of the export file into the import file to make the file name of the export file consistent with the file name of the import file, and inputting the file name into a preset case template to obtain a test case, wherein the file name is descriptive information for describing the content of the export file;
executing a verification process according to the test case to verify whether an export file and an import file corresponding to the test case are consistent or not; if the contents are consistent, generating a verification result that the migration is successful; and if the contents are not consistent, generating a verification result with the migration failure.
In the foregoing solution, the migration process includes:
loading at least one export file into a preset migration queue according to the migration instruction;
setting any export file in the migration queue as a target file, acquiring a migration directory associated with the target file, and extracting a library address and a table address in the migration directory;
accessing a database corresponding to the library address, loading the target file into a data table corresponding to the table address in the database for migrating the target file, and setting the target file loaded into the data table of the table address as an import file of the export file;
and when all the export files in the migration queue are migrated, ending the migration process.
In the foregoing solution, the verification process includes:
recording at least one test case into a preset check queue;
setting an export file and an import file corresponding to any test case in the check queue as a check pair, performing hash operation on the export file in the check pair to obtain an export hash value, and performing hash operation on the import file in the check pair to obtain an import hash value;
judging whether the export hash value is consistent with the import hash value or not, and checking the export file and the import file;
if the verification result is consistent with the file name in the test case, generating a verification result with successful migration, and associating the verification result with the file name in the test case;
if the verification result is inconsistent with the file name in the test case, generating a verification result with the content of failed migration, and associating the verification result with the file name in the test case;
and when all the exported files and the imported files in the check queue are checked, ending the check process.
In the foregoing solution, the performing hash operation on the exported file in the verification pair to obtain an exported hash value, and performing hash operation on the imported file in the verification pair to obtain an imported hash value includes:
calling an information abstract algorithm to carry out hash operation on the exported file to obtain an exported hash value;
and calling an information abstract algorithm to perform hash operation on the imported file to obtain an imported hash value.
In the foregoing solution, after associating the export file with the migration directory, the method further includes:
and setting the database directory where the export file is located as a source directory, loading the source directory and the migration directory into a preset directory template to form a directory popup, and sending the directory popup to the terminal.
In the foregoing solution, after the verification process is executed according to the test case, the method further includes:
and inputting the verification result and a file name associated with the verification result into a preset display template, converting the display template into a migration display popup, and sending the migration display popup to the terminal, wherein the file name is descriptive information of an export file and an import file corresponding to the verification result.
In a second aspect, the present application provides a data migration and verification apparatus, including:
the input module is used for receiving the export indication information sent by the terminal;
the migration preparation module is used for extracting a migration object and a migration directory in the export indication information, setting a data file corresponding to the migration object as an export file, and associating the export file with the migration directory;
the migration execution module is used for receiving a migration instruction sent by a terminal, executing a migration process according to the migration instruction, migrating the export file to a migration directory associated with the export file, and setting the export file stored in the migration directory as an import file;
the case generating module is used for loading the file name of the exported file into the imported file, enabling the file name of the exported file to be consistent with the file name of the imported file, and inputting the file name into a preset case template to obtain a test case, wherein the file name is descriptive information for describing the content of the exported file;
the data verification module is used for executing a verification process according to the test case and verifying whether an export file and an import file corresponding to the test case are consistent or not; if the contents are consistent, generating a verification result that the migration is successful; and if the contents are not consistent, generating a verification result with the migration failure.
In the above scheme, the method further comprises:
the migration confirmation module is used for setting a database directory where the export file is located as a source directory, loading the source directory and the migration directory into a preset directory template to form a directory popup, and sending the directory popup to the terminal;
and the output module is used for inputting the verification result and a file name associated with the verification result into a preset display template, converting the display template into a migration display popup window, and sending the migration display popup window to the terminal, wherein the file name is descriptive information of an export file and an import file corresponding to the verification result.
In a third aspect, the present application provides a computer device comprising: a processor and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory to implement the data migration and verification method of the claims.
In a fourth aspect, the present application provides a computer-readable storage medium, in which computer-executable instructions are stored, and the computer-executable instructions are executed by a processor to implement the data migration and verification method described above.
In a fifth aspect, the present application provides a computer program product comprising a computer program, which when executed by a processor, implements the data migration and verification method described above.
According to the data migration and verification method and device, the computer equipment and the storage medium, the export file is triggered to be migrated to the migration directory through the migration instruction, the export file in the migration directory is set as the computer process of the import file, the migration process is executed on one export file independently, batch migration of the migration process is executed on two or more export files, the data migration efficiency is improved, and great convenience is brought to data migration work.
The file name of the export file is loaded into the import file, so that the file name of the import file is consistent with the file name of the export file, the comprehensiveness of file migration is guaranteed, and the entry accuracy of the file name of the import file after migration is guaranteed.
Whether the exported file and the imported file corresponding to the test case are consistent or not is verified through a verification process, so that the consistency and reliability of data migration are ensured, the verification accuracy is improved, meanwhile, the technical effect of automatically verifying the migrated data is realized, the verification efficiency is improved, and great convenience is brought to data verification work.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application;
fig. 2 is a flowchart of an embodiment 1 of a data migration and verification method provided in an embodiment of the present application;
fig. 3 is a flowchart of embodiment 2 of a data migration and verification method provided in an embodiment of the present application;
FIG. 4 is a schematic diagram of program modules of a data migration and verification apparatus according to the present invention;
fig. 5 is a schematic diagram of a hardware structure of a computer device in the computer device according to the present invention.
With the above figures, there are shown specific embodiments of the present application, which will be described in more detail below. These drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the inventive concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
Referring to fig. 1, the specific application scenarios of the present application are: the server 2 operating the data migration and verification method is connected with the terminal 3, and is connected with an export database 4 storing export files corresponding to the migration objects and an import database 5 corresponding to the migration directories according to export indication information sent by the receiving terminal, the server 2 sets the data files corresponding to the migration objects as export files, and the export files are associated with the migration directories;
the server 2 receives a migration instruction sent by the terminal, executes a migration process according to the migration instruction, and is used for migrating the export file to a migration directory associated with the export file and setting the export file stored in the migration directory as an import file;
the server 2 loads the file name of the exported file into the imported file to ensure that the file name of the exported file is consistent with the file name of the imported file, and records the file name into a preset case template to obtain a test case;
the server 2 executes a verification process according to the test case to verify whether the export file and the import file corresponding to the test case are consistent or not; if the contents are consistent, generating a verification result that the migration is successful; and if the contents are not consistent, generating a verification result with the migration failure.
The data transmission method provided by the application aims to solve the technical problems in the prior art.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Example 1:
referring to fig. 2, the present application provides a data migration and verification method, including:
s101: and receiving the derived indication information sent by the terminal.
In this step, a migration object and a migration directory are recorded in the export instruction information, where the migration object represents a file name of a data file to be migrated, and the migration directory represents a target address of data file migration.
S102: extracting a migration object and a migration directory in the export indication information, setting a data file corresponding to the migration object as an export file, and associating the export file with the migration directory;
in this step, the export file and the migration directory are associated by associating the migration directory with the export file, where the environment variables (environment variables) refer to parameters used in the operating system to specify the operating system running environment, such as: a temporary folder location and a system folder location, etc.
S103: and receiving a migration instruction sent by a terminal, executing a migration process according to the migration instruction, migrating the export file to a migration directory associated with the export file, and setting the export file stored in the migration directory as an import file.
In this step, the migration instruction is a computer process for triggering migration of an export file to a migration directory and setting the export file in the migration directory as an import file, where the migration process may be executed on an export file according to the migration instruction, so as to migrate the export file to a migration directory associated with the export file and obtain the import file of the export file, thereby implementing independent migration of the export file;
the migration process can also be executed on two or more exported files according to the migration instruction, so that each exported file is sequentially migrated into the migration directory associated with the exported file, and the imported file of each exported file is obtained, thereby realizing batch migration of the exported files, improving the data migration efficiency, and bringing great convenience to the data migration work.
In a preferred embodiment, the migration process includes:
s11: loading at least one export file into a preset migration queue according to the migration instruction;
s12: setting any export file in the migration queue as a target file, acquiring a migration directory associated with the target file, and extracting a library address and a table address in the migration directory;
s13: accessing a database corresponding to the library address, loading the target file into a data table corresponding to the table address in the database for migrating the target file, and setting the target file loaded into the data table of the table address as an import file of the export file;
s14: and when all the export files in the migration queue are migrated, ending the migration process.
S104: loading the file name of the export file into the import file to make the file name of the export file consistent with the file name of the import file, and inputting the file name into a preset case template to obtain a test case, wherein the file name is descriptive information for describing the content of the export file.
In this step, the file name of the export file is loaded into the import file, so that the file name of the import file is consistent with the file name of the export file, thereby ensuring the comprehensiveness of file migration and the accuracy of entry of the file name of the import file after migration.
The content of the case template is a functional test case for checking the consistency of the database table, the case template records computer strategies for performing Hash operation on exported files and imported files with consistent file names respectively, wherein the functional test case is used for describing a test task for performing functional test on a product and embodies a test scheme, a method, a technology and strategies.
In this step, the file name is a database table name of the export file, and the database table name is a name describing the content of the data file.
The data file includes: system table, dictionary table, intermediate table, service table, wherein:
system table (S _): system, basic information tables related to System configuration.
Dictionary table (D _): dictionary, dictionary table outside of non-system Dictionary.
Middle table (R _): relationship, many-to-many Relationship intermediate table.
Service table (B _): business, basic information table related to core services.
In a preferred embodiment, the loading the export file name of the export file into the import file as the import file name of the import file includes:
s21: accessing an export configuration file of the export file, and extracting a file name in the export configuration file;
in this step, the export configuration file is a text file for defining a name and parameters of the export file, and the file name is recorded in the export configuration file.
S22: and accessing an import configuration file of the import file, and loading the file name into the import configuration file.
In this step, the import configuration file is a text file for defining the name and parameters of the import file, and the file name is loaded into the import configuration file, so that the import file obtains the file name.
S105: executing a verification process according to the test case to verify whether an export file and an import file corresponding to the test case are consistent or not; if the contents are consistent, generating a verification result that the migration is successful; and if the contents are not consistent, generating a verification result with the migration failure.
In the step, whether the export file and the import file corresponding to the test case are consistent or not is verified through the verification process, so that the consistency and the reliability of data migration are ensured, the verification accuracy is improved, the technical effect of automatically verifying the migrated data is realized, the verification efficiency is improved, and great convenience is brought to the data verification work.
In a preferred embodiment, the verification process includes:
s31: and recording at least one test case into a preset check queue.
In this step, since the number of the test cases may be multiple, a technical effect of sequentially verifying the export file and the import file corresponding to each test case is achieved by entering at least one test case into a preset verification queue, a technical effect of executing the test cases in batch is achieved, and data consistency verification efficiency is improved.
S32: setting an export file and an import file corresponding to any test case in the check queue as a check pair, performing hash operation on the export file in the check pair to obtain an export hash value, and performing hash operation on the import file in the check pair to obtain an import hash value.
In the step, the export hash value and the import hash value are obtained by respectively carrying out hash operation on the export file and the import file, once the export file is tampered in the migration process or the situations of data loss, copy errors and the like occur, the obtained import file changes the content, so that the import hash value is different from the export hash value of the export file, the terminal can rapidly identify whether the content of the data file changes in the migration process, the migration reliability is improved, and the situation that the export file is tampered in the data migration process is prevented.
It should be noted that the Hash algorithm is an encryption algorithm, which is also called a Hash function or a Hash function, and maps a message M with an arbitrary length into a shorter and fixed-length Value H (M) through the Hash function, where H (M) is called a Hash Value, a Hash Value (Hash Value), a Hash Value, or a message digest.
Further, performing a hash operation on the export file in the verification pair to obtain an export hash value, and performing a hash operation on the import file in the verification pair to obtain an import hash value, including:
s321: calling an information abstract algorithm to carry out hash operation on the exported file to obtain an exported hash value;
s322: and calling an information abstract algorithm to perform hash operation on the imported file to obtain an imported hash value.
It should be noted that the Message Digest Algorithm is an MD5 Message Digest Algorithm (english: MD5 Message-Digest Algorithm), and the MD5 Algorithm is used for generating a file hash code, is a very secure one-way hash function, can accept data of any length, converts the data into a value of a fixed length to serve as an import hash value and an export hash value, and can be applied to check file consistency.
Because the information digest algorithm has high calculation speed and encryption speed and does not need a secret key, the derived hash value and the imported hash value can be quickly obtained.
S33: judging whether the export hash value is consistent with the import hash value or not, and checking the export file and the import file;
if the verification result is consistent with the file name in the test case, generating a verification result with successful migration, and associating the verification result with the file name in the test case;
if not, generating a verification result with the content of migration failure, and associating the verification result with the file name in the test case;
s34: and when all the exported files and the imported files in the check queue are checked, ending the check process.
In fig. 2, the S105 is shown with the following labels:
s105-1: executing a verification process according to the test case to verify whether an export file and an import file corresponding to the test case are consistent or not;
s105-2: if the contents are consistent, generating a verification result that the migration is successful;
s105-3: and if the contents are not consistent, generating a verification result with the migration failure.
Example 2:
referring to fig. 3, the present application provides a data migration and verification method, including:
s201: and receiving the derived indication information sent by the terminal.
This step corresponds to S101 in example 1.
S202: and extracting the migration object and the migration directory in the export indication information, setting the data file corresponding to the migration object as an export file, and associating the export file with the migration directory.
This step corresponds to S102 in example 1.
S203: and setting the database directory where the export file is located as a source directory, loading the source directory and the migration directory into a preset directory template to form a directory popup, and sending the directory popup to the terminal.
In this step, the popup window recording the active directory and the migration directory is sent to the terminal, so that the terminal can confirm whether the selected or input export indication information is correct, and further ensure that the data migration action meets the expectation of a terminal user, and the user experience of data migration is improved.
In this embodiment, the directory popup is a dialog box, an action menu, a pop-up layer, a toast, or a snapbar.
The dialog box is a special window in the graphical user interface for displaying information to the user in the user interface or for obtaining input responses from the user when needed.
Action menu Action Sheet is a particular modal pop-up box triggered by user Action to present a set of two or more options relevant to the current context. The user may use an Action Sheet to initiate a task or confirm whether to begin performing an operation that may be destructive.
A pop-up layer (pop) is a temporary view that pops up when a user taps on a certain space or a certain area in a page.
Toast is a message containing a user click. The Toast class helps you create and display these. Toast in Android is a simple message prompt box. When the view is displayed to the user, it appears as floating in the application.
The SnackBar is a control for displaying prompt information after the operation of a user, and is automatically hidden like Toast. It may also add operation buttons and the like.
S204: and receiving a migration instruction sent by a terminal, executing a migration process according to the migration instruction, migrating the export file to a migration directory associated with the export file, and setting the export file stored in the migration directory as an import file.
This step corresponds to S103 in example 1.
S205: loading the file name of the export file into the import file to make the file name of the export file consistent with the file name of the import file, and inputting the file name into a preset case template to obtain a test case, wherein the file name is descriptive information for describing the content of the export file.
This step corresponds to S104 in example 1.
S206: executing a verification process according to the test case to verify whether an export file and an import file corresponding to the test case are consistent or not; if the contents are consistent, generating a verification result that the migration is successful; and if the contents are not consistent, generating a verification result with the migration failure.
This step corresponds to S105 in example 1.
In fig. 3, the S206 is shown with the following labels:
s206-1: executing a verification process according to the test case to verify whether an export file and an import file corresponding to the test case are consistent or not;
s206-2: if the contents are consistent, generating a verification result that the migration is successful;
s206-3: and if the contents are not consistent, generating a verification result of which the migration fails.
S207: and inputting the verification result and a file name associated with the verification result into a preset display template, converting the display template into a migration display popup, and sending the migration display popup to the terminal, wherein the file name is descriptive information of an export file and an import file corresponding to the verification result.
In this step, the display template is a blank page popup, and the verification result and the file name associated with the verification result are recorded in the page popup, so that the page popup is converted into a migration display popup and displayed in the terminal, and the terminal can rapidly and intuitively obtain export files corresponding to the file names according to the content of the verification result, and whether data is lost or tampered in the migration process, thereby improving the data migration management efficiency.
In this embodiment, the migration display popup is a dialog box, an action menu, a floating layer, a toast, or a snapbar.
The dialog box is a special window in the graphical user interface for displaying information to the user in the user interface or for obtaining input responses from the user when needed.
Action menu Action Sheet is a particular modal pop-up box triggered by a user Action, presenting a set of two or more options relevant to the current context. The user may use an Action Sheet to initiate a task or confirm whether to begin performing an operation that may be destructive.
A pop-up layer (pop) is a temporary view that pops up when a user taps on a certain space or a certain area in a page.
Toast is a message containing a user click. The Toast class helps you create and display these. Toast in Android is a simple message prompt box. When the view is displayed to the user, it appears as floating in the application.
The SnackBar is a control for displaying prompt information after the operation of a user, and is similar to Toast and can be automatically hidden. It may also add operation buttons and the like.
In the technical scheme of the application, the collection, storage, use, processing, transmission, provision, publication and other processing of the related information such as financial data or user data and the like all accord with the regulations of related laws and regulations, and do not violate the customs of public order.
Example 3:
referring to fig. 4, the present application provides a data migration and verification apparatus 1, including:
an input module 11, configured to receive derived indication information sent by a terminal;
a migration preparation module 12, configured to extract a migration object and a migration directory in the export indication information, set a data file corresponding to the migration object as an export file, and associate the export file with the migration directory;
a migration execution module 14, configured to receive a migration instruction sent by a terminal, execute a migration process according to the migration instruction, so as to migrate the export file to a migration directory associated with the export file, and set the export file stored in the migration directory as an import file;
a case generating module 15, configured to load the file name of the exported file into the imported file, so that the file name of the exported file is consistent with the file name of the imported file, and enter the file name into a preset case template to obtain a test case, where the file name is descriptive information describing the content of the exported file;
the data verification module 16 is configured to execute a verification process according to the test case, and is configured to verify whether an export file and an import file corresponding to the test case are consistent; if the contents are consistent, generating a verification result that the migration is successful; and if the contents are not consistent, generating a verification result with the migration failure.
Optionally, the data migration and verification apparatus 1 further includes:
the migration confirmation module 13 is configured to set a database directory where the exported file is located as a source directory, load the source directory and the migration directory into a preset directory template to form a directory popup, and send the directory popup to the terminal;
and the output module 17 is configured to enter the verification result and a file name associated with the verification result into a preset display template, convert the display template into a migration display popup, and send the migration display popup to the terminal, where the file name is descriptive information of an export file and an import file corresponding to the verification result.
Example 4:
to achieve the above object, the present application also provides a computer device 6, comprising: a processor and a memory communicatively coupled to the processor; the memory stores computer-executable instructions;
the processor executes the computer execution instruction stored in the memory to implement the data migration and verification method, wherein the components of the data migration and verification device can be distributed in different computer devices, and the computer device 6 can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server or a rack server (including an independent server or a server cluster formed by multiple application servers) or the like which executes programs. The computer device of the embodiment at least includes but is not limited to: a memory 61, a processor 62, which may be communicatively coupled to each other via a system bus, as shown in FIG. 5. It should be noted that fig. 5 only shows a computer device with components, but it should be understood that not all of the shown components are required to be implemented, and more or fewer components may be implemented instead. In the present embodiment, the memory 61 (i.e., a readable storage medium) includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the memory 61 may be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. In other embodiments, the memory 61 may also be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the computer device. Of course, the memory 61 may also include both internal and external storage devices of the computer device. In this embodiment, the memory 61 is generally used for storing an operating system and various application software installed in the computer device, for example, the program code of the data migration and verification apparatus in the third embodiment. Further, the memory 61 may also be used to temporarily store various types of data that have been output or are to be output. Processor 62 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 62 generally functions to control the overall operation of the computer device. In this embodiment, the processor 62 is configured to run the program code stored in the memory 61 or process data, for example, run a data migration and verification apparatus, so as to implement the data migration and verification method of the above embodiment.
The integrated module implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor to execute some steps of the methods described in the embodiments of the present application. It should be understood that the Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in the incorporated application may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor. The memory may comprise a high-speed RAM memory, and may further comprise a non-volatile storage NVM, such as at least one disk memory, and may also be a usb disk, a removable hard disk, a read-only memory, a magnetic or optical disk, etc.
To achieve the above objects, the present application also provides a computer readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App, etc., on which computer executable instructions are stored, and the program implements corresponding functions when executed by the processor 62. The computer-readable storage medium of this embodiment is used for storing computer-executable instructions for implementing the data migration and verification method, and when executed by the processor 62, implements the data migration and verification method of the above-described embodiment.
The storage medium may be implemented by any type or combination of volatile or non-volatile memory devices, 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 or optical disks. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an Application Specific Integrated Circuits (ASIC). Of course, the processor and the storage medium may reside as discrete components in an electronic device or host device.
The present application provides a computer program product comprising a computer program which, when executed by a processor, implements the data migration and verification method described above.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one of 8230, and" comprising 8230does not exclude the presence of additional like elements in a process, method, article, or apparatus comprising the element.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. A data migration and verification method is characterized by comprising the following steps:
receiving derived indication information sent by a terminal;
extracting a migration object and a migration directory in the export indication information, setting a data file corresponding to the migration object as an export file, and associating the export file with the migration directory;
receiving a migration instruction sent by a terminal, executing a migration process according to the migration instruction, migrating the export file to a migration directory associated with the export file, and setting the export file stored in the migration directory as an import file;
loading the file name of the exported file into the imported file to make the file name of the exported file consistent with the file name of the imported file, and inputting the file name into a preset case template to obtain a test case, wherein the file name is descriptive information for describing the content of the exported file;
executing a verification process according to the test case to verify whether an export file and an import file corresponding to the test case are consistent or not; if the contents are consistent, generating a verification result that the migration is successful; and if the contents are not consistent, generating a verification result with the migration failure.
2. The data migration and verification method according to claim 1, wherein the migration process comprises:
loading at least one export file into a preset migration queue according to the migration instruction;
setting any export file in the migration queue as a target file, acquiring a migration directory associated with the target file, and extracting a library address and a table address in the migration directory;
accessing a database corresponding to the library address, loading the target file into a data table corresponding to the table address in the database to migrate the target file, and setting the target file loaded into the data table of the table address as an import file of the export file;
and when all the export files in the migration queue are migrated, ending the migration process.
3. The data migration and verification method according to claim 1, wherein the verification process includes:
recording at least one test case into a preset check queue;
setting an export file and an import file thereof corresponding to any test case in the check queue as a check pair, performing hash operation on the export file in the check pair to obtain an export hash value, and performing hash operation on the import file in the check pair to obtain an import hash value;
judging whether the export hash value is consistent with the import hash value or not, and checking the export file and the import file;
if the verification result is consistent with the file name in the test case, generating a verification result with successful migration, and associating the verification result with the file name in the test case;
if not, generating a verification result with the content of migration failure, and associating the verification result with the file name in the test case;
and when all the exported files and the imported files in the check queue are checked, ending the check process.
4. The data migration and verification method according to claim 3, wherein the hashing an exported file in the verification pair to obtain an exported hash value, and performing a hashing operation on an imported file in the verification pair to obtain an imported hash value includes:
calling an information abstract algorithm to carry out hash operation on the exported file to obtain an exported hash value;
and calling an information abstract algorithm to perform hash operation on the imported file to obtain an imported hash value.
5. The data migration and verification method according to any of claims 1-4, wherein after associating the export file with the migration directory, the method further comprises:
and setting the database directory where the export file is located as a source directory, loading the source directory and the migration directory into a preset directory template to form a directory popup, and sending the directory popup to the terminal.
6. The data migration and verification method according to any of claims 1-4, wherein after the verification process is performed according to the test case, the method further comprises:
and inputting the verification result and a file name associated with the verification result into a preset display template, converting the display template into a migration display popup, and sending the migration display popup to the terminal, wherein the file name is descriptive information of an export file and an import file corresponding to the verification result.
7. A data migration and verification device, comprising:
the input module is used for receiving export indication information sent by a terminal;
the migration preparation module is used for extracting a migration object and a migration directory in the export indication information, setting a data file corresponding to the migration object as an export file, and associating the export file with the migration directory;
the migration execution module is used for receiving a migration instruction sent by a terminal, executing a migration process according to the migration instruction, migrating the export file to a migration directory associated with the export file, and setting the export file stored in the migration directory as an import file;
the case generating module is used for loading the file name of the exported file into the imported file, enabling the file name of the exported file to be consistent with the file name of the imported file, and inputting the file name into a preset case template to obtain a test case, wherein the file name is descriptive information for describing the content of the exported file;
the data verification module is used for executing a verification process according to the test case and verifying whether an export file and an import file corresponding to the test case are consistent or not; if the contents are consistent, generating a verification result that the migration is successful; and if the contents are not consistent, generating a verification result with the migration failure.
8. The data migration and verification apparatus according to claim 7, further comprising:
the migration confirmation module is used for setting a database directory where the exported file is located as a source directory, loading the source directory and the migration directory into a preset directory template to form a directory popup window, and sending the directory popup window to the terminal;
and the output module is used for inputting the verification result and a file name associated with the verification result into a preset display template, converting the display template into a migration display popup window, and sending the migration display popup window to the terminal, wherein the file name is descriptive information of an export file and an import file corresponding to the verification result.
9. A computer device, comprising: a processor and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes the computer-executable instructions stored in the memory to implement the data migration and verification method of any of claims 1 to 6.
10. A computer-readable storage medium having computer-executable instructions stored thereon, which when executed by a processor, implement the data migration and verification method of any one of claims 1 to 6.
CN202211170630.4A 2022-09-23 2022-09-23 Data migration and verification method and device, computer equipment and storage medium Pending CN115426290A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211170630.4A CN115426290A (en) 2022-09-23 2022-09-23 Data migration and verification method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211170630.4A CN115426290A (en) 2022-09-23 2022-09-23 Data migration and verification method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115426290A true CN115426290A (en) 2022-12-02

Family

ID=84204996

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211170630.4A Pending CN115426290A (en) 2022-09-23 2022-09-23 Data migration and verification method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115426290A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150370845A1 (en) * 2014-06-18 2015-12-24 International Business Machines Corporation Storage device data migration
CN106953893A (en) * 2017-02-15 2017-07-14 北京百度网讯科技有限公司 Data Migration between cloud storage system
CN110740055A (en) * 2018-07-20 2020-01-31 Ovh公司 System and method for device migration
CN111290998A (en) * 2020-02-12 2020-06-16 平安科技(深圳)有限公司 Method, device and equipment for calibrating migration data and storage medium
CN112559444A (en) * 2019-09-25 2021-03-26 北京国双科技有限公司 SQL (structured query language) file migration method and device, storage medium and equipment
CN112684982A (en) * 2020-12-25 2021-04-20 北京浪潮数据技术有限公司 Data migration method, system, equipment and computer readable storage medium
CN113297182A (en) * 2021-06-16 2021-08-24 中国农业银行股份有限公司 Data migration method, device, storage medium and program product

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150370845A1 (en) * 2014-06-18 2015-12-24 International Business Machines Corporation Storage device data migration
CN106953893A (en) * 2017-02-15 2017-07-14 北京百度网讯科技有限公司 Data Migration between cloud storage system
CN110740055A (en) * 2018-07-20 2020-01-31 Ovh公司 System and method for device migration
CN112559444A (en) * 2019-09-25 2021-03-26 北京国双科技有限公司 SQL (structured query language) file migration method and device, storage medium and equipment
CN111290998A (en) * 2020-02-12 2020-06-16 平安科技(深圳)有限公司 Method, device and equipment for calibrating migration data and storage medium
CN112684982A (en) * 2020-12-25 2021-04-20 北京浪潮数据技术有限公司 Data migration method, system, equipment and computer readable storage medium
CN113297182A (en) * 2021-06-16 2021-08-24 中国农业银行股份有限公司 Data migration method, device, storage medium and program product

Similar Documents

Publication Publication Date Title
US20120254118A1 (en) Recovery of tenant data across tenant moves
WO2020134989A1 (en) Excel data import method and apparatus, and computer device and storage medium
WO2020024419A1 (en) Testing method for service scenario, electronic device and readable storage medium
CN111274045A (en) Multi-platform docking method and device, computer equipment and readable storage medium
CN110162429B (en) System repair method, server and storage medium
CN111400246B (en) Asynchronous file import method, device, computer equipment and storage medium
CN111209736A (en) Text file analysis method and device, computer equipment and storage medium
CN108418797A (en) Web access method, device, computer equipment and storage medium
WO2020211233A1 (en) Method and device for batch data editing, computer device, and storage medium
CN111367890A (en) Data migration method and device, computer equipment and readable storage medium
WO2020006911A1 (en) Hybrid app interface calling method and device, and computer-readable storage medium
CN108664505B (en) Method and device for exporting database table structure
CN117033249A (en) Test case generation method and device, computer equipment and storage medium
US10936801B2 (en) Automated electronic form generation with context cues
CN115080114B (en) Application program transplanting processing method, device and medium
CN115426290A (en) Data migration and verification method and device, computer equipment and storage medium
CN111078529A (en) Client write-in module testing method and device and electronic equipment
CN112463042B (en) Data volume import data verification method, device, terminal and storage medium
CN114637672A (en) Automatic data testing method and device, computer equipment and storage medium
CN112925523A (en) Object comparison method, device, equipment and computer readable medium
CN112380142A (en) Interface document management method and device and test equipment
CN111241096A (en) Text extraction method, system, terminal and storage medium for EXCEL document
CN105550188A (en) Data file processing method and apparatus
CN110070114B (en) Multi-specification fusion processing method and device, computer equipment and storage medium
CN116166617B (en) Catalog generation method and device for combined open format document OFD

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination