Database object link and embedded object conversion migration and verification method
By using Kettle software and parsing scripts to migrate data to OLE objects in AccessDB, the problem of OLE object data conversion in database migration is solved, efficient and accurate data migration and verification is achieved, and data integrity and consistency are ensured.
Patent Information
- Application Number
- CN202411840971.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-05-13
AI Technical Summary
During the database migration process, the difficulties in data conversion of OLE objects, including data format compatibility, resolution difficulty and performance issues, lead to low data migration efficiency and difficult to guarantee data integrity.
Using Kettle software and pre-written parsing and conversion scripts, OLE object data is extracted from AccessDB, and by identifying and removing OLE header information, the data is formatted, loaded into the target database, and the hash value calculation checks and manual spot check verification ensures the integrity and consistency of the data.
It realizes efficient data migration from AccessDB to the target database system, ensures data integrity and consistency, reduces manual intervention, and improves migration efficiency and convenience of data management.
Smart Images

Figure CN119988347A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of OLE object migration, and more specifically, to a conversion migration and verification method for database object links and embedded objects. Background Art
[0002] With the continuous upgrading of information system architecture and the surge in data volume, data migration has become an inevitable part of the enterprise informatization process. As a small database system widely used in the early days, Microsoft Access database (AccessDB) has embedded OLE objects (such as pictures, documents, etc.) with great value in specific application scenarios. However, when enterprises need to migrate data to more powerful and flexible database systems such as DB2, how to effectively handle these unstructured data becomes a challenge. OLE objects are often used in AccessDB to store complex data types such as pictures and documents. These objects are stored in the database in binary form, and face the following challenges when directly migrating: 1. Data format compatibility: Different database systems have different levels of support for binary data, and direct migration may cause data corruption or unreadable; 2. Data parsing difficulty: OLE objects contain complex data structures and formats, which require special tools or methods to parse; 3. Performance issues: The migration of a large number of OLE objects may consume a lot of system resources, affecting migration efficiency and performance. Summary of the invention
[0003] In view of the deficiencies of the prior art, the present invention provides a method for converting, migrating and verifying database object links and embedded objects.
[0004] According to one aspect of the present invention, a method for converting, migrating and verifying database object links and embedded objects is provided, comprising:
[0005] After the preset database is configured and connected, the target object data including object links and embedded objects are extracted from the preset database using Kettle software, wherein the target object data is binary data;
[0006] Using a pre-written parsing and conversion script to convert the target object data into a format suitable for the target data block storage format;
[0007] Use the table output of Kettle software to load the conversion target object data into the pre-configured target field of the target database to obtain the migration object data;
[0008] Use Kettle software to perform hash value calculation verification on the conversion target object data before migration and the migration object data after migration to obtain verification results, and perform manual spot check verification on the unstructured data of the conversion target object data before migration and the migration object data after migration to obtain verification results;
[0009] Based on the verification results and validation results, the migration results of the object linking and embedding objects are determined.
[0010] Optionally, the target object data including object links and embedded objects are extracted from a preset database using Kettle software, including:
[0011] Use Kettle software's table input to read the target table in the preset database including object links and embedded objects to obtain the target object data.
[0012] Optionally, the OLE object includes OLE header information and image or file data.
[0013] Optionally, a pre-written parsing and conversion script is used to convert the target object data into a format suitable for the target data block storage format, including:
[0014] Use a pre-written recognition script to recognize and remove the OLE header information of the target object data, and obtain the valid data of the target object without the OLE header information;
[0015] The parsing and conversion script is used to convert the format of the valid data of the target object to obtain the converted target object data suitable for the storage format of the target data block.
[0016] Optionally, use Kettle software to perform hash value calculation verification on the conversion target object data before migration and the migration object data after migration to obtain verification results, including:
[0017] Use Kettle software to calculate the checksum value of the conversion target object data before migration and the migration object data after migration, obtain the checksum value calculation result and save it to the preset checksum verification table, where the checksum verification table includes the migrated table name, primary key field, primary key value, hash value before and after migration, and migration time;
[0018] Use Kettle software to count the number of records of the conversion target object data before migration and the migration object data after migration to obtain the record number verification result;
[0019] Determine the verification result based on the checksum value calculation result and the record number verification result.
[0020] According to another aspect of the present invention, there is provided a database object link and embedded object conversion migration and verification device, comprising:
[0021] An extraction module is used to extract target object data including object links and embedded objects from a preset database using Kettle software after the preset database is configured and connected, wherein the target object data is binary data;
[0022] A conversion module, used to convert the format of the target object data using a pre-written parsing and conversion script to obtain converted target object data suitable for the storage format of the target data block;
[0023] The loading module is used to load the conversion target object data into the pre-configured target field of the target database by using the table output of the Kettle software to obtain the migration object data;
[0024] The verification module is used to use Kettle software to perform hash value calculation verification on the conversion target object data before migration and the migration object data after migration to obtain the verification result, and to manually perform spot check verification on the unstructured data of the conversion target object data before migration and the migration object data after migration to obtain the verification result;
[0025] The determination module is used to determine the migration result of the object link and embedded object according to the verification result and the validation result.
[0026] Optionally, the extraction module uses Kettle software to extract target object data including object links and embedded objects from a preset database, including:
[0027] The reading submodule is used to use the table input of Kettle software to read the target table including object links and embedded objects in the preset database to obtain the target object data.
[0028] Optionally, the OLE object includes OLE header information and image or file data.
[0029] Optionally, the conversion module comprises:
[0030] The removal submodule is used to identify and remove the OLE header information of the target object data using a pre-written recognition script, and obtain the valid data of the target object without the OLE header information;
[0031] The conversion submodule is used to convert the format of the valid data of the target object by using the parsing and conversion script to obtain the converted target object data suitable for the storage format of the target data block.
[0032] Optionally, the verification module uses Kettle software to perform hash value calculation verification on the conversion target object data before migration and the migration object data after migration to obtain the verification result, including:
[0033] The calculation submodule is used to use Kettle software to calculate the checksum value of the conversion target object data before migration and the migration object data after migration, obtain the checksum value calculation result and save it to a preset checksum verification table, where the checksum verification table includes the migrated table name, primary key field, primary key value, hash value before and after migration, and migration time;
[0034] The technical submodule is used to use Kettle software to count the number of records of the conversion target object data before migration and the migration object data after migration, and obtain the record number verification result;
[0035] The determination submodule is used to determine the verification result according to the checksum value calculation result and the record number verification result.
[0036] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and the computer program is used to execute the method described in any one of the above aspects of the present invention.
[0037] According to another aspect of the present invention, an electronic device is provided, comprising: a processor; a memory for storing instructions executable by the processor; the processor is configured to read the executable instructions from the memory and execute the instructions to implement the method described in any one of the above aspects of the present invention.
[0038] The method for converting, migrating and verifying OLE objects of AccessDB based on Kettle provided by the present invention has the following advantages:
[0039] Efficient data migration: By integrating the Kettle tool, efficient data migration from AccessDB to the target database system is achieved, especially for complex data tables containing OLE objects, which effectively improves the automation and efficiency of the migration process.
[0040] Guaranteeing data integrity and consistency: During the migration process, a checksum verification mechanism was used to strictly verify the data in the source and target databases, ensuring the integrity and consistency of the data before and after the migration. At the same time, the reliability of data verification was further enhanced by exporting unstructured data to local files for manual spot checks and verification.
[0041] Flexible data processing capability: Java code is used to parse and process OLE objects, supporting the conversion of OLE objects in various formats, and meeting the storage requirements of different target database systems for unstructured data. This flexible data processing capability makes the present invention widely applicable.
[0042] Reduced manual intervention: Through automated data migration and verification processes, the present invention significantly reduces the need for manual intervention, reduces the risk of human error, and improves overall work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] A more complete understanding of exemplary embodiments of the present invention may be obtained by referring to the following drawings:
[0044] Figure 1 It is a flow chart of a method for converting, migrating and verifying database object links and embedded objects provided by an exemplary embodiment of the present invention;
[0045] Figure 2 is a schematic diagram of a data migration architecture provided by an exemplary embodiment of the present invention;
[0046] Figure 3 It is a schematic diagram of a system data source configuration for adding an Access database provided by an exemplary embodiment of the present invention;
[0047] Figure 4 It is a schematic diagram of establishing a connection configuration with ODBC provided by an exemplary embodiment of the present invention;
[0048] Figure 5 is a schematic diagram of a configured Kettle conversion provided by an exemplary embodiment of the present invention;
[0049] Figure 6 It is a partial code schematic diagram of parsing and processing OLE objects provided by an exemplary embodiment of the present invention;
[0050] Figure 7 is a schematic diagram of calculating a checksum value before migration provided by an exemplary embodiment of the present invention;
[0051] Figure 8 is a schematic diagram of calculating a checksum value after migration provided by an exemplary embodiment of the present invention;
[0052] Fig. 9 It is a schematic diagram of spot checking of OLE objects provided by an exemplary embodiment of the present invention;
[0053] Fig.10 It is a schematic diagram of the structure of a conversion, migration and verification device for database object links and embedded objects provided by an exemplary embodiment of the present invention;
[0054] Fig.11 This is a structure of an electronic device provided by an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0055] Below, the exemplary embodiments according to the present invention will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments of the present invention, and it should be understood that the present invention is not limited to the exemplary embodiments described here.
[0056] It should be noted that the relative arrangement of components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
[0057] Those skilled in the art can understand that the terms "first" and "second" in the embodiments of the present invention are only used to distinguish different steps, devices or modules, etc., and neither represent any specific technical meaning nor indicate the necessary logical order between them.
[0058] It should also be understood that, in the embodiments of the present invention, “plurality” may refer to two or more than two, and “at least one” may refer to one, two or more than two.
[0059] It should also be understood that any component, data or structure mentioned in the embodiments of the present invention can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.
[0060] In addition, the term "and / or" in the present invention is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present invention generally indicates that the associated objects before and after are in an "or" relationship.
[0061] It should also be understood that the description of the various embodiments of the present invention focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.
[0062] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0063] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
[0064] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.
[0065] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0066] Embodiments of the present invention can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate with many other general or special computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, servers, etc. include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, etc.
[0067] Electronic devices such as terminal devices, computer systems, servers, etc. can be described in the general context of computer system executable instructions (such as program modules) executed by computer systems. Generally, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in a distributed cloud computing environment, where tasks are performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media including storage devices.
[0068] Exemplary Methods
[0069] Figure 1 FIG. 1 is a flow chart of a method for converting, migrating and verifying a database object link and an embedded object provided by an exemplary embodiment of the present invention. This embodiment can be applied to electronic devices, such as Figure 1 As shown, the conversion migration and verification method 100 of database object link and embedded object includes the following steps:
[0070] Step 101, after the preset database is configured and connected, the target object data including object links and embedded objects are extracted from the preset database using Kettle software, wherein the target object data is binary data;
[0071] Step 102, using a pre-written parsing and conversion script to convert the target object data into a format suitable for the target data block storage format;
[0072] Step 103, using the table output of Kettle software to load the conversion target object data into the target field pre-configured in the target database, and obtain the migration object data;
[0073] Step 104: Use Kettle software to perform hash value calculation verification on the conversion target object data before migration and the migration object data after migration to obtain verification results, and perform manual spot check verification on the unstructured data of the conversion target object data before migration and the migration object data after migration to obtain verification results;
[0074] Step 105: Determine the migration result of the object link and the embedded object according to the verification result and the validation result.
[0075] Specifically, this paper proposes a method for converting, migrating and verifying OLE (Object Linking and Embedding) objects in AccessDB based on Kettle. This method aims to solve the problem of OLE object data conversion during database migration and improve the efficiency and accuracy of data migration.
[0076] The purpose of the present invention is to realize efficient, stable and reliable conversion and migration of OLE (object linking and embedding) objects in Access database (AccessDB), and to verify the conversion and migration of OLE (object linking and embedding) objects to ensure the consistency and integrity of data. The specific purposes can be summarized as follows:
[0077] Efficient data migration:
[0078] Kettle is a powerful ETL (extraction, transformation, loading) tool that can efficiently handle the migration of large amounts of data. Using Kettle to migrate OLE objects in AccessDB can significantly improve the efficiency of data migration and reduce manual intervention and errors.
[0079] Flexible conversion capabilities:
[0080] Kettle provides a rich set of conversion components and scripting functions to support complex conversion operations on OLE objects. This means that during the migration process, OLE objects can be formatted, cleaned or converted as needed to meet the requirements of the target database or application system.
[0081] Comprehensive data verification:
[0082] After the data migration is completed, it is crucial to verify the consistency and integrity of the data. The present invention ensures that the migrated OLE objects are consistent with the original data by integrating a data verification mechanism, avoiding data problems caused by errors or inconsistencies during the migration process.
[0083] Improve the convenience of data management:
[0084] The OLE objects in AccessDB are migrated to more advanced or easier to manage database systems, such as DB2, Oracle and MySQL, etc., which can improve the convenience and security of data management. Through the implementation of the present invention, users can manage these data objects more easily and improve data utilization efficiency and value.
[0085] Support for complex data environments:
[0086] Kettle supports the connection of multiple databases and data sources, so the present invention is not only applicable to the migration from AccessDB to other databases, but also can be extended to other complex data environments, which makes the present invention have a wider application prospect and flexibility.
[0087] Reduce migration costs and risks:
[0088] Through the automated data migration and verification process, the present invention can reduce the cost and risk of manual migration. At the same time, due to the stability and reliability of Kettle, the error and failure rate in the migration process will also be greatly reduced.
[0089] The storage mechanism of OLE objects in AccessDB not only includes the binary data of the object itself (such as pictures, documents, etc.), but also attaches the necessary OLE header information, which is crucial for the system to identify and manage these objects. Therefore, during the database migration process, simply migrating OLE objects as a whole without distinguishing them may cause data corruption or compatibility issues due to ignoring the complexity of their internal structure.
[0090] To address this challenge, this article proposes a key step: in the migration process, the binary data of OLE objects should be carefully parsed and processed through JAVA code. The core of this process is to accurately identify and strip the OLE header information in order to extract pure image or file data. This step requires developers to have not only deep binary data processing capabilities, but also a deep understanding of the internal structure and storage specifications of OLE objects to ensure that the functions and integrity of these objects can be restored without loss after migration.
[0091] This solution is based on the ETL tool Kettle to achieve data migration of OLE objects in AccessDB, migrate the data containing OLE objects in AccessDB to the DB2 database, and verify the migrated data. Figure 2 It is the data migration architecture.
[0092] 1) Data extraction: Use Kettle to extract data containing OLE objects from AccessDB.
[0093] 2) OLE object parsing and processing, using Java code to parse and convert OLE objects.
[0094] 3) Data loading: writing the converted data into the target database.
[0095] 4) Data verification: Use Kettle's add a checksum component to calculate hash values for the data before and after migration, and save the results to the verification table. At the same time, export the unstructured data before and after migration to local files for manual spot check verification.
[0096] 5) Result verification: manually verify the results of the checklist and the exported local files.
[0097] The following are the detailed functions and configurations for using Kettle to extract, convert, and load complex data types, especially OLE (Object Linking and Embedding) objects, from an AccessDB database into an IBM DB2 database.
[0098] 1) Migration environment
[0099] a. Operating system: Windows 10
[0100] b.Kettle version: Kettle8.3
[0101] c. AccessDB version: Microsoft Access 2016
[0102] d.Java environment: JDK 1.8
[0103] e. Prepare an AccessDB test data table, including an OLE object field, and insert some test data. At the same time, create a corresponding empty table in the DB2 database to store the migrated data, and migrate the OLE object to the BLOB field of the DB2 database.
[0104] f. Database connection driver: sun.jdbc.odbc.jdbcodbcdriver (connect to accessdb) and db2jcc.jar (connect to DB2 database)
[0105] 2) Kettle configuration
[0106] a. Database connection configuration
[0107] Use JDBC-ODBC to connect to Access database (AccessDB) to better support OLE objects. The configuration steps are as follows:
[0108] Create an ODBC data source
[0109] Configure the system DSN in the ODBC Data Source Administrator of the Windows system and add the system data source of the Access database. Figure 3 shown.
[0110] Configure database connection in Kettle
[0111] Use sun.jdbc.odbc.JdbcOdbcDriver in Kettle to establish a connection with ODBC. The configuration is as follows Figure 4 shown.
[0112] b. Data extraction
[0113] In Kettle, data extraction is the first step in data migration. Since OLE objects are essentially binary data stored in the database, you need to use Kettle's "Table Input" step to read the table containing OLE objects. During the reading process, OLE objects can be treated as binary large object (BLOB) fields.
[0114] c. Data conversion
[0115] In the "Conversion" step of Kettle, use the "Java Code" component to handle OLE objects.
[0116] Write a Java script to convert the binary data of the OLE object into a format suitable for storage in the target database. OLE objects are usually stored in a specific format, which includes OLE header information and actual image or file data. In order to extract the image or file data, the OLE header needs to be identified and removed through JAVA code.
[0117] The specific configured Kettle conversion is as follows Figure 5 As shown in the figure, the JAVA code component implements the parsing and processing of OLE objects. Figure 6 Part of the code for parsing and processing OLE objects.
[0118] The exact structure and length of the OLE header may vary depending on the content stored and may need to be adjusted on a case-by-case basis. Figure 6 Code.
[0119] d. Data loading
[0120] The processed OLE object can be stored in a BLOB field of the target database. Make sure the table structure of the target database has a BLOB field of an appropriate size to store this data.
[0121] Use Kettle's "Table Output" step to load data into the target database. When configuring, you need to specify the JDBC connection information of the target database and map the source and target fields.
[0122] 3) Migration verification
[0123] In order to ensure the accuracy and consistency of data migration, the migration verification in this article is carried out in three ways.
[0124] a. Checksum value verification:
[0125] Use Kettle's "Add a checksum" component to calculate the checksum value (such as MD5 or SHA-256) of the data before and after migration, and save the checksum value calculation result to the checksum verification table. By comparing the checksum values before and after migration, ensure that the data has not changed during the migration process.
[0126] Checksum table design:
[0127]
[0128] This table mainly includes the migrated table name, primary key field, primary key value, hash value before and after migration, and migration time.
[0129] Kettle is used to configure the checksum value calculation, and the calculation results are written to the checksum verification table:
[0130] like Figure 7 As shown in the figure, the checksum value is calculated before migration and the result is directly output to the checksum verification table.
[0131] like Figure 8 As shown, the post-migration checksum value is calculated and data loading is completed using the "Update" component. The post-migration checksum value is updated according to the migration table name and primary key value.
[0132] b. Record number verification:
[0133] Use SQL scripts to count the number of records before and after migration. By comparing the number of records before and after migration, the integrity and accuracy of the data migration process can be verified.
[0134] When counting the number of records before and after the migration, try to ensure that there are no other business write operations in the database to avoid inconsistent record counts due to data changes.
[0135] c. OLE object spot check:
[0136] like Fig. 9 As shown, the Kettle tool is used to randomly select some OLE objects before and after migration, and the javascript script is used to output the content of the OLE objects to the local disk. The integrity and accuracy of the OLE objects are verified by manually checking and comparing the content of the OLE objects on the local disk.
[0137] 1. Conversion of AccessDB OLE objects
[0138] One of the key points of the present invention is to achieve effective conversion of OLE (Object Linking and Embedding) objects in Microsoft Access database (AccessDB). OLE objects in AccessDB are usually stored in the database as binary large objects (BLOBs), which may include various unstructured data types such as pictures, documents, and tables. In the database migration process, directly migrating these BLOB data without any processing often cannot meet the storage and query requirements of the target database system.
[0139] Therefore, the present invention parses and processes the OLE objects extracted from AccessDB by writing special Java codes and integrating them into the ETL process of Kettle. This process includes reading the data in the BLOB field, identifying the type of the OLE object, and performing corresponding format conversion or content extraction according to the requirements of the target database system so as to store and query in the target database.
[0140] This conversion process of OLE objects not only ensures the integrity of the data, but also improves the availability and manageability of the data in the target database system.
[0141] 2. Data verification before and after migration
[0142] Another key point of the present invention is the data verification mechanism after migration, especially the use of checksum value calculation and comparison based on Kettle "Adda checksum" component to ensure the consistency and integrity of data during the migration process.
[0143] After the data migration is completed, the present invention uses Kettle's "Add a checksum" component to calculate the checksum value of the data before and after the migration, and compares the calculation results. Checksum is a unique value obtained by encrypting data through a hash algorithm. Any slight change in the data will cause a change in the checksum value. Therefore, by comparing the checksum values of the data before and after the migration, it is possible to quickly and effectively find out whether the data has changed during the migration process.
[0144] In addition, the present invention also saves the verification results into the checksum verification table for subsequent query and audit. At the same time, in order to further enhance the reliability of data verification, the present invention also exports the unstructured data before and after migration to a local file for manual spot check verification. This combination of automation and manual verification ensures the accuracy and reliability of the migrated data.
[0145] In summary, the conversion of AccessDB OLE objects and the post-migration Checksum verification are two key points of the present invention. The realization of these two key points not only solves the problem of unstructured data processing during database migration, but also ensures the integrity and consistency of the migrated data through a strict verification mechanism.
[0146] The method for converting, migrating and verifying OLE objects of AccessDB based on Kettle provided by the present invention has the following advantages:
[0147] Efficient data migration: By integrating the Kettle tool, efficient data migration from AccessDB to the target database system is achieved, especially for complex data tables containing OLE objects, which effectively improves the automation and efficiency of the migration process.
[0148] Guaranteeing data integrity and consistency: During the migration process, a checksum verification mechanism was used to strictly verify the data in the source and target databases, ensuring the integrity and consistency of the data before and after the migration. At the same time, the reliability of data verification was further enhanced by exporting unstructured data to local files for manual spot checks and verification.
[0149] Flexible data processing capability: Java code is used to parse and process OLE objects, supporting the conversion of OLE objects in various formats, and meeting the storage requirements of different target database systems for unstructured data. This flexible data processing capability makes the present invention widely applicable.
[0150] Reduced manual intervention: Through automated data migration and verification processes, the present invention significantly reduces the need for manual intervention, reduces the risk of human error, and improves overall work efficiency.
[0151] In summary, the effects and advantages achieved by the present invention are not only reflected in improving data migration efficiency and ensuring data integrity and consistency, but also in reducing migration risks, enhancing system scalability and maintainability, promoting data resource sharing, and saving costs. It brings significant value and benefits to users in many aspects.
[0152] Exemplary Devices
[0153] Fig.10 FIG. 1 is a schematic diagram of a conversion, migration and verification device for database object links and embedded objects provided by an exemplary embodiment of the present invention. Fig.10 As shown, the device 1000 includes:
[0154] The extraction module 1010 is used to extract the target object data including the object link and the embedded object from the preset database by using Kettle software after the preset database is configured and connected, wherein the target object data is binary data;
[0155] The conversion module 1020 is used to convert the format of the target object data using a pre-written parsing and conversion script to obtain converted target object data suitable for the storage format of the target data block;
[0156] The loading module 1030 is used to load the conversion target object data into the target field pre-configured in the target database by using the table output of the Kettle software to obtain the migration object data;
[0157] The verification module 1040 is used to use Kettle software to perform hash value calculation verification on the conversion target object data before migration and the migration object data after migration to obtain the verification result, and to perform manual spot check verification on the unstructured data of the conversion target object data before migration and the migration object data after migration to obtain the verification result;
[0158] The determination module 1050 is used to determine the migration result of the object link and the embedded object according to the verification result and the validation result.
[0159] Optionally, the extraction module 1010 uses Kettle software to extract target object data including object links and embedded objects from a preset database, including:
[0160] The reading submodule is used to use the table input of Kettle software to read the target table including object links and embedded objects in the preset database to obtain the target object data.
[0161] Optionally, the OLE object includes OLE header information and image or file data.
[0162] Optionally, the conversion module 1020 includes:
[0163] The removal submodule is used to identify and remove the OLE header information of the target object data using a pre-written recognition script, and obtain the valid data of the target object without the OLE header information;
[0164] The conversion submodule is used to convert the format of the valid data of the target object by using the parsing and conversion script to obtain the converted target object data suitable for the storage format of the target data block.
[0165] Optionally, the verification module 1040 uses Kettle software to perform hash value calculation verification on the conversion target object data before migration and the migration object data after migration to obtain the verification result, including:
[0166] The calculation submodule is used to use Kettle software to calculate the checksum value of the conversion target object data before migration and the migration object data after migration, obtain the checksum value calculation result and save it to a preset checksum verification table, where the checksum verification table includes the migrated table name, primary key field, primary key value, hash value before and after migration, and migration time;
[0167] The technical submodule is used to use Kettle software to count the number of records of the conversion target object data before migration and the migration object data after migration, and obtain the record number verification result;
[0168] The determination submodule is used to determine the verification result according to the checksum value calculation result and the record number verification result.
[0169] Exemplary Electronic Devices
[0170] Fig.11 This is a structure of an electronic device provided by an exemplary embodiment of the present invention. Fig.11 As shown, the electronic device 110 includes one or more processors 111 and a memory 112 .
[0171] The processor 111 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
[0172] The memory 112 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 111 may run the program instructions to implement the methods of the software programs of the various embodiments of the present invention described above and / or other desired functions. In one example, the electronic device may also include: an input device 113 and an output device 114, which are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0173] In addition, the input device 113 may also include, for example, a keyboard, a mouse, and the like.
[0174] The output device 114 can output various information to the outside, and can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto.
[0175] Of course, to simplify, Fig.11 Only some of the components related to the present invention in the electronic device are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, the electronic device may further include any other appropriate components according to specific application conditions.
[0176] Exemplary computer program products and computer-readable storage media
[0177] In addition to the above-mentioned methods and devices, an embodiment of the present invention may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the method according to various embodiments of the present invention described in the above-mentioned "Exemplary Method" section of this specification.
[0178] The computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the embodiments of the present invention, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0179] In addition, an embodiment of the present invention may also be a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, enable the processor to execute the steps of the method according to various embodiments of the present invention described in the above “Exemplary Method” section of this specification.
[0180] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, system or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0181] The basic principle of the present invention is described above in conjunction with specific embodiments. However, it should be pointed out that the advantages, strengths, effects, etc. mentioned in the present invention are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. must be possessed by each embodiment of the present invention. In addition, the specific details disclosed above are only for the purpose of illustration and facilitation of understanding, rather than limitation, and the above details do not limit the present invention to being implemented by adopting the above specific details.
[0182] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0183] The block diagrams of the devices, systems, equipment, and systems involved in the present invention are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, systems, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The word "such as" used here refers to the phrase "such as but not limited to", and can be used interchangeably with it.
[0184] The method and system of the present invention may be implemented in many ways. For example, the method and system of the present invention may be implemented by software, hardware, firmware or any combination of software, hardware, firmware. The above order of steps for the method is only for illustration, and the steps of the method of the present invention are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present invention may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present invention. Thus, the present invention also covers a recording medium storing a program for executing the method according to the present invention.
[0185] It should also be noted that in the system, device and method of the present invention, each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. The above description of the disclosed aspects is provided to enable any technician in the field to make or use the present invention. Various modifications to these aspects are very obvious to those skilled in the art, and the general principles defined here can be applied to other aspects without departing from the scope of the present invention. Therefore, the present invention is not intended to be limited to the aspects shown here, but in accordance with the widest range consistent with the principles and novel features disclosed here.
[0186] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present invention to the forms disclosed herein. Although a number of example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A method for converting, migrating and verifying database object links and embedded objects, characterized in that: include: After the preset database is configured and connected, the target object data including object links and embedded objects are extracted from the preset database using Kettle software, wherein the target object data is binary data; Using a pre-written parsing and conversion script to convert the target object data into a format suitable for a target data block storage format; Using the table output of the Kettle software, the conversion target object data is loaded into the target field pre-configured in the target database to obtain the migration object data; Use the Kettle software to perform hash value calculation verification on the conversion target object data before migration and the migration object data after migration to obtain verification results, and perform manual spot check verification on the unstructured data of the conversion target object data before migration and the migration object data after migration to obtain verification results; The migration result of the object link and the embedded object is determined according to the checking result and the verification result.
2. The method according to claim 1, characterized in that Utilize Kettle software to extract target object data including object links and embedded objects from the preset database, including: The table input of Kettle software is used to read the target table including the object link and embedded object in the preset database to obtain the target object data.
3. The method according to claim 1, characterized in that The object linking and embedding object includes OLE header information and picture or file data.
4. The method according to claim 3, characterized in that The target object data is format converted using a pre-written parsing and conversion script to obtain converted target object data suitable for the target data block storage format, including: Using a pre-written recognition script to recognize and remove the OLE header information of the target object data, and obtaining valid data of the target object without the OLE header information; The parsing and conversion script is used to convert the format of the target object valid data to obtain the converted target object data suitable for the target data block storage format.
5. The method according to claim 1, characterized in that Using the Kettle software to perform hash value calculation verification on the conversion target object data before migration and the migration object data after migration, and obtaining the verification result, including: The Kettle software is used to calculate the checksum value of the conversion target object data before migration and the migration object data after migration, and the checksum value calculation result is obtained and saved to a preset checksum verification table, wherein the checksum verification table includes the name of the migrated table, the primary key field, the primary key value, the hash value before and after the migration, and the migration time; Using Kettle software to count the number of records of the conversion target object data before migration and the migration object data after migration, and obtain the record number verification result; The verification result is determined according to the checksum value calculation result and the record number verification result.
6. A conversion, migration and verification device for database object links and embedded objects, characterized in that: include: An extraction module, used to extract target object data including object links and embedded objects from the preset database using Kettle software after the preset database is configured and connected, wherein the target object data is binary data; A conversion module, used to convert the format of the target object data using a pre-written parsing and conversion script to obtain converted target object data suitable for the target data block storage format; A loading module, used to load the conversion target object data into a target field pre-configured in a target database by using the table output of the Kettle software, and obtain the migration object data; A verification module is used to use the Kettle software to perform hash value calculation verification on the conversion target object data before migration and the migration object data after migration to obtain a verification result, and to perform manual spot check verification on the unstructured data of the conversion target object data before migration and the migration object data after migration to obtain a verification result; A determination module is used to determine the migration result of the object link and the embedded object according to the verification result and the validation result.
7. The device according to claim 6, characterized in that The extraction module uses Kettle software to extract target object data including object links and embedded objects from the preset database, including: The reading submodule is used to read the target table including the object link and embedded object in the preset database by using the table input of Kettle software to obtain the target object data.
8. The device according to claim 6, characterized in that The object linking and embedding object includes OLE header information and picture or file data.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the method according to any one of claims 1 to 5.
10. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the method described in any one of claims 1 to 5.
Citation Information
Patent Citations
Database migration verification method
CN114153820A