Search

CN-121996640-A - Data migration method and computing device

CN121996640ACN 121996640 ACN121996640 ACN 121996640ACN-121996640-A

Abstract

The embodiment of the application provides a data migration method and computing equipment. According to the table information of a first table (any one of a plurality of tables included in a first database), carrying out semantic retrieval on a plurality of second tables (belonging to the plurality of tables included in a second database), determining a target second table, wherein the table information comprises a table splicing vector, the table splicing vector indicates service functions and positioning information of the first table, a table mapping relation is constructed based on the first table and the target second table, according to the field information of a first field (any one of a plurality of fields included in the first table), carrying out semantic retrieval on a plurality of second fields included in the target second table, determining the target second field, wherein the field information comprises a field splicing vector, the field splicing vector indicates service functions and positioning information of the first field, and based on the first field and the target second field, constructing a field mapping relation, and migrating data between the first database and the second database according to the table mapping relation and the field mapping relation. And the data migration efficiency is improved.

Inventors

  • FU WENFENG

Assignees

  • 河南秦尉数字技术有限公司

Dates

Publication Date
20260508
Application Date
20251223

Claims (10)

  1. 1. A method of data migration, comprising: Performing semantic search processing on a plurality of second tables according to table information corresponding to a first table, and determining a target second table matched with the first table, wherein the first table is any one of the plurality of tables included in a first database, the second table belongs to the plurality of tables included in the second database, the table information comprises table splicing vectors, and the table splicing vectors are used for indicating service functions and positioning information of the first table; constructing a table mapping relation based on the first table and the target second table; According to the field information of a first field, carrying out semantic retrieval processing on a plurality of second fields included in the target second table to determine a target second field matched with the first field, wherein the first field is any one of the plurality of fields included in the first table, and the field information comprises a field splicing vector used for indicating the service function and positioning information of the first field; constructing a field mapping relation based on the first field and the target second field; And according to the table mapping relation and the field mapping relation, data migration is carried out between the first database and the second database.
  2. 2. The method of claim 1, wherein the performing semantic search processing on the plurality of second fields included in the target second table according to the field information of the first field, and determining the target second field that matches the first field, includes: Acquiring field information of a first field and field information of a plurality of second fields, wherein the field information of the first field comprises a field identifier of the first field and a field splicing vector of the first field; and determining the target second field in the second fields according to the field identification of the first field, the field identifications of the second fields, the field splicing vector of the first field and the field splicing vector of the second fields.
  3. 3. The method of claim 2, wherein the determining the target second field of the plurality of second fields based on the field identification of the first field, the field identification of the plurality of second fields, the field splice vector of the first field, and the field splice vector of the plurality of second fields comprises: Determining whether an initial second field exists in the plurality of second fields, wherein the field identification of the initial second field is consistent with the field identification of the first field; Under the condition that the initial second fields are not existed in the plurality of second fields, vector similarity corresponding to the plurality of second fields is calculated according to the field splicing vector of the first field and the field splicing vector of the plurality of second fields; and determining the target second field in the second fields according to the vector similarity corresponding to the second fields.
  4. 4. The method of claim 3, wherein the determining the target second field of the plurality of second fields according to the vector similarity corresponding to the plurality of second fields comprises: Determining a second field of the plurality of second fields for which at least one corresponding vector similarity is greater than a first similarity threshold; and determining the target second field from at least one corresponding second field with vector similarity greater than the first similarity threshold according to the first preset number.
  5. 5. A method according to claim 3, characterized in that the method further comprises: and determining the initial second field as the target second field when the initial second field exists in the plurality of second fields.
  6. 6. The method of any of claims 2-5, wherein prior to obtaining field information for the first field and field information for the plurality of second fields, the method further comprises: The method comprises the steps of obtaining a field identifier of a field to be processed and field description information of the field to be processed, wherein the field to be processed comprises a first field or a second field, the field description information is used for indicating the service function of the field to be processed, and the field identifier of the field to be processed is used for indicating the positioning information of the field to be processed; performing splicing processing on the field identification of the field to be processed and the field description information of the field to be processed to obtain a splicing result of the field to be processed; And carrying out vectorization processing on the splicing result of the field to be processed to obtain a field splicing vector of the field to be processed.
  7. 7. The method according to any one of claims 1-6, wherein the performing semantic search processing on the plurality of second tables according to the table information corresponding to the first table, and determining the target second table matched with the first table includes: Acquiring table information of a first table and table information of a plurality of second tables, wherein the table information of the first table comprises table splicing vectors of the first table; Calculating the vector similarity corresponding to a plurality of second tables according to the table splicing vectors of the first tables and the table splicing vectors of the second tables respectively, wherein the vector similarity corresponding to the second tables indicates the similarity between the table splicing vectors of the first tables and the table splicing vectors of the second tables; and determining the target second table in the plurality of second tables according to the vector similarity corresponding to the plurality of second tables and a second similarity threshold.
  8. 8. The method of claim 7, wherein prior to obtaining the table information for the first table and the table information for each second table, the method further comprises: the method comprises the steps of obtaining a table identifier of a table to be processed and table description information of the table to be processed, wherein the table to be processed comprises a first table or a second table, and the table description information is used for indicating service functions of the table to be processed; The method comprises the steps of obtaining an identifier of a first table set, wherein the first table set is a table set to which a table to be processed belongs, and the table identifier of the table to be processed and the identifier of the first table set are used for indicating positioning information of the table to be processed; Performing splicing processing on the table identifier of the table to be processed, the identifier of the first table set and the table description information of the table to be processed to obtain a splicing result of the table to be processed; And carrying out vectorization processing on the splicing result of the table to be processed to obtain a table splicing vector of the table to be processed.
  9. 9. The method according to claim 6 or 8, characterized in that the method further comprises: acquiring initial table structure information corresponding to a database to be processed; Under the condition that languages corresponding to the table description information and the field description information in the initial table structure information are not target languages, translating the table description information and the field description information in the initial table structure information to obtain the table structure information corresponding to the target languages; Wherein, when the database to be processed comprises the first database, the table structure information corresponding to the target language is first table structure information, wherein the first table structure information comprises a field identification of a first field, a field description information of the first field, a table identification of a first table, a table description information of the first table and an identification of a table set to which the first table belongs, or And when the to-be-processed database comprises the second database, the table structure information corresponding to the target language is second table structure information, wherein the second table structure information comprises a field identification of a second field, field description information of the second field, a table identification of a second table, table description information of the second table and an identification of a table set to which the second table belongs.
  10. 10. A computing device, comprising: A processor, and a memory communicatively coupled to the processor; The memory is used for storing computer execution instructions; the processor is configured to execute computer-executable instructions stored in the memory to implement the method of any one of claims 1-9.

