CN113901033A - Data migration method, device, equipment and medium - Google Patents

Data migration method, device, equipment and medium Download PDF

Info

Publication number
CN113901033A
CN113901033A CN202111329399.4A CN202111329399A CN113901033A CN 113901033 A CN113901033 A CN 113901033A CN 202111329399 A CN202111329399 A CN 202111329399A CN 113901033 A CN113901033 A CN 113901033A
Authority
CN
China
Prior art keywords
metadata
data
data migration
migration
migrated
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
CN202111329399.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.)
CCB Finetech Co Ltd
Original Assignee
CCB Finetech Co Ltd
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 CCB Finetech Co Ltd filed Critical CCB Finetech Co Ltd
Priority to CN202111329399.4A priority Critical patent/CN113901033A/en
Publication of CN113901033A publication Critical patent/CN113901033A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/214Database migration support
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • G06Q10/087Inventory or stock management, e.g. order filling, procurement or balancing against orders
    • G06Q10/0875Itemisation or classification of parts, supplies or services, e.g. bill of materials

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Economics (AREA)
  • Physics & Mathematics (AREA)
  • Operations Research (AREA)
  • General Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Quality & Reliability (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a data migration method, a data migration device, data migration equipment and a data migration medium, and belongs to the technical field of data processing. The data migration method comprises the following steps: acquiring first metadata of a source data system and second metadata of a target data system; generating a data migration mapping corresponding to the first metadata and the second metadata according to the first metadata and the second metadata; and migrating the data to be migrated in the source data system to the target data system according to the data migration mapping. Through the scheme disclosed by the application, the data migration efficiency can be improved.

Description

Data migration method, device, equipment and medium
Technical Field
The present application belongs to the technical field of data processing, and in particular, relates to a data migration method, apparatus, device, and medium.
Background
With the continuous development of services, the upgrading of data systems is indispensable. Data migration has become an essential task in the process of upgrading data systems. Data migration is a process of migrating data from one system to another system in order to ensure service continuity when a data system is upgraded and updated.
In the related art, during data migration, developers are required to develop corresponding data migration programs for data migration from one system to another system, the development difficulty of the data migration programs is high, the data migration quality cannot be guaranteed, and the data migration efficiency is low.
Disclosure of Invention
An object of the embodiments of the present application is to provide a data migration method, apparatus, device, and medium, which can solve the problem of low data migration efficiency.
In a first aspect, an embodiment of the present application provides a data migration method, including:
acquiring first metadata of a source data system and second metadata of a target data system;
generating a data migration mapping corresponding to the first metadata and the second metadata according to the first metadata and the second metadata;
and migrating the data to be migrated in the source data system to the target data system according to the data migration mapping.
In a second aspect, an embodiment of the present application provides a data migration apparatus, including:
the acquisition module is used for acquiring first metadata of a source data system and second metadata of a target data system;
the generating module is used for generating data migration mapping corresponding to the first metadata and the second metadata according to the first metadata and the second metadata;
and the migration module is used for migrating the data to be migrated in the source data system to the target data system according to the data migration mapping.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor, where the program or instructions, when executed by the processor, implement the steps of the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium on which a program or instructions are stored, which when executed by a processor, implement the steps of the method according to the first aspect.
In the embodiment of the application, first metadata of a source data system and second metadata of a target data system are obtained; generating a data migration mapping corresponding to the first metadata and the second metadata according to the first metadata and the second metadata; and migrating the data to be migrated in the source data system to the target data system according to the data migration mapping. Developers do not need to develop corresponding data migration programs, data to be migrated in the source data system can be migrated into the target data system through data migration mapping generated according to metadata of the source data system and metadata of the target data system, and data migration efficiency can be improved.
Drawings
Fig. 1 is a schematic flowchart of a data migration method provided in an embodiment of the present application;
FIG. 2 is a schematic process diagram of data migration provided by an embodiment of the present application;
FIG. 3 is a schematic structural diagram of a data migration apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
fig. 5 is a hardware configuration diagram of an electronic device implementing an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of the present disclosure.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The data migration method, apparatus, device and medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
Fig. 1 is a schematic flowchart of a data migration method according to an embodiment of the present application. The data migration method can comprise the following steps:
s101: acquiring first metadata of a source data system and second metadata of a target data system;
s102: generating a data migration mapping corresponding to the first metadata and the second metadata according to the first metadata and the second metadata;
s103: and migrating the data to be migrated in the source data system to the target data system according to the data migration mapping.
Specific implementations of the above steps will be described in detail below.
In the embodiment of the application, first metadata of a source data system and second metadata of a target data system are obtained; generating a data migration mapping corresponding to the first metadata and the second metadata according to the first metadata and the second metadata; and migrating the data to be migrated in the source data system to the target data system according to the data migration mapping. Developers do not need to develop corresponding data migration programs, data to be migrated in the source data system can be migrated into the target data system through data migration mapping generated according to metadata of the source data system and metadata of the target data system, and data migration efficiency can be improved.
In the embodiment of the present application, metadata is information about organization, data domain, and relationship thereof of data, is data describing data, is descriptive information about data and information resources thereof, and is mainly information describing attributes of data, and is used to support functions such as indicating storage location, history data, resource lookup, file recording, and the like.
The method for acquiring the first metadata of the source data system and the second metadata of the target data system is not limited in the embodiments of the present application, and any available method may be applied in the embodiments of the present application, for example, the metadata is acquired automatically or acquired by a manual import method.
In some possible implementations of the embodiment of the present application, the metadata in S101 of the embodiment of the present application includes, but is not limited to, a database system list, a table list of each database system, a field list of each table, a business definition of each field, and the like.
Illustratively, obtaining the database system inventory of the source data system includes the first materials management database system.
The table list of the first material management database system comprises a material basic information table, a material entry table, a material exit table, a material inventory table and the like. The field list of the material basic information table comprises the following fields: material number, material name, material specification, material model, etc.; the list of fields for the material library table includes the fields: material number, warehousing time, warehousing quantity and the like; the field list of the material library table includes the fields: material number, ex-warehouse time, ex-warehouse quantity and the like; the list of fields in the materials inventory table includes the fields: material number, current inventory, etc.
The database system list obtained from the target data system comprises a second material management database system.
The table list of the second material management database system comprises a material basic information table, a material entry table, a material exit table, a material inventory table and the like. The field list of the material basic information table comprises the following fields: material number, material name, material specification, material model, etc.; the list of fields for the material library table includes the fields: material number, warehousing time, warehousing quantity and the like; the field list of the material library table includes the fields: material number, ex-warehouse time, ex-warehouse quantity and the like; the list of fields in the materials inventory table includes the fields: material number, current inventory, etc.
The business definition of the material basic information table is used for storing material basic information, the business definition of the material entering the material table is used for storing the material entering information, the business definition of the material leaving table is used for storing the material leaving information, and the business definition of the material inventory table is used for storing the material inventory information.
The service definition of a field 'material number' in the material basic information table is a number for defining a material; the business definition of a field 'material name' in the material basic information table is the name for defining the material; the business definition of the field 'material specification' in the material basic information table is specification information for defining the material; a service definition of a field "material model" in the material basic information table is model information for defining a material.
The business definition of a field 'material number' of the material in a library table is a number for defining the material; the business of a field 'warehousing time' of the material warehousing table is defined as the warehousing time for defining the material; the business of the field "warehousing quantity" of the material in the warehousing table is defined as the warehousing quantity used to define the material.
The business definition of a field 'material number' in the material database table is a number for defining a material; defining the business of a field 'ex-warehouse time' in the material ex-warehouse table as the ex-warehouse time for defining the material; the business of the field "warehousing quantity" in the material export table is defined as the export quantity used to define the material.
The business definition of the field 'material number' in the material inventory table is the number for defining the material; the business definition of the field "current stock" in the material stock table is the current stock for defining the material.
In some possible implementations of the embodiment of the present application, in S102, the generated data migration mapping corresponding to the first metadata and the second metadata may be as follows:
the first material management database system is mapped to a second material management database system.
The material basis information table in the first material management database system is mapped to the material basis information table of the second material management database system.
Mapping the material in-library table in the first material management database system to a material in-library table in the second material management database system.
Mapping the material export tables in the first material management database system to material export tables in the second material management database system.
The materials inventory table in the first materials management database system is mapped to the materials inventory table in the second materials management database system.
The field "material number" in the material basic information table in the first material management database system is mapped to the field "material number" in the material basic information table in the second material management database system.
The field "material name" in the material basic information table in the first material management database system is mapped to the field "material name" in the material basic information table in the second material management database system.
The field "material specification" in the material basic information table in the first material management database system is mapped to the field "material specification" in the material basic information table in the second material management database system.
A field "material model number" in a material basic information table in the first material management database system is used. Mapping to a field "material model number" in a material basis information table in the second material management database system.
The field "material number" in the material entry table in the first material management database system is mapped to the field "material number" in the material entry table in the second material management database system.
And mapping the field 'warehousing time' of the material in the first material management database system into the warehousing table to the field 'warehousing time' of the material in the second material management database system into the warehousing table.
And mapping the field 'warehousing quantity' of the material in the first material management database system into the field 'warehousing quantity' of the material in the second material management database system.
The field "material number" in a material export table in a first material management database system is mapped to the field "material number" in a material export table in a second material management database system.
The field "out time" in a material out table in the first material management database system is mapped to the field "out time" in a material out table in the second material management database system.
The field "number of ex-warehouses" in a material out-warehouse table in a first material management database system is mapped to the field "number of ex-warehouses" in a material out-warehouse table in a second material management database system.
The field "material number" in the material stock table in the first material management database system is mapped to the field "material number" in the material stock table in the second material management database system.
The field "current stock amount" in the material stock table in the first material management database system is mapped to the field "current stock amount" in the material stock table in the second material management database system.
In some possible implementations of the embodiment of the present application, after the data migration mapping corresponding to the first metadata and the second metadata is generated, the data to be migrated in the source data system is migrated to the target data system according to the data migration mapping.
Illustratively, the migration of data in material in-library tables in a first material management database system to material in-library tables in a second material management database system is taken as an example.
The data for the material in the library tables is shown in table 1.
TABLE 1
Material numbering Time of warehousing Number of warehouse entries
L003 9 month and 6 days 50
W005 10 months and 3 days 100
Z245 10 months and 13 days 24
X124 10 months and 15 days 78
According to the data migration mapping, after the data in the material entry table in the first material management database system shown in table 1 is migrated to the material entry table in the second material management database system, and the data in the material entry table in the first material management database system shown in table 1 is migrated to the material entry table in the second material management database system, the data in the material entry table in the second material management database system is shown in table 2.
TABLE 2
Material numbering Time of warehousing Number of warehouse entries
L003 9 month and 6 days 50
W005 10 months and 3 days 100
Z245 10 months and 13 days 24
X124 10 months and 15 days 78
In some possible implementations of the embodiment of the present application, in S102, the data migration map may be generated according to actual needs of the user.
In some possible implementations of the embodiments of the present application, the generation of the data migration map may be performed under the guidance of a business person and/or a technical person familiar with the source data system, a business person and/or a technical person familiar with the target data system.
In some possible implementations of embodiments of the present application, the above-mentioned persons may be the same person.
In some possible implementations of the embodiment of the present application, S103 in the embodiment of the present application may include: generating a data migration program for migrating the data to be migrated to the target data system according to the data migration mapping; and migrating the data to be migrated to the target data system according to the data migration program.
The embodiment of the present application is not limited to the manner in which the data migration program is generated, and any available manner may be applied to the embodiment of the present application.
In the embodiment of the application, different data migration programs can be generated based on different source data systems and different target data systems, and then the data to be migrated in the corresponding source data system is migrated to the corresponding target data system through the data migration program.
In the embodiment of the application, a data migration program for migrating data to be migrated in the source data system to the target data system can be automatically generated according to the data migration mapping generated by the metadata of the source data system and the metadata of the target data system. Developers are not required to develop corresponding data migration programs, and data migration efficiency can be improved.
In some possible implementations of the embodiment of the present application, before S102, the data migration method provided in the embodiment of the present application may further include: from the first metadata, a first metadata range to be mapped is determined, and from the second metadata, a second metadata range to be mapped is determined. Accordingly, S102 may include: and generating a data migration mapping according to the first metadata range to be mapped and the second metadata range to be mapped.
In some possible implementations of embodiments of the present application, determining the first to-be-mapped metadata range from the first metadata may be determined by a business person, a technician, or the like, familiar with the source data system; from the second metadata, determining the second metadata range to be mapped may be determined by a business person, a technician, or the like familiar with the target data system.
For example, taking the migration of data in the first material management database system as an example, the user wants to migrate data in the material basis information table in the first material management database system to the material basis information table in the second material management database system. The data in the material out-of-stock table, the material in-stock table, and the material inventory table in the first material management database system need not be migrated to the second material management database system.
Determining a first metadata range to be mapped from the first metadata as a material basic information table in the first material management database system; the second metadata range to be mapped determined from the second metadata is a material basis information table in the second material management database system.
And when generating the data migration mapping, mapping the material basis information table in the first material management database system to the material basis information table in the second material management database system. The material out-of-library table, the material warehousing table and the material inventory table in the first material management database system and the material out-of-library table, the material warehousing table and the material inventory table in the second material management database system are not mapped.
The field "material number" in the material basic information table in the first material management database system is mapped to the field "material number" in the material basic information table in the second material management database system.
The field "material name" in the material basic information table in the first material management database system is mapped to the field "material name" in the material basic information table in the second material management database system.
The field "material specification" in the material basic information table in the first material management database system is mapped to the field "material specification" in the material basic information table in the second material management database system.
A field "material model number" in a material basic information table in the first material management database system is used. Mapping to a field "material model number" in a material basis information table in the second material management database system.
For example, taking the migration of the data in the first material management database system as an example, the user wants to migrate the data in the material basic information table in the first material management database system to the material basic information table in the second material management database system, and the data corresponding to the field "material model" is not migrated.
The first metadata range to be mapped determined from the first metadata is the fields "material number", "material name", and "material specification" in the material basic information table in the first material management database system; the second metadata range to be mapped determined from the second metadata is the fields "material number", "material name", and "material specification" in the material basic information table in the above-described second material management database system.
When a data migration mapping is generated, mapping a field 'material number' in a material basic information table in a first material management database system to a field 'material number' in a material basic information table in a second material management database system; mapping a field 'material name' in a material basis information table in a first material management database system to a field 'material name' in a material basis information table in a second material management database system; the field "material specification" in the material basic information table in the first material management database system is mapped to the field "material specification" in the material basic information table in the second material management database system. The field "material model number" in the material basic information table in the first material management database system and the field "material model number" in the material basic information table in the second material management database system are not mapped.
In the embodiment of the application, the generated data migration mapping can meet the user requirement by determining the range of the metadata to be mapped, and then the data meeting the user requirement can be migrated.
In some possible implementations of the embodiment of the present application, before S103, the data migration method provided in the embodiment of the present application may further include: and extracting the data to be migrated from the source data system according to the first metadata range to be mapped.
Illustratively, the first to-be-mapped metadata range is taken as a material inventory table in the first material management database system.
The data to be migrated is data in a material inventory table in the first material management database system. Thereby migrating data in the material inventory table in the first material management database system to the material inventory table in the second material management database system.
Further illustratively, the first metadata range to be mapped is exemplified as fields "material number", "material name", and "material specification" in the material stock table in the first material management database system.
The data to be migrated is data other than the field "material model" in the material stock table in the first material management database system.
Thereby migrating data in the material inventory table in the first material management database system except for the field "material model" into the material inventory table in the second material management database system.
Illustratively, the data in the material inventory table in the first material management database system is shown in table 3.
TABLE 3
Material numbering Name of Material Specification of materials Type of material
Z001 Article A
Z002 B article 50 g/box MM01
Q001 C article 1 liter/bottle 432-X
S005 D article 10 m/roll Y-01
After migrating data in the material stock table in the first material management database system except for the field "material model" into the material stock table in the second material management database system, the data in the material stock table in the second material management database system is as shown in table 4.
TABLE 4
Material numbering Name of Material Specification of materials Type of material
Z001 Article A
Z002 B article 50 g/box
Q001 C article 1 liter/bottle
S005 D article 10 m/roll
It should be noted that, in all embodiments of the present application, the acquisition, storage, use and processing of data are in accordance with the relevant regulations of national laws and regulations.
Fig. 2 is a schematic process diagram of data migration provided in an embodiment of the present application.
Firstly, acquiring metadata of a source data system and metadata of a target data system in a manual import or automatic acquisition mode.
Then, the user determines a metadata range to be mapped from the metadata of the source data system and the metadata of the target data system.
And then, carrying out data migration mapping on the metadata range to be mapped corresponding to the metadata of the source data system and the metadata range to be mapped corresponding to the metadata of the target data system to obtain a data migration mapping rule.
Then, generating a data migration program for migrating the data to be migrated in the source data system to the target data system based on the data migration mapping rule;
and migrating the data to be migrated in the source data system to the target data system by using the data migration program.
When the data migration program is used for migrating the data to be migrated in the source data system to the target data system, the data to be migrated is extracted from the source data system by using the metadata range to be mapped corresponding to the metadata of the source data system.
In some possible implementations of the embodiments of the present application, the source data system and the target data system may be homogeneous data systems or heterogeneous data systems. That is to say, the data migration method provided in the embodiment of the present application may be applied to data migration between homogeneous data systems, and may also be applied to data migration between heterogeneous data systems.
In the embodiment of the application, the data migration quality can be improved, the data migration period can be shortened, the data migration cost can be reduced, and the data migration efficiency can be improved by solidifying all the data migration steps, guiding and coordinating effective work of all the data migration parties, fully managing the data migration range and rules, and automatically generating the data migration mapping and data migration program.
It should be noted that, in the data migration method provided in the embodiment of the present application, the execution main body may be a data migration apparatus, or a control module in the data migration apparatus for executing the data migration method. The data migration apparatus provided in the embodiment of the present application is described with an example of a data migration method executed by a data migration apparatus.
Fig. 3 is a schematic structural diagram of a data migration apparatus according to an embodiment of the present application. The data migration apparatus 300 may include:
an obtaining module 301, configured to obtain first metadata of a source data system and second metadata of a target data system;
a generating module 302, configured to generate a data migration map corresponding to the first metadata and the second metadata according to the first metadata and the second metadata;
the migration module 303 is configured to migrate the data to be migrated in the source data system to the target data system according to the data migration mapping.
In the embodiment of the application, first metadata of a source data system and second metadata of a target data system are obtained; generating a data migration mapping corresponding to the first metadata and the second metadata according to the first metadata and the second metadata; and migrating the data to be migrated in the source data system to the target data system according to the data migration mapping. Developers do not need to develop corresponding data migration programs, data to be migrated in the source data system can be migrated into the target data system through data migration mapping generated according to metadata of the source data system and metadata of the target data system, and data migration efficiency can be improved.
In some possible implementations of embodiments of the present application, the migration module 303 includes:
the generation submodule is used for generating a data migration program for migrating the data to be migrated to the target data system according to the data migration mapping;
and the migration submodule is used for migrating the data to be migrated to the target data system according to the data migration program.
In the embodiment of the application, a data migration program for migrating data to be migrated in the source data system to the target data system can be automatically generated according to the data migration mapping generated by the metadata of the source data system and the metadata of the target data system. Developers are not required to develop corresponding data migration programs, and data migration efficiency can be improved.
In some possible implementations of the embodiments of the present application, the data migration apparatus 300 further includes:
the determining module is used for determining a first metadata range to be mapped from the first metadata and determining a second metadata range to be mapped from the second metadata;
the generating module 302 is specifically configured to:
and generating a data migration mapping according to the first metadata range to be mapped and the second metadata range to be mapped.
In the embodiment of the application, the generated data migration mapping can meet the user requirement by determining the range of the metadata to be mapped, and then the data meeting the user requirement can be migrated.
In some possible implementations of the embodiments of the present application, the data migration apparatus 300 further includes:
and the extraction module is used for extracting the data to be migrated from the source data system according to the first metadata range to be mapped.
The data migration apparatus in the embodiment of the present application may be an apparatus, and may also be a component, an integrated circuit, or a chip in a terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The data migration device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system (Android), an iOS operating system, or other possible operating systems, which is not specifically limited in the embodiments of the present application.
The data migration apparatus provided in the embodiment of the present application can implement each process in the data migration method embodiments of fig. 1 and fig. 2, and is not described here again to avoid repetition.
Optionally, as shown in fig. 4, an electronic device 400 is further provided in this embodiment of the present application, and includes a processor 401, a memory 402, and a program or an instruction stored in the memory 402 and executable on the processor 401, where the program or the instruction is executed by the processor 401 to implement each process of the data migration method embodiment, and can achieve the same technical effect, and no further description is provided here to avoid repetition.
It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and the non-mobile electronic devices described above.
In some possible implementations of embodiments of the present Application, the processor 401 may include a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or may be configured to implement one or more Integrated circuits of embodiments of the present Application.
In some possible implementations of embodiments of the present application, the Memory 402 may include Read-Only Memory (ROM), Random Access Memory (RAM), magnetic disk storage media devices, optical storage media devices, flash Memory devices, electrical, optical, or other physical/tangible Memory storage devices. Thus, in general, the memory 402 comprises one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software comprising computer-executable instructions and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the data migration methods according to embodiments of the application.
Fig. 5 is a hardware configuration diagram of an electronic device implementing an embodiment of the present application.
The electronic device 500 includes, but is not limited to: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 506, a user input unit 507, an interface unit 508, a memory 509, a processor 510, and the like.
Those skilled in the art will appreciate that the electronic device 500 may further include a power supply (e.g., a battery) for supplying power to various components, and the power supply may be logically connected to the processor 510 via a power management system, so as to implement functions of managing charging, discharging, and power consumption via the power management system. The electronic device structure shown in fig. 5 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.
Wherein processor 510 is configured to: acquiring first metadata of a source data system and second metadata of a target data system; generating a data migration mapping corresponding to the first metadata and the second metadata according to the first metadata and the second metadata; and migrating the data to be migrated in the source data system to the target data system according to the data migration mapping.
In the embodiment of the application, first metadata of a source data system and second metadata of a target data system are obtained; generating a data migration mapping corresponding to the first metadata and the second metadata according to the first metadata and the second metadata; and migrating the data to be migrated in the source data system to the target data system according to the data migration mapping. Developers do not need to develop corresponding data migration programs, data to be migrated in the source data system can be migrated into the target data system through data migration mapping generated according to metadata of the source data system and metadata of the target data system, and data migration efficiency can be improved.
In some possible implementations of embodiments of the present application, processor 510 is specifically configured to:
generating a data migration program for migrating the data to be migrated to the target data system according to the data migration mapping;
and migrating the data to be migrated to the target data system according to the data migration program.
In the embodiment of the application, a data migration program for migrating data to be migrated in the source data system to the target data system can be automatically generated according to the data migration mapping generated by the metadata of the source data system and the metadata of the target data system. Developers are not required to develop corresponding data migration programs, and data migration efficiency can be improved.
In some possible implementations of embodiments of the present application, processor 510 is further configured to:
determining a first metadata range to be mapped from the first metadata, and determining a second metadata range to be mapped from the second metadata;
processor 510 is specifically configured to:
and generating a data migration mapping according to the first metadata range to be mapped and the second metadata range to be mapped.
In the embodiment of the application, the generated data migration mapping can meet the user requirement by determining the range of the metadata to be mapped, and then the data meeting the user requirement can be migrated.
In some possible implementations of embodiments of the present application, processor 510 is further configured to:
and the extraction module is used for extracting the data to be migrated from the source data system according to the first metadata range to be mapped.
It should be understood that in the embodiment of the present application, the input Unit 504 may include a Graphics Processing Unit (GPU) 5041 and a microphone 5042, and the Graphics processor 5041 processes image data of still pictures or videos obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The display unit 506 may include a display panel 5061, and the display panel 5061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 507 includes a touch panel 5071 and other input devices 5072. A touch panel 5071, also referred to as a touch screen. The touch panel 5071 may include two parts of a touch detection device and a touch controller. Other input devices 5072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in further detail herein. The memory 509 may be used to store software programs as well as various data including, but not limited to, application programs and operating systems. Processor 510 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 510.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the data migration method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, and examples of the computer readable storage medium include non-transitory computer readable storage media such as ROM, RAM, magnetic or optical disks, and the like.
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 an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a computer software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A method of data migration, the method comprising:
acquiring first metadata of a source data system and second metadata of a target data system;
generating data migration mapping corresponding to the first metadata and the second metadata according to the first metadata and the second metadata;
and migrating the data to be migrated in the source data system to the target data system according to the data migration mapping.
2. The method of claim 1, wherein migrating the data to be migrated in the source data system to the target data system according to the data migration map comprises:
generating a data migration program for migrating the data to be migrated to the target data system according to the data migration mapping;
and migrating the data to be migrated to the target data system according to the data migration program.
3. The method according to claim 1, wherein before generating the data migration map corresponding to the first metadata and the second metadata according to the first metadata and the second metadata, the method further comprises:
determining a first metadata range to be mapped from the first metadata, and determining a second metadata range to be mapped from the second metadata;
generating a data migration mapping corresponding to the first metadata and the second metadata according to the first metadata and the second metadata, including:
and generating the data migration mapping according to the first metadata range to be mapped and the second metadata range to be mapped.
4. The method of claim 3, wherein before migrating the data to be migrated in the source data system to the target data system according to the data migration map, the method further comprises:
and extracting the data to be migrated from the source data system according to the first metadata range to be mapped.
5. An apparatus for data migration, the apparatus comprising:
the acquisition module is used for acquiring first metadata of a source data system and second metadata of a target data system;
a generating module, configured to generate a data migration map corresponding to the first metadata and the second metadata according to the first metadata and the second metadata;
and the migration module is used for migrating the data to be migrated in the source data system to the target data system according to the data migration mapping.
6. The apparatus of claim 5, wherein the migration module comprises:
the generation submodule is used for generating a data migration program for migrating the data to be migrated to the target data system according to the data migration mapping;
and the migration submodule is used for migrating the data to be migrated to the target data system according to the data migration program.
7. The apparatus of claim 5, further comprising:
the determining module is used for determining a first metadata range to be mapped from the first metadata and determining a second metadata range to be mapped from the second metadata;
the generation module is specifically configured to:
and generating the data migration mapping according to the first metadata range to be mapped and the second metadata range to be mapped.
8. The apparatus of claim 7, further comprising:
and the extraction module is used for extracting the data to be migrated from the source data system according to the first metadata range to be mapped.
9. An electronic device, characterized in that the electronic device comprises: a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions when executed by the processor implementing the steps of the data migration method of any of claims 1 to 4.
10. A readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the data migration method according to any one of claims 1 to 4.
CN202111329399.4A 2021-11-10 2021-11-10 Data migration method, device, equipment and medium Pending CN113901033A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111329399.4A CN113901033A (en) 2021-11-10 2021-11-10 Data migration method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111329399.4A CN113901033A (en) 2021-11-10 2021-11-10 Data migration method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN113901033A true CN113901033A (en) 2022-01-07

Family

ID=79193829

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111329399.4A Pending CN113901033A (en) 2021-11-10 2021-11-10 Data migration method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN113901033A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11677852B2 (en) * 2021-10-11 2023-06-13 Sap Se Cross-application data migration

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11677852B2 (en) * 2021-10-11 2023-06-13 Sap Se Cross-application data migration

Similar Documents

Publication Publication Date Title
CN109101294B (en) Data acquisition method, plug-in, electronic equipment and storage medium
CN110070593B (en) Method, device, equipment and medium for displaying picture preview information
CN110020231A (en) Webpage capture method and device thereof
CN110781658B (en) Resume analysis method, resume analysis device, electronic equipment and storage medium
CN112199007A (en) Menu display method and device, electronic equipment and storage medium
CN111596911A (en) Method and device for generating control, computer equipment and storage medium
CN112486444A (en) Screen projection method, device, equipment and readable storage medium
CN113901033A (en) Data migration method, device, equipment and medium
CN113342755A (en) Display control method and device
CN113282213A (en) Interface display method and device
US11341197B2 (en) Recommendation system based on adjustable virtual indicium
CN112764611A (en) Application program control method and device and electronic equipment
CN112035877A (en) Information hiding method and device, electronic equipment and readable storage medium
CN113364915B (en) Information display method and device and electronic equipment
CN114416264A (en) Message display method and device
CN112765946B (en) Chart display method and device and electronic equipment
CN111813303B (en) Text processing method and device, electronic equipment and readable storage medium
CN113868269A (en) Screenshot method and device, electronic equipment and readable storage medium
CN110908573B (en) Algorithm model training method, device, equipment and storage medium
CN114253449A (en) Screen capturing method, device, equipment and medium
CN114491218A (en) Information updating method, information updating device, electronic device, and medium
CN113986425A (en) Information processing method and device, electronic equipment and readable storage medium
CN111858395A (en) Data management method and device
CN113138760A (en) Page generation method and device, electronic equipment and medium
CN109358899B (en) Method and device for updating resource versions in shared shelf

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