Description

Data migration method and computing device Technical Field The embodiment of the application relates to the technical field of computing equipment, in particular to a data migration method and computing equipment. Background With the continued development of enterprise informatization, enterprises may face the need to perform data migration from a first database corresponding to a first software system to a second database corresponding to a second software system. There is a significant difference in the database structure and data semantics of the two databases. This discrepancy makes it difficult to accurately migrate data in a first database to a second database during the data migration process, thereby affecting the integrity and accuracy of the data. In the related art, the tables and fields of two databases need to be manually combined, mapped one by one, and data migrated based on the mapping result. Thus, the method in the related art has the problem of low data migration efficiency. Disclosure of Invention The embodiment of the application provides a data migration method and computing equipment, which improves the data migration efficiency. In a first aspect, an embodiment of the present application provides a data migration method, including: According to table information corresponding to the first table, carrying out semantic retrieval processing on a plurality of second tables to determine a target second table matched with the first table, wherein the first table is any one of the plurality of tables included in the first database, the second table belongs to the plurality of tables included in the second database, the table information comprises table splicing vectors, and the table splicing vectors are used for indicating service functions and positioning information of the first table; Constructing a table mapping relation based on the first table and the target second table; According to the field information of the first field, carrying out semantic retrieval processing on a plurality of second fields included in the target second table to determine a target second field matched with the first field, wherein the first field is any one of the plurality of fields included in the first table; Constructing a field mapping relation based on the first field and the target second field; and according to the table mapping relation and the field mapping relation, data migration is carried out between the first database and the second database. In this solution, the table splicing vector included in the table information corresponding to the first table may be used to indicate the service function and the positioning information of the first table, so that the table information corresponding to the first table may indicate the service function (may also be understood as a service meaning, or may be understood as the use of the first table in a service scenario) and the positioning information (may be used to identify a certain table in the first database, so that the position of the first table in the database architecture of the first database may be positioned). Therefore, based on the business function and the positioning information of the first table, semantic retrieval is carried out on a plurality of second tables, accurate retrieval based on the business function and the positioning information can be realized, the accuracy of determining the target second table is improved, and the accuracy of constructing the table mapping relation is further improved. The field splicing vector included in the field information corresponding to the first field may be used to indicate a service function (may also be understood as a service meaning, or may be understood as a use of the first field in a service scenario) and positioning information (which is used to identify a certain field in the first table, so that a position of the first field in the first table may be located), that is, the field information corresponding to the first field may indicate the service function and the positioning information of the first field. Therefore, based on the field information of the first field, semantic retrieval is carried out on a plurality of second fields, accurate retrieval based on service functions and positioning information can be realized, the accuracy of determining the target second fields is improved, and the accuracy of constructing the field mapping relation is further improved. Under the condition that the table mapping relation and the field mapping relation are constructed, according to the table mapping relation (the mapping relation between a first table in a first database and a target second table in a second database is indicated) and the field mapping relation (the mapping relation between a first field in the first table and a target second field in the target second table is indicated), data migration can be performed between the first database and the second database, and data migra