Data migration method and computing device

By constructing a mapping relationship between tables and fields and using concatenated vectors for semantic retrieval, the problem of low data migration efficiency caused by differences in database structure and semantics is solved, achieving efficient and accurate data migration.

CN121996640APending Publication Date: 2026-05-08HENAN QINWEI DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HENAN QINWEI DIGITAL TECHNOLOGY CO LTD
Filing Date
2025-12-23
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

When an enterprise migrates data from the first database corresponding to the first software system to the second database corresponding to the second software system, the existing technology suffers from low data migration efficiency due to differences in database structure and data semantics, and it is difficult to accurately migrate data to the target database.

Method used

By constructing table mapping relationships and field mapping relationships, and using table concatenation vectors and field concatenation vectors for semantic retrieval, the target table and fields are determined, thereby achieving data migration.

Benefits of technology

It improves the accuracy and efficiency of data migration, ensuring the integrity and accuracy of data during the migration process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121996640A_ABST
    Figure CN121996640A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data migration method and computing equipment. Performing semantic retrieval on a plurality of second tables (belonging to a plurality of tables included in a second database) according to table information of the first table (any one of the plurality of tables included in the first database), and determining a target second table; the table information comprises a table splicing vector; the table splicing vector indicates a service function and positioning information of the first table; constructing a table mapping relation based on the first table and the target second table; performing semantic retrieval on a plurality of second fields included in a target second table according to field information of the first field (any one of the plurality of fields included in the first table), and determining a target second field; the field information comprises a field splicing vector, and the field splicing vector indicates a service function and positioning information of the first field; constructing a field mapping relation based on the first field and a target second field; 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.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computing device technology, and in particular to a data migration method and computing device. Background Technology

[0002] As enterprise IT infrastructure develops, companies may face the need to migrate data from a first database corresponding to a first software system to a second database corresponding to a second software system. The two databases have significant differences in database structure and data semantics. These differences make it difficult to accurately migrate data from the first database to the second database during the migration process, thus affecting data integrity and accuracy.

[0003] In related technologies, it is necessary to manually sort out the tables and fields of the two databases, map them one by one, and then perform data migration based on the mapping results. This results in low data migration efficiency in these methods. Summary of the Invention

[0004] This application provides a data migration method and computing device, which improves data migration efficiency.

[0005] In a first aspect, embodiments of this application provide a data migration method, including:

[0006] Based on the table information corresponding to the first table, semantic retrieval processing is performed on multiple second tables to determine the target second table that matches the first table; the first table is any one of the multiple tables included in the first database; the second table belongs to the multiple tables included in the second database; the table information includes a table concatenation vector; the table concatenation vector is used to indicate the business function and location information of the first table;

[0007] Based on the first table and the target second table, construct a table mapping relationship;

[0008] Based on the field information of the first field, semantic retrieval processing is performed on multiple second fields included in the target second table to determine the target second field that matches the first field; the first field is any field among the multiple fields included in the first table; the field information includes a field concatenation vector, which is used to indicate the business function and location information of the first field;

[0009] Based on the first field and the target second field, construct a field mapping relationship;

[0010] Based on table mapping relationships and field mapping relationships, data migration is performed between the first database and the second database.

[0011] In this scheme, the table concatenation vector included in the table information corresponding to the first table can be used to indicate the business function and location information of the first table. Therefore, the table information corresponding to the first table can indicate the business function (or business meaning, or the purpose of the first table in a business scenario) and location information (used to identify a certain table in the first database, thus locating the position of the first table in the database architecture of the first database). Therefore, based on the business function and location information of the first table, semantic retrieval of multiple second tables can achieve accurate retrieval based on business function and location information, improving the accuracy of identifying the target second table, and thus improving the accuracy of constructing table mapping relationships. Similarly, the field concatenation vector included in the field information corresponding to the first field can be used to indicate the business function (or business meaning, or the purpose of the first field in a business scenario) and location information (used to identify a certain field in the first table, thus locating the position of the first field in the first table). In other words, the field information corresponding to the first field can indicate the business function and location information of the first field. Therefore, by performing semantic retrieval on multiple second fields based on the information in the first field, accurate retrieval based on business functions and location information can be achieved, improving the accuracy of determining the target second field and thus improving the accuracy of constructing field mapping relationships. With table mapping relationships and field mapping relationships constructed, data migration between the first and second databases can be performed based on the table mapping relationship (indicating the mapping relationship between the first table in the first database and the target second table in the second database) and the field mapping relationship (indicating the mapping relationship between the first field in the first table and the target second field in the target second table), improving data migration efficiency.

[0012] In one implementation, the initial table structure information corresponding to the first database is different from that corresponding to the second database.

[0013] In this scheme, the initial table structure information corresponding to the first database (indicating the database structure and data semantics of the first database) is different from the initial table structure information corresponding to the second database (indicating the database structure and data semantics of the second database). Therefore, it is necessary to construct table mapping relationships (indicating the mapping relationship between the first table in the first database and the target second table in the second database) and field mapping relationships (indicating the mapping relationship between the first field in the first table and the target second field in the target second table) between the first database and the second database based on the table mapping relationships and field mapping relationships, so as to perform data migration between the first database and the second database.

[0014] In one implementation, based on the field information of the first field, semantic retrieval processing is performed on multiple second fields included in the target second table to determine the target second field that matches the first field, including:

[0015] Obtain the field information of the first field and the field information of multiple second fields; the field information of the first field includes the field identifier of the first field and the field concatenation vector of the first field; the field information of the second field includes the field identifier of the second field and the field concatenation vector of the second field.

[0016] Based on the field identifier of the first field, the field identifiers of multiple second fields, the field concatenation vector of the first field, and the field concatenation vector of multiple second fields, determine the target second field among the multiple second fields.

[0017] In this scheme, the field concatenation vector included in the field information corresponding to the first field can be used to indicate the business function and location information of the first field. The field identifier of the first field can be used to indicate the location information of the first field. Similarly, the field concatenation vector included in the field information corresponding to the second field can be used to indicate the business function and location information of the second field. The field information of the second field can also be used to indicate the location information of the second field. By utilizing the field identifier and the field concatenation vector, a target second field that matches both the business function and location information of the first field can be determined from multiple second fields. This improves the accuracy of the target second field, thereby increasing the accuracy of constructing field mapping relationships and ultimately improving data migration efficiency.

[0018] In one implementation, the target second field among the multiple second fields is determined based on the field identifier of the first field, the field identifiers of multiple second fields, the field concatenation vector of the first field, and the field concatenation vector of the multiple second fields, including:

[0019] Determine whether an initial second field exists among multiple second fields; the field identifier of the initial second field is consistent with the field identifier of the first field.

[0020] If no initial second field is found among multiple second fields, the vector similarity of the multiple second fields is calculated based on the field concatenation vector of the first field and the field concatenation vector of the multiple second fields respectively; the vector similarity of the second field indicates the similarity between the field concatenation vector of the first field and the field concatenation vector of the second field.

[0021] The target second field is determined based on the vector similarity corresponding to multiple second fields.

[0022] In this scheme, by first comparing field identifiers and then filtering multiple second fields based on vector similarity when field identifier matching fails, the speed of determining the target second field is improved, thereby increasing the speed of constructing field mapping relationships based on the target second field.

[0023] In one implementation, the target second field among the multiple second fields is determined based on the vector similarity corresponding to the multiple second fields, including:

[0024] Identify at least one of the multiple second fields whose vector similarity is greater than a first similarity threshold.

[0025] Based on a first preset number, the target second field is determined from at least one corresponding second field whose vector similarity is greater than a first similarity threshold.

[0026] In this scheme, by first determining the second field whose vector similarity is greater than the first similarity threshold from multiple second fields, and then determining the target second field from at least one corresponding second field whose vector similarity is greater than the first similarity threshold according to the first preset number, it can ensure that the vector similarity corresponding to the target second field is greater than the first similarity threshold. On the other hand, it can ensure that the number of target second fields is less than or equal to the first preset number, thereby improving the accuracy of determining the target second field and thus improving the accuracy of constructing field mapping relationships.

[0027] In one implementation, the method further includes:

[0028] If an initial second field exists among multiple identified second fields, then the initial second field is determined as the target second field.

[0029] In this scheme, when an initial second field is found to exist among multiple second fields, the method of directly determining the initial second field as the target second field can avoid further determining the target second field by calculating vector similarity, thereby improving the speed of determining the target second field.

[0030] In one implementation, based on the field information of the first field, semantic retrieval processing is performed on multiple second fields included in the target second table to determine the target second field that matches the first field, including:

[0031] Obtain the field information of the first field and the field information of multiple second fields; the field information of the first field includes the field concatenation vector of the first field; the field information of the second field includes the field concatenation vector of the second field;

[0032] Based on the concatenated vector of the first field and the concatenated vectors of multiple second fields, calculate the vector similarity corresponding to the multiple second fields respectively; the vector similarity corresponding to the second field indicates the similarity between the concatenated vector of the first field and the concatenated vector of the second field.

[0033] The target second field is determined based on the vector similarity corresponding to multiple second fields.

[0034] In this scheme, the field concatenation vector included in the field information corresponding to the first field can be used to indicate the business function and location information of the first field. Similarly, the field concatenation vector included in the field information corresponding to the second field can be used to indicate the business function and location information of the second field. By utilizing the field concatenation vector of the first field and the field concatenation vectors of multiple second fields, a target second field that matches both the business function and location information of the first field can be determined from among multiple second fields. This improves the accuracy of the target second field, thereby increasing the accuracy of constructing field mapping relationships and ultimately improving data migration efficiency.

[0035] In one implementation, before obtaining the field information of the first field and the field information of multiple second fields, the method further includes:

[0036] Obtain the field identifier and field description information of the field to be processed; the field to be processed includes a first field or a second field; the field description information is used to indicate the business function of the field to be processed; the field identifier of the field to be processed is used to indicate the location information of the field to be processed;

[0037] The field identifier and field description information of the field to be processed are concatenated to obtain the concatenated result of the field to be processed.

[0038] The concatenation result of the fields to be processed is vectorized to obtain the field concatenation vector of the fields to be processed.

[0039] In this scheme, the field description information of the field to be processed describes the business function of the field. Understandably, the field description information indicates the purpose of the field in the business scenario. The field identifier of the field to be processed indicates the location information of the field. Therefore, the field identifier is used to identify a field in the first table, thereby locating the position of the first field in the first table. After concatenating the field identifier and the field description information of the field to be processed to obtain the concatenated result, the concatenated result is vectorized to obtain the concatenated vector of the field to be processed. This method allows the concatenated vector of the field to be processed to be used directly as a vector in the semantic retrieval process (calculating vector similarity), thereby improving the efficiency of constructing field mapping relationships and thus improving data migration efficiency; it can also indicate the business function and location information of the field to be processed, improving the accuracy of determining the target second field, thereby improving the accuracy of constructing field mapping relationships and thus improving data migration accuracy.

[0040] In one implementation, the method further includes:

[0041] The field information to be processed includes the field concatenation vector of the field to be processed;

[0042] Store the field information of the field to be processed into the vector library;

[0043] Accordingly, the field information of the first field and the field information of multiple second fields are obtained, including:

[0044] Retrieve the field information of the first field and the field information of multiple second fields stored in the vector library.

[0045] In this scheme, the ordered storage of field information, including field concatenation vectors, is achieved by storing the field information in a vector library. This enables the rapid retrieval of the field information of the first field and multiple second fields from the vector library during semantic retrieval, thereby improving the efficiency of obtaining the field information of the first field and multiple second fields, and thus improving the efficiency of constructing field mapping relationships.

[0046] In one implementation, semantic retrieval processing is performed on multiple second tables based on the table information corresponding to the first table to determine the target second table that matches the first table, including:

[0047] Retrieve table information from the first table and table information from multiple second tables; the table information from the first table includes the concatenated vector of the first table; the table information from the second table includes the concatenated vector of the second table.

[0048] Based on the concatenated vectors of the first table and the concatenated vectors of multiple second tables, calculate the vector similarity of the multiple second tables respectively; the vector similarity of the second tables indicates the similarity between the concatenated vectors of the first table and the concatenated vectors of the second tables.

[0049] Based on the vector similarity corresponding to multiple second tables and the second similarity threshold, the target second table in the multiple second tables is determined.

[0050] In this scheme, the table concatenation vector included in the table information corresponding to the first table can be used to indicate the business functions and location information of the first table. Similarly, the table concatenation vector included in the table information corresponding to the second table can be used to indicate the business functions and location information of the second table. By using the table concatenation vectors of the first table and multiple second tables to calculate the vector similarity among them, a target second table that matches both the business functions and location information of the first table can be identified. This improves the accuracy of the target second table, thereby increasing the accuracy of table mapping relationship construction and ultimately improving data migration efficiency.

[0051] In one implementation, semantic retrieval processing is performed on multiple second tables based on the table information corresponding to the first table to determine the target second table that matches the first table, including:

[0052] Obtain the table information of the first table and the table information of multiple second tables; the table information of the first table includes the table identifier of the first table and the table concatenation vector of the first table; the table information of the second table includes the table identifier of the second table and the table concatenation vector of the second table.

[0053] Based on the table identifier of the first table, the table identifiers of multiple second tables, the table concatenation vector of the first table, and the table concatenation vector of multiple second tables, determine the target second table among the multiple second tables.

[0054] In this scheme, the table concatenation vector included in the table information corresponding to the first table can be used to indicate the business function and location information of the first table. The table identifier of the first table can be used to indicate the location information of the first table. Similarly, the table concatenation vector included in the table information corresponding to the second table can be used to indicate the business function and location information of the second table. The table information of the second table can also be used to indicate the location information of the second table. By utilizing the table identifier and the table concatenation vector, a target second table that matches the business function and location information of the first table can be identified from multiple second tables. This improves the accuracy of the target second table, thereby improving the accuracy of constructing table mapping relationships and ultimately increasing data migration efficiency.

[0055] In one implementation, the target second table among the multiple second tables is determined based on the table identifier of the first table, the table identifiers of multiple second tables, the table concatenation vector of the first table, and the table concatenation vector of the multiple second tables, including:

[0056] Determine if an initial second table exists among multiple second tables; the table identifier of the initial second table is consistent with the table identifier of the first table.

[0057] In the case where multiple second tables are identified and there is no initial second table, the vector similarity of the multiple second tables is calculated based on the table concatenation vector of the first table and the table concatenation vector of the multiple second tables respectively; the vector similarity of the second table indicates the similarity between the table concatenation vector of the first table and the table concatenation vector of the second table.

[0058] Based on the vector similarity corresponding to multiple second tables, the target second table is determined among the multiple second tables.

[0059] In this scheme, by first comparing table identifiers and then filtering multiple second fields based on vector similarity when the table identifiers fail to match, the speed of determining the target second field is improved, thereby increasing the speed of constructing field mapping relationships based on the target second field.

[0060] In one implementation, the target second table among the multiple second tables is determined based on the vector similarity corresponding to the multiple second tables, including:

[0061] Identify at least one second table whose corresponding vector similarity is greater than a second similarity threshold;

[0062] Based on the second preset number, the target second table is determined from at least one second table whose corresponding vector similarity is greater than the second similarity threshold.

[0063] In this scheme, by first identifying the second table whose vector similarity is greater than the second similarity threshold from multiple second tables, and then determining the target second table from at least one corresponding second table whose vector similarity is greater than the second similarity threshold according to the second preset number, the scheme ensures that the vector similarity corresponding to the target second table is greater than the second similarity threshold. On the other hand, it ensures that the number of target second tables is less than or equal to the second preset number, thereby improving the accuracy of determining the target second table and thus improving the accuracy of constructing table mapping relationships.

[0064] In one implementation, the method further includes:

[0065] If an initial second table exists among multiple second tables, the initial second table is determined as the target second table.

[0066] In this scheme, when multiple second tables are identified, if an initial second table exists, the method of directly determining the initial second table as the target second table can avoid further determining the target second table by calculating vector similarity, thereby improving the speed of determining the target second table.

[0067] In one implementation, before obtaining the table information of the first table and the table information of each of the second tables, the method further includes:

[0068] Obtain the table identifier and table description information of the table to be processed; the table to be processed includes a first table or a second table; the table description information is used to indicate the business function of the table to be processed.

[0069] Obtain the identifier of the first table set; the first table set is the set of tables to which the table to be processed belongs; the table identifier of the table to be processed and the identifier of the first table set are used to indicate the location information of the table to be processed;

[0070] 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 are concatenated to obtain the concatenated result of the table to be processed.

[0071] The concatenation result of the tables to be processed is vectorized to obtain the table concatenation vector of the tables to be processed.

[0072] In this scheme, the table description information of the table to be processed describes the business function of the table. The table identifier of the table to be processed indicates its purpose in the business scenario. The table identifier of the table to be processed and the identifier of the first table set can be used to indicate the location information of the table to be processed. Therefore, the table identifier of the table to be processed and the identifier of the first table set are used to identify a table in the first database, thereby locating the position of the first table in the first database. After concatenating 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 the concatenated result of the table to be processed, the concatenated result is vectorized to obtain the table concatenation vector of the table to be processed. In this way, the table concatenation vector of the table to be processed can be used directly as a vector in the semantic retrieval process (to calculate vector similarity), thereby improving the efficiency of building table mapping relationships and thus improving data migration efficiency; it can also indicate the business function and location information of the table to be processed, improving the accuracy of identifying the target second table, thereby improving the accuracy of building table mapping relationships and thus improving data migration accuracy.

[0073] In one implementation, the method further includes:

[0074] The table information to be processed includes the table concatenation vector of the table to be processed;

[0075] Store the table information of the table to be processed into the vector library;

[0076] Accordingly, the table information of the first table and the table information of multiple second tables are obtained, including:

[0077] Retrieve the table information of the first table and multiple second tables stored in the vector library.

[0078] In this scheme, the ordered storage of table information, including table concatenation vectors, is achieved by storing the table information in a vector library. This enables the rapid retrieval of the table information of the first table and multiple second tables from the vector library during semantic retrieval, thereby improving the efficiency of obtaining the table information of the first table and multiple second tables, and thus improving the efficiency of constructing table mapping relationships.

[0079] In one implementation, the method further includes:

[0080] Obtain the initial table structure information corresponding to the database to be processed;

[0081] If the language of the table description and field description information in the initial table structure information is not the target language, the table description and field description information in the initial table structure information are translated to obtain the table structure information corresponding to the target language.

[0082] Where the database to be processed includes a first database, the table structure information corresponding to the target language is the first table structure information; wherein, the first table structure information includes the field identifier of the first field, the field description information of the first field, the table identifier of the first table, the table description information of the first table, and the identifier of the table set to which the first table belongs; or,

[0083] When the database to be processed includes a second database, the table structure information corresponding to the target language is the second table structure information; wherein, the second table structure information includes the field identifier of the second field, the field description information of the second field, the table identifier of the second table, the table description information of the second table, and the identifier of the table set to which the second table belongs.

[0084] In this scheme, when the language corresponding to the table description and field description information in the initial table structure information is not the target language, the table description and field description information in the initial table structure information are translated to obtain the table structure information corresponding to the target language. This ensures that the language corresponding to the table description information and field description information of the first table is the same as the language corresponding to the table description information and field description information of the second table. This method improves the accuracy of semantic retrieval of tables and fields, avoiding the problem of low retrieval accuracy caused by language differences.

[0085] Secondly, embodiments of this application provide a data migration apparatus, comprising:

[0086] The construction module is used to perform semantic retrieval processing on multiple second tables based on the table information corresponding to the first table, and determine the target second table that matches the first table; the first table is any one of the multiple tables included in the first database; the second table belongs to the multiple tables included in the second database; the table information includes a table concatenation vector; the table concatenation vector is used to indicate the business function and location information of the first table;

[0087] The building module is also used to construct table mapping relationships based on the first table and the target second table;

[0088] The construction module is also used to perform semantic retrieval processing on multiple second fields included in the target second table based on the field information of the first field, and to determine the target second field that matches the first field; the first field is any field among the multiple fields included in the first table; the field information includes a field concatenation vector, which is used to indicate the business function and positioning information of the first field;

[0089] The building module is also used to construct a field mapping relationship based on the first field and the target second field;

[0090] The data migration module is used to migrate data between the first and second databases based on table mapping relationships and field mapping relationships.

[0091] The data migration apparatus provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.

[0092] In one implementation, the initial table structure information corresponding to the first database is different from that corresponding to the second database.

[0093] The data migration apparatus provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.

[0094] In one implementation, a building module is specifically used for:

[0095] Obtain the field information of the first field and the field information of multiple second fields; the field information of the first field includes the field identifier of the first field and the field concatenation vector of the first field; the field information of the second field includes the field identifier of the second field and the field concatenation vector of the second field.

[0096] Based on the field identifier of the first field, the field identifiers of multiple second fields, the field concatenation vector of the first field, and the field concatenation vector of multiple second fields, determine the target second field among the multiple second fields.

[0097] The data migration apparatus provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.

[0098] In one implementation, a building module is specifically used for:

[0099] Determine whether an initial second field exists among multiple second fields; the field identifier of the initial second field is consistent with the field identifier of the first field.

[0100] If no initial second field is found among multiple second fields, the vector similarity of the multiple second fields is calculated based on the field concatenation vector of the first field and the field concatenation vector of the multiple second fields respectively; the vector similarity of the second field indicates the similarity between the field concatenation vector of the first field and the field concatenation vector of the second field.

[0101] The target second field is determined based on the vector similarity corresponding to multiple second fields.

[0102] The data migration apparatus provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.

[0103] In one implementation, a building module is specifically used for:

[0104] Identify at least one of the multiple second fields whose vector similarity is greater than a first similarity threshold.

[0105] Based on a first preset number, the target second field is determined from at least one corresponding second field whose vector similarity is greater than a first similarity threshold.

[0106] The data migration apparatus provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.

[0107] In one implementation, the building module is also used for:

[0108] If an initial second field exists among multiple identified second fields, then the initial second field is determined as the target second field.

[0109] The data migration apparatus provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.

[0110] In one implementation, a building module is specifically used for:

[0111] Based on the concatenated vector of the first field and the concatenated vectors of multiple second fields, calculate the vector similarity corresponding to the multiple second fields respectively; the vector similarity corresponding to the second field indicates the similarity between the concatenated vector of the first field and the concatenated vector of the second field.

[0112] The target second field is determined based on the vector similarity corresponding to multiple second fields.

[0113] The data migration apparatus provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.

[0114] In one implementation, the building module is also used for:

[0115] Obtain the field identifier and field description information of the field to be processed; the field to be processed includes a first field or a second field; the field description information is used to indicate the business function of the field to be processed; the field identifier of the field to be processed is used to indicate the location information of the field to be processed;

[0116] The field identifier and field description information of the field to be processed are concatenated to obtain the concatenated result of the field to be processed.

[0117] The concatenation result of the fields to be processed is vectorized to obtain the field concatenation vector of the fields to be processed.

[0118] The data migration apparatus provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.

[0119] In one implementation, the building module is also used for:

[0120] The field information to be processed includes the field concatenation vector of the field to be processed;

[0121] Store the field information of the field to be processed into the vector library;

[0122] Build modules, specifically used for:

[0123] Retrieve the field information of the first field and the field information of multiple second fields stored in the vector library.

[0124] The data migration apparatus provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.

[0125] In one implementation, a building module is specifically used for:

[0126] Retrieve table information from the first table and table information from multiple second tables; the table information from the first table includes the concatenated vector of the first table; the table information from the second table includes the concatenated vector of the second table.

[0127] Based on the concatenated vectors of the first table and the concatenated vectors of multiple second tables, calculate the vector similarity of the multiple second tables respectively; the vector similarity of the second tables indicates the similarity between the concatenated vectors of the first table and the concatenated vectors of the second tables.

[0128] Based on the vector similarity corresponding to multiple second tables and the second similarity threshold, the target second table in the multiple second tables is determined.

[0129] The data migration apparatus provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.

[0130] In one implementation, a building module is specifically used for:

[0131] Obtain the table information of the first table and the table information of multiple second tables; the table information of the first table includes the table identifier of the first table and the table concatenation vector of the first table; the table information of the second table includes the table identifier of the second table and the table concatenation vector of the second table.

[0132] Based on the table identifier of the first table, the table identifiers of multiple second tables, the table concatenation vector of the first table, and the table concatenation vector of multiple second tables, determine the target second table among the multiple second tables.

[0133] The data migration apparatus provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.

[0134] In one implementation, a building module is specifically used for:

[0135] Determine if an initial second table exists among multiple second tables; the table identifier of the initial second table is consistent with the table identifier of the first table.

[0136] In the case where multiple second tables are identified and there is no initial second table, the vector similarity of the multiple second tables is calculated based on the table concatenation vector of the first table and the table concatenation vector of the multiple second tables respectively; the vector similarity of the second table indicates the similarity between the table concatenation vector of the first table and the table concatenation vector of the second table.

[0137] Based on the vector similarity corresponding to multiple second tables, the target second table is determined among the multiple second tables.

[0138] The data migration apparatus provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.

[0139] In one implementation, a building module is specifically used for:

[0140] Identify at least one second table whose corresponding vector similarity is greater than a second similarity threshold;

[0141] Based on the second preset number, the target second table is determined from at least one second table whose corresponding vector similarity is greater than the second similarity threshold.

[0142] The data migration apparatus provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.

[0143] In one implementation, the building module is also used for:

[0144] If an initial second table exists among multiple second tables, the initial second table is determined as the target second table.

[0145] The data migration apparatus provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.

[0146] In one implementation, the building module is also used for:

[0147] Obtain the table identifier and table description information of the table to be processed; the table to be processed includes a first table or a second table; the table description information is used to indicate the business function of the table to be processed.

[0148] Obtain the identifier of the first table set; the first table set is the set of tables to which the table to be processed belongs; the table identifier of the table to be processed and the identifier of the first table set are used to indicate the location information of the table to be processed;

[0149] 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 are concatenated to obtain the concatenated result of the table to be processed.

[0150] The concatenation result of the tables to be processed is vectorized to obtain the table concatenation vector of the tables to be processed.

[0151] The data migration apparatus provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.

[0152] In one implementation, the building module is also used for:

[0153] The table information to be processed includes the table concatenation vector of the table to be processed;

[0154] Store the table information of the table to be processed into the vector library;

[0155] Build modules, specifically used for:

[0156] Retrieve the table information of the first table and multiple second tables stored in the vector library.

[0157] The data migration apparatus provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.

[0158] In one implementation, the building module is also used for:

[0159] Obtain the initial table structure information corresponding to the database to be processed;

[0160] If the language of the table description and field description information in the initial table structure information is not the target language, the table description and field description information in the initial table structure information are translated to obtain the table structure information corresponding to the target language.

[0161] Where the database to be processed includes a first database, the table structure information corresponding to the target language is the first table structure information; wherein, the first table structure information includes the field identifier of the first field, the field description information of the first field, the table identifier of the first table, the table description information of the first table, and the identifier of the table set to which the first table belongs; or,

[0162] When the database to be processed includes a second database, the table structure information corresponding to the target language is the second table structure information; wherein, the second table structure information includes the field identifier of the second field, the field description information of the second field, the table identifier of the second table, the table description information of the second table, and the identifier of the table set to which the second table belongs.

[0163] The data migration apparatus provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.

[0164] Thirdly, embodiments of this application provide a computing device, including:

[0165] The processor, and the memory that is in communication with the processor;

[0166] Memory is used to store instructions that the computer executes;

[0167] The processor is used to execute computer execution instructions stored in memory to implement the method of the first aspect.

[0168] The computing device provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.

[0169] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method of the first aspect.

[0170] When the computer-executable instructions in the computer-readable storage medium provided in this application are executed by a processor, the technical solutions shown in the above method embodiments can be implemented. The implementation principle and beneficial effects are similar, and will not be repeated here.

[0171] Fifthly, embodiments of this application provide a computer program product, including a computer program, which, when executed by a processor, is used to implement the method of the first aspect.

[0172] When the computer program in the computer program product provided in this application is executed by a processor, it can implement the technical solution shown in the above method embodiments. The implementation principle and beneficial effects are similar, and will not be repeated here. Attached Figure Description

[0173] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0174] Figure 1 This application provides an illustration of a data migration method.

[0175] Figure 2 This is a flowchart illustrating an embodiment of a data migration method provided in this application.

[0176] Figure 3 A flowchart illustrating the process of determining a second target table is provided in an embodiment of this application.

[0177] Figure 4 A schematic diagram of another process for determining the second target table provided in an embodiment of this application;

[0178] Figure 5 A schematic diagram of a process for obtaining table information of a first table and a second table, provided for an embodiment of this application;

[0179] Figure 6 A diagram illustrating metadata information stored for computing devices;

[0180] Figure 7 A database document processing scenario diagram provided for an embodiment of this application;

[0181] Figure 8 This is a schematic diagram illustrating the storage of the first table structure information provided in an embodiment of this application;

[0182] Figure 9 A schematic diagram of a visual interface provided for an embodiment of this application;

[0183] Figure 10 A flowchart illustrating the process of determining a target second field is provided for an embodiment of this application;

[0184] Figure 11 A schematic diagram of another process for determining the target second field provided in an embodiment of this application;

[0185] Figure 12 A schematic diagram illustrating multiple field identifiers in a field mapping relationship provided in an embodiment of this application;

[0186] Figure 13 A schematic diagram illustrating the display table mapping relationship and field mapping relationship provided in an embodiment of this application;

[0187] Figure 14 This is a schematic diagram of the structure of a data migration device provided in an embodiment of this application;

[0188] Figure 15 This is a schematic diagram of the structure of a computing device provided in an embodiment of this application. Detailed Implementation

[0189] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments made by those skilled in the art under the guidance of these embodiments are within the scope of protection of this application.

[0190] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0191] Glossary of Terms:

[0192] Database: A database is a warehouse for storing data. It has a large storage space and can store millions, tens of millions, or even hundreds of millions of data records. However, data in a database is not stored randomly; there are certain rules, otherwise the query efficiency will be very low. The current world is an Internet world full of data, with a huge amount of data flooding in. That is to say, this Internet world is a data world. Data comes from many sources, such as travel records, consumption records, web pages visited, messages sent, etc. In addition to text-type data, images, music, and sounds are also data.

[0193] Semantic mapping: Semantic mapping refers to the corresponding relationship of meanings between different symbol systems. For example, the Chinese word "苹果 (píngguǒ)" corresponds to the English word "apple". On the surface, it is a word conversion, but in fact, cultural differences need to be addressed - in the Chinese context, "苹果 (píngguǒ)" can refer to a fruit or a mobile phone brand, and the same polysemy exists in English. This cross-system concept association is the core of semantic mapping.

[0194] This application provides a data migration method. The table concatenation vector included in the table information corresponding to the first table can be used to indicate the business function and location information of the first table. Therefore, the table information corresponding to the first table can indicate the business function (or business meaning, or the use of the first table in a business scenario) and location information (used to identify a certain table in the first database, thereby locating the position of the first table in the database architecture of the first database). Therefore, based on the business function and location information of the first table, semantic retrieval of multiple second tables can achieve accurate retrieval based on business function and location information, thereby accurately determining the target second table, and then constructing a table mapping relationship based on the first table and the target second table. The field concatenation vector included in the field information corresponding to the first field can be used to indicate the business function (or business meaning, or the use of the first field in a business scenario) and location information (used to identify a certain field in the first table, thereby locating the position of the first field in the first table). In other words, the field information corresponding to the first field can indicate the business function and location information of the first field. Therefore, by performing semantic retrieval on multiple second fields based on the field information of the first field (indicating the business function and location information of the first field), accurate retrieval based on business function and location information can be achieved, thereby accurately determining the target second field. Then, a field mapping relationship can be constructed based on the first field and the target second field. According to the table mapping relationship (indicating the mapping relationship between the first table in the first database and the target second table in the second database) and the field mapping relationship (indicating the mapping relationship between the first field in the first table and the target second field in the target second table), data migration between the first and second databases can be performed, improving data migration efficiency.

[0195] In summary, the above method eliminates the need for manual one-to-one mapping, enabling the construction of table and field mapping relationships. This improves the efficiency of mapping relationship construction and, consequently, the efficiency of data migration between the first and second databases based on these relationships.

[0196] The data migration method of this application embodiment will be described in detail below.

[0197] For example, Figure 1 This is a schematic diagram illustrating an application scenario for a data migration method provided in this application. For example... Figure 1 As shown, the application scenario includes: computing device 10, terminal device 20, first application system device 30, and second application system device 40.

[0198] The computing device 10 can communicate with the terminal device 20.

[0199] The computing device 10 can be communicatively connected to the first application system device 30 and the second application system device 40, respectively.

[0200] It should be noted that the first application system device 30 is the computing device where the first application system resides. The database corresponding to the first application system is the first database. In one implementation, the first application system device 30 stores the first database.

[0201] The second application system device 40 is the computing device where the second application system resides. The database corresponding to the second application system is the second database. In one implementation, the second application system device 40 stores the second database.

[0202] It should be noted that the initial table structure information corresponding to the first database (indicating the database structure and data semantics of the first database) is different from the initial table structure information corresponding to the second database (indicating the database structure and data semantics of the second database).

[0203] In scenarios where data needs to be migrated from the first database to the second database, or vice versa:

[0204] The computing device 10 can perform semantic retrieval processing on multiple second tables based on the table information corresponding to the first table to determine the target second table that matches the first table. Here, the first table is any one of multiple tables included in the first database; the second table belongs to multiple tables included in the second database; the table information includes a table concatenation vector; the table concatenation vector is used to indicate the business function and location information of the first table. It should be noted that, in one implementation, the computing device 10 responds to a migration request sent by the terminal device 20 by performing semantic retrieval processing on multiple second tables based on the table information corresponding to the first table to determine the target second table that matches the first table.

[0205] The computing device 10 can construct a table mapping relationship based on the first table and the target second table.

[0206] The computing device 10 can perform semantic retrieval processing on multiple second fields included in the target second table based on the field information of the first field, and determine the target second field that matches the first field; the first field is any field among the multiple fields included in the first table; the field information includes a field concatenation vector, which is used to indicate the business function and location information of the first field.

[0207] The computing device 10 can construct a field mapping relationship based on the first field and the target second field.

[0208] The computing device 10 can perform data migration between the first database and the second database based on table mapping relationships and field mapping relationships.

[0209] It should be noted that the embodiments in this application do not... Figure 1 The document does not limit the actual form of the various devices included, nor does it specify the form of the devices. Figure 1 The interaction methods between devices are limited, and can be set according to actual needs when applying the solution.

[0210] The technical solution of this application will now be described in detail through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0211] Figure 2 This is a flowchart illustrating an embodiment of a data migration method provided in this application. Figure 2 As shown, the method includes the following steps:

[0212] S201: Based on the table information corresponding to the first table, perform semantic retrieval processing on multiple second tables to determine the target second table that matches the first table.

[0213] In this embodiment, the first table is any one of the multiple tables included in the first database. The second table belongs to the multiple tables included in the second database.

[0214] The computing device can perform semantic retrieval processing on multiple second tables based on the table information corresponding to the first table, and determine the target second table that matches the first table.

[0215] The table information includes the table concatenation vector.

[0216] It should be noted that the table concatenation vector is used to indicate the business functions and location information of the first table.

[0217] It should also be noted that the table concatenation vector of the first table indicates the business function of the first table. In other words, the table concatenation vector of the first table can indicate the purpose of the first table in the business scenario.

[0218] It should also be noted that the table concatenation vector of the first table can be used to identify a certain table in the first database, thereby locating the position of the first table in the database architecture of the first database. In other words, the table concatenation vector can indicate the location information of the first table.

[0219] The following describes one implementation method of a computing device performing semantic retrieval processing on multiple second tables based on the table information corresponding to the first table to determine the target second table that matches the first table.

[0220] Figure 3 This is a schematic flowchart illustrating the process of determining a second target table, as provided in an embodiment of this application. Figure 3As shown, the process includes the following steps:

[0221] S301: Obtain table information of the first table and table information of multiple second tables.

[0222] In this embodiment, the computing device can obtain table information of a first table and table information of multiple second tables. In one implementation, the computing device can obtain table information of a first table and table information of multiple second tables stored in a vector library. In another implementation, the computing device can store a vector library.

[0223] The table information of the first table includes the table concatenation vector of the first table.

[0224] The table information of the second table includes the table concatenation vector of the second table.

[0225] S302: Based on the concatenated vectors of the first table and the concatenated vectors of multiple second tables, calculate the vector similarity of the multiple second tables respectively.

[0226] In this embodiment, the computing device can calculate the vector similarity of multiple second tables based on the table concatenation vector of the first table and the table concatenation vector of multiple second tables.

[0227] The vector similarity corresponding to the second table indicates the similarity between the concatenated vectors of the first table and the concatenated vectors of the second table.

[0228] S303: Determine the target second table from the multiple second tables based on the vector similarity corresponding to the multiple second tables and the second similarity threshold.

[0229] In this embodiment, the computing device can determine the target second table among the multiple second tables based on the vector similarity corresponding to the multiple second tables and a second similarity threshold.

[0230] Additionally, it should be noted that in one implementation, the computing device can call the maximum relevance service interface of faiss to determine the target second table among multiple second tables. Here, faiss is used to calculate the vector similarity between the multiple second tables based on the concatenated vectors of the first table and the concatenated vectors of the multiple second tables, and then, based on the vector similarity between the multiple second tables and a second similarity threshold, to determine the target second table among the multiple second tables.

[0231] The following describes another implementation method for a computing device to perform semantic retrieval processing on multiple second tables based on the table information corresponding to the first table, and determine the target second table that matches the first table.

[0232] Figure 4 This is a schematic diagram illustrating another process for determining the second target table provided in an embodiment of this application. For example... Figure 4As shown, the process includes the following steps:

[0233] S401: Retrieve table information from the first table and table information from multiple second tables.

[0234] In this embodiment, the computing device can obtain table information of a first table and table information of multiple second tables. In one implementation, the computing device can obtain table information of a first table and table information of multiple second tables stored in a vector library.

[0235] The table information of the first table includes the table identifier of the first table and the table concatenation vector of the first table.

[0236] The table information of the second table includes the table identifier of the second table and the table concatenation vector of the second table.

[0237] S402: Based on the table identifier of the first table, the table identifiers of multiple second tables, the table concatenation vector of the first table, and the table concatenation vector of multiple second tables, determine the target second table among the multiple second tables.

[0238] In this embodiment, the computing device can determine the target second table among the multiple second tables based on the table identifier of the first table, the table identifiers of the multiple second tables, the table concatenation vector of the first table, and the table concatenation vector of the multiple second tables.

[0239] In one implementation:

[0240] The computing device can determine whether an initial second word table exists among multiple second tables. The table identifier of the initial second table is identical to that of the first table.

[0241] The computing device can identify the initial second table as the target second table if an initial second table exists among multiple second tables.

[0242] Furthermore, the computing device can calculate the vector similarity between multiple second tables, provided that at least one initial second table does not exist, based on the concatenated vectors of the first table and the concatenated vectors of the multiple second tables. The vector similarity between the second tables indicates the similarity between the concatenated vectors of the first and second tables. The computing device can determine the target second table among the multiple second tables based on the vector similarity and a second similarity threshold. For example, if the second similarity threshold is 0.7, the vector similarity of the target second table is greater than 0.7.

[0243] The following describes one method for a computing device to pre-obtain information from the first table and the second table.

[0244] Figure 5This is a schematic diagram illustrating a process for obtaining table information from a first table and a second table, provided as an embodiment of this application. Figure 5 As shown, the process includes the following steps:

[0245] S501: Obtain the table identifier and table description information of the table to be processed.

[0246] In this embodiment, the computing device can obtain the table identifier and table description information of the table to be processed.

[0247] The table to be processed may include either the first table or the second table.

[0248] In one implementation, if the table to be processed includes a first table, the computing device can obtain the table identifier and table description information of the first table from the structure information of the first table.

[0249] In one implementation, when the table to be processed includes a second table, the computing device can obtain the table identifier of the second table and the table description information of the second table from the structure information of the second table.

[0250] S502: Get the identifier of the first table set.

[0251] In this embodiment, the computing device can obtain the identifier of the first table set.

[0252] The first set of tables is the set of tables (schema) to which the table to be processed belongs.

[0253] It should be noted that, in one implementation, if the table to be processed includes a first table, the computing device can obtain the identifier of the table set to which the first table belongs from the structure information of the first table.

[0254] In one implementation, if the table to be processed includes a second table, the computing device can obtain the identifier of the table set to which the second table belongs from the structure information of the second table.

[0255] S503: 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 are concatenated to obtain the concatenated result of the table to be processed.

[0256] In this embodiment, the computing device can concatenate 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 the concatenation result of the table to be processed.

[0257] The table identifier of the table to be processed and the identifier of the first table set are used to indicate the location information of the table to be processed.

[0258] The table identifier of the table to be processed and the identifier of the first set of tables are used to locate the table to be processed. In other words, the table identifier of the table to be processed and the identifier of the first set of tables can be used to locate a specific table to be processed from the database to be processed.

[0259] S504: Vectorize the concatenation result of the tables to be processed to obtain the table concatenation vector of the tables to be processed.

[0260] In this embodiment, the computing device can perform vectorization processing on the concatenation result of the table to be processed to obtain the table concatenation vector of the table to be processed.

[0261] In another implementation, after obtaining the table concatenation vector of the table to be processed, the computing device can obtain the table information of the table to be processed based on the table concatenation vector. In one implementation, the table information of the table to be processed includes the table concatenation vector of the table to be processed. In another implementation, the table information of the table to be processed includes the table concatenation vector of the table to be processed and the table identifier of the table to be processed.

[0262] In another implementation, the computing device can store the table information of the table to be processed in a vector library. Understandably, if the table to be processed includes a first table, the computing device can store the table information of the first table in the vector library. If the table to be processed includes a second table, the computing device can store the table information of the second table in the vector library.

[0263] Additionally, in one implementation, the computing device may also store metadata information corresponding to the table identifier (or the table concatenation vector of the table to be processed). For example, Figure 6 A diagram illustrating metadata information stored for computing devices.

[0264] The following describes one implementation method for pre-constructing the structure information of the first table and the structure information of the second table in a computing device.

[0265] The first table structure information is the table structure information of the first database (the database corresponding to the first application system). The first table structure information includes the field identifier of the first field, the field description information of the first field, the table identifier of the first table, the table description information of the first table, and the identifier of the table set to which the first table belongs.

[0266] The second table structure information is the table structure information of the second database (the database corresponding to the second application system). The second table structure information includes the field identifier of the second field, the field description information of the second field, the table identifier of the second table, the table description information of the second table, and the identifier of the table set to which the second table belongs.

[0267] The computing device can obtain the initial table structure information corresponding to the database to be processed. It should be noted that, in one implementation, when the database to be processed is a first database, the initial table structure information may include the initial first table structure information. In another implementation, when the database to be processed includes a second database, the initial table structure information may include the initial second table structure information.

[0268] The computing device can translate the table description and field description information in the initial table structure information even if the language corresponding to these descriptions is not the target language, to obtain the table structure information (including the table description and field description information in the target language) in the target language. In one implementation, the target language can be Chinese. In another implementation, the computing device can translate the table description and field description information in the initial table structure information based on a large model translation service (a large language model with added translation task prompts) to obtain the table structure information (including the table description and field description information in the target language).

[0269] In addition, if the language corresponding to the table description information and field description information in the initial table structure information is the target language, the computing device can determine the initial table structure information as the table structure information.

[0270] It should be noted that if the initial table structure information is the initial first table structure information, then this table structure information can be the first table structure information. The first table structure information includes the field identifier of the first field, the field description information of the first field, the table identifier of the first table, the table description information of the first table, and the identifier of the table set to which the first table belongs.

[0271] If the initial table structure information is the initial second table structure information, then this table structure information is the second table structure information. The second table structure information includes the field identifier of the second field, the field description information of the second field, the table identifier of the second table, the table description information of the second table, and the identifier of the table set to which the second table belongs.

[0272] For example, if the language corresponding to the table description information and field description information in the initial first table structure information is not Chinese, the computing device can translate the table description information (English table description information is not empty, and Chinese table description information is empty) and field description information (English field description information is not empty, and Chinese field description information is empty) in the initial table structure information to obtain the first table structure information.

[0273] For another example, if the language corresponding to the table description information and field description information in the initial second table structure information is Chinese, the computing device can determine the initial table structure information as the second table structure information.

[0274] In another implementation, Figure 7 This is a diagram illustrating a database document processing scenario provided in an embodiment of this application. For example... Figure 7 As shown, the computing device can also store the first table structure information in a relational database (such as a PostgreSQL database). The computing device can also store the second table structure information in a relational database. For example, the table identifier of the first table in the first table structure information can be "po_precondition_header_t", and the field identifier of the first field can be "po_pre_header_id".

[0275] It should also be noted that, in one implementation, the structure information of the first table can be stored as two tables. For example, Figure 8 This is a schematic diagram illustrating the storage of the first table structure information provided in an embodiment of this application. For example, as shown... Figure 8 As shown, the two tables can include `erp_table` and `erp_field`. Each row in `erp_table` is associated with at least one `field_id` in `erp_field` through its `table_id` (table identifier). In other words, the `table_id` corresponding to each `field_id` belongs to `erp_table`.

[0276] The following describes one implementation method for a computing device to obtain the initial first table structure information and the initial second table structure information.

[0277] The computing device can acquire a first database document and a second database document. The first database document can be a database document of a first database. The second database document can be a database document of a second database.

[0278] The computing device can parse the first database document and the second database document to obtain the parsed first database document and the parsed second database document.

[0279] In one implementation, HTML is a markup language that uses tags to define document structure. When the first database document is in HTML format, the computing device can use an HTML parsing library to parse the first database document, obtaining the parsed version. For example, regarding the first database document... <h3> The content of this tag is the table name. This applies to the first table in the first database document.< / h3> <h5> The content of this tag includes the field identifier, field type, whether it is nullable, and field description information for each field (all fields included in the table). For< / h5> <h3>The first one below The tag (

[0280]

[0281]

[0282]

[0283] Figure 9

[0284]

[0285]

[0286]

[0287]

[0288] Figure 9 Figure 9

[0289]

[0290]

[0291]

[0292]

[0293]

[0294]

[0295]

[0296]

[0297]

[0298]

[0299]

[0300]

[0301]

[0302] Figure 10 Figure 10

[0303]

[0304]

[0305]

[0306]

[0307] Figure 7

[0308]

[0309]

[0310]

[0311]

[0312]

[0313]

[0314]

[0315]

[0316]

[0317] Figure 6

[0318]

[0319]

[0320]

[0321]

[0322]

[0323]

[0324]

[0325]

[0326]

[0327]

[0328]

[0329]

[0330]

[0331]

[0332] Figure 11 Figure 11

[0333]

[0334]

[0335]

[0336]

[0337]

[0338]

[0339]

[0340]

[0341]

[0342]

[0343]

[0344]

[0345]

[0346] Figure 12 Figure 12

[0347]

[0348]

[0349]

[0350]

[0351]

[0352]

[0353]

[0354]

[0355]

[0356] Figure 13 Figure 13

[0357]

[0358]

[0359]

[0360]

[0361]

[0362] Figure 14 Figure 14

[0363]

[0364]

[0365]

[0366]

[0367]

[0368]

[0369]

[0370]

[0371]

[0372]

[0373]

[0374]

[0375]

[0376]

[0377]

[0378]

[0379]

[0380]

[0381]

[0382]

[0383]

[0384]

[0385]

[0386]

[0387]

[0388]

[0389]

[0390]

[0391]

[0392]

[0393]

[0394]

[0395]

[0396]

[0397]

[0398]

[0399]

[0400]

[0401]

[0402]

[0403]

[0404]

[0405]

[0406]

[0407]

[0408]

[0409]

[0410]

[0411]

[0412]

[0413]

[0414]

[0415]

[0416]

[0417]

[0418]

[0419]

[0420]

[0421]

[0422]

[0423]

[0424]

[0425]

[0426]

[0427]

[0428]

[0429]

[0430]

[0431]

[0432]

[0433]

[0434]

[0435]

[0436]

[0437]

[0438]

[0439]

[0440]

[0441]

[0442] Figure 15 Figure 15

[0443]

[0444]

[0445]

[0446]

[0447]

[0448] The content of the second database document is table description information. In one implementation, when the format of the second database document is EXCEL, the computing device can use a Python library to parse the second database document according to the worksheet and column names to obtain the parsed second database document. The computing device can perform cleaning and lowercase conversion processing on the parsed first and second database documents to obtain the initial first table structure information and the initial second table structure information. In one implementation, the cleaning process can include at least one of the following: deduplication, filling in null values, and unifying the data format. In one implementation, the lowercase conversion processing refers to converting the uppercase letters in the parsed first and second database documents to lowercase letters. The following describes one implementation of the computing device obtaining the first and second database documents. The terminal device can display a visual interface. For example, a schematic diagram of a visual interface provided in an embodiment of this application is shown. It should be noted that the visual interface can be the display interface corresponding to the migration platform. The terminal device can respond to the user's operation on the visual interface to obtain the analysis task (also known as the database semantic analysis task). The analysis task can indicate the first and second database documents. In one implementation, the analysis task may further include the system identifier of the first application system (e.g., the name of the first application system), the system identifier of the second application system (e.g., the name of the second application system), the task identifier of the analysis task (e.g., the task name), the task description, the metadata of the first application system, and the metadata of the second application system. In one implementation, the metadata of the first application system may include the data source type, data source instance, database identifier, and table set identifier of the first application system. The metadata of the second application system may include the data source type, data source instance, database identifier, and table set identifier of the second application system. For example, as shown, the data source type of the first application system may be Oracle, the database identifier may be DEV, and the table set identifier may include PO and APPS. As another example, as shown, the data source type of the second application system may be PostgreSQL, the database identifier may be qw_bc, and the table set identifier may include erp and public. It should be noted that, for the first application system, if the user selects at least one table set identifier, and for the second application system, if the user does not select a table set identifier, the mapping relationship (including table mapping relationship and field mapping relationship) constructed in this embodiment is an N vs. full mapping relationship. Where N is an integer greater than or equal to 1, and N is the number of identifiers of the table set selected by the user (identifiers of at least one table set included in the metadata of the first application system). "Full" refers to the total number of all table sets included in the second application system.For the first application system, when the user selects at least one identifier of a table set, and for the second application system, when the user selects at least one identifier of a table set, the mapping relationship (including table mapping relationship and field mapping relationship) constructed in this embodiment is an N vs M mapping relationship. Here, M is an integer greater than or equal to 1, and M is the number of identifiers of the table sets selected by the user (the metadata of the second application system includes at least one identifier of a table set). For the first application system, when the user does not select at least one identifier of a table set, and for the second application system, when the user selects at least one identifier of a table set, the mapping relationship (including table mapping relationship and field mapping relationship) constructed in this embodiment is a full vs M mapping relationship. For the first application system, when the user does not select at least one identifier of a table set, and for the second application system, when the user does not select at least one identifier of a table set, the mapping relationship (including table mapping relationship and field mapping relationship) constructed in this embodiment is a full vs full mapping relationship. The computing device can obtain the analysis task (also referred to as a database semantic analysis task) sent by the terminal device. The computing device can obtain the first database document and the second database document in the analysis task according to the analysis task. S202: Construct a table mapping relationship based on the first table and the target second table. In this embodiment, the computing device can construct a table mapping relationship based on the first table and the target second table when the target second table in multiple second tables is determined. Additionally, it should be noted that in one implementation: the computing device can determine the mapping relationship between the first table and the target second table after determining the target second table in multiple second tables. The computing device can add the mapping relationship between the first table and the target second table to the table mapping relationship. It should be noted that in one implementation, the table mapping relationship can be stored in a mapping result database. In another implementation, the computing device can store this mapping result database. S203: Perform semantic retrieval processing on multiple second fields included in the target second table according to the field information of the first field to determine the target second field that matches the first field. In this embodiment, the computing device can perform semantic retrieval processing on multiple second fields included in the target second table according to the field information of the first field to determine the target second field that matches the first field. The following describes one implementation of the computing device determining the target second field. A flowchart illustrating the process of determining the target second field is provided in this embodiment of the application. As shown, the process includes the following steps: S1001: Obtain field information of a first field and field information of multiple second fields. In this embodiment, the computing device can obtain field information of a first field and field information of multiple second fields. The field information of the first field includes a field identifier and a field concatenation vector of the first field. The field information of the second fields includes a field identifier and a field concatenation vector of the second field.In one implementation, exemplarily as shown, the field information of the first field can be stored in a vector library. The field information of the second field can also be stored in a vector library. For the first field included in the first table structure information, the computing device can query the vector library based on the field identifier of the first field in the first table structure information to obtain the field information of the first field. The computing device can query the vector library based on the field identifier of the second field in the second table structure information to obtain the field information of the second field. Below, an implementation method for the computing device to pre-construct a field concatenation vector of the first field and a field concatenation vector of the second field is described. The field to be processed includes either the first field or the second field. The computing device can obtain the field identifier and field description information of the field to be processed. The computing device can concatenate the field identifier and the field description information of the field to be processed to obtain the concatenation result of the field to be processed. The field description information of the field to be processed is used to indicate the business function of the field to be processed. That is, the field description information of the field to be processed is used to describe the purpose of the field to be processed in the business scenario. The field identifier of the field to be processed can be used to identify a certain field, thereby locating the position of the field to be processed within the database schema of the database to be processed. In other words, the field identifier of the field to be processed indicates the location information of the field to be processed. The computing device can vectorize the concatenation result of the field to be processed to obtain the field concatenation vector of the field to be processed. It should be noted that if the field to be processed includes a first field, the field concatenation vector of the field to be processed can include the field concatenation vector of the first field. If the field to be processed includes a second field, the field concatenation vector of the field to be processed can include the field concatenation vector of the second field. Furthermore, in one implementation, after obtaining the field concatenation vector of the field to be processed, the computing device can obtain the table information of the field to be processed based on the field concatenation vector. In one implementation, the table information of the field to be processed includes the field concatenation vector of the field to be processed. In another implementation, the field information of the field to be processed includes the field concatenation vector of the field to be processed and the field identifier of the field to be processed. In one implementation, the computing device can store the field information of the field to be processed in a vector library. Understandably, if the field to be processed includes a first field, the computing device can store the field information of the first field in the vector library. If the field to be processed includes a second field, the computing device can store the field information of the second field in the vector library. Additionally, in another implementation, the computing device can also store metadata information corresponding to the field identifier (or the concatenated vector of the fields to be processed) of the field to be processed. An exemplary diagram illustrates the metadata information stored by the computing device.S1002: Determine the target second field among the multiple second fields based on the field identifier of the first field, the field identifiers of the multiple second fields, the field concatenation vector of the first field, and the field concatenation vector of the multiple second fields. In this embodiment, the computing device can determine the target second field among the multiple second fields based on the field identifier of the first field, the field identifiers of the multiple second fields, the field concatenation vector of the first field, and the field concatenation vector of the multiple second fields. The process by which the computing device determines the target second field among the multiple second fields based on the field identifier of the first field, the field identifiers of the multiple second fields, the field concatenation vector of the first field, and the field concatenation vector of the multiple second fields will be described below. In one implementation: the computing device can determine whether an initial second field exists among the multiple second fields. The field identifier of the initial second field is consistent with the field identifier of the first field. In one implementation, the field identifier can be a field name. If the computing device determines that an initial second field exists among the multiple second fields, it can determine the initial second field as the target second field. Furthermore, the computing device can calculate the vector similarity of multiple second fields based on the concatenated vectors of the first field and the concatenated vectors of the multiple second fields, even when no initial second field is found among the multiple second fields. It should be noted that the vector similarity of the second field indicates the similarity between the concatenated vectors of the first field and the concatenated vectors of the second field. The computing device can determine a target second field among the multiple second fields based on the vector similarity. In one implementation, the computing device can determine at least one second field among the multiple second fields whose corresponding vector similarity is greater than a first similarity threshold. For example, the first similarity threshold can be 0.7. The computing device can determine the target second field from at least one second field whose corresponding vector similarity is greater than the first similarity threshold based on a first preset number. Below, one implementation of the computing device determining the target second field from at least one second field whose corresponding vector similarity is greater than the first similarity threshold based on a first preset number will be described. The computing device can determine at least one second field whose corresponding vector similarity is greater than the first similarity threshold as at least one candidate second field. The computing device can sort at least one candidate second field based on the vector similarity corresponding to each candidate second field, obtaining a sorting number for at least one candidate second field. The computing device can then determine at least one target second field from the at least one candidate second field based on the sorting number of the at least one candidate second field and a first preset number. In other words, the computing device can determine candidate second fields whose sorting numbers are less than or equal to the first preset number as target second fields. For example, the first preset number can be 3.It should be noted that when the number of candidate second fields is greater than or equal to 3, the number of target second fields can be 3; when the number of candidate second fields is less than 3, the number of target second fields can be less than 3. Below, another implementation method for the computing device to determine the target second field is described. A flowchart illustrating another method for determining the target second field provided in this application embodiment is shown. As shown, the process includes the following steps: S1101: Obtain field information of the first field and field information of multiple second fields. In this embodiment, the computing device can obtain field information of the first field and field information of multiple second fields. The field information of the first field includes a field concatenation vector of the first field. The field information of the second field includes a field concatenation vector of the second field. S1102: Determine the target second field among the multiple second fields based on the field concatenation vector of the first field and the field concatenation vectors of the multiple second fields. In this embodiment, the computing device can determine the target second field among the multiple second fields based on the field concatenation vector of the first field and the field concatenation vectors of the multiple second fields. In one implementation: the computing device can calculate the vector similarity of multiple second fields based on the concatenated vector of the first field and the concatenated vectors of multiple second fields. It should be noted that the vector similarity of the second fields indicates the similarity between the concatenated vectors of the first and second fields. The computing device can determine the target second field among the multiple second fields based on the vector similarity of the multiple second fields. Below, another implementation of the computing device determining the target second field is described. The computing device can call the maximum relevance service interface of faiss to determine the target second field among the multiple second fields. Here, faiss is used to determine the target second field among the multiple second fields based on the field identifier of the first field, the field identifiers of the multiple second fields, the concatenated vector of the first field, and the concatenated vectors of the multiple second fields. S204: Construct a field mapping relationship based on the first field and the target second field. In this embodiment, the computing device can construct a field mapping relationship based on the first field and the target second field if it is determined that a target second field exists among the multiple second fields. It should be noted that there can be one or multiple target second fields. In one implementation, after determining that a target second field exists among multiple second fields, the computing device can determine a mapping relationship between a first field and the target second field. The computing device can then add the mapping relationship between the first field and the target second field to a field mapping relationship. In another implementation, the field mapping relationship can be a mapping relationship between field identifiers. An exemplary diagram illustrates multiple field identifiers in a field mapping relationship provided in an embodiment of this application.As shown, for example, multiple field identifiers may include erp_table_id, erp_field_id, erp_table_id_ai, etc. Additionally, it should be noted that in one implementation, the field mapping relationship can be stored in a mapping result database. S205: Based on the table mapping relationship and the field mapping relationship, data migration is performed between the first database and the second database. In this embodiment, the initial table structure information corresponding to the first database (indicating the database structure and data semantics of the first database) is different from the initial table structure information corresponding to the second database (indicating the database structure and data semantics of the second database). The computing device can perform data migration between the first database and the second database based on the table mapping relationship and the field mapping relationship. Understandably, in one implementation, the computing device can migrate data from the first database to the second database based on the table mapping relationship and the field mapping relationship. In another implementation, the computing device can migrate data from the second database to the first database based on the table mapping relationship and the field mapping relationship. The process of the computing device performing data migration between the first database and the second database based on the table mapping relationship and the field mapping relationship will be described below. In one implementation: the computing device can send table mapping relationships and field mapping relationships to the terminal device. The terminal device's display interface can display the table mapping relationships and field mapping relationships. A schematic diagram illustrating the display of table mapping relationships and field mapping relationships is provided in this application embodiment. For example, as shown, the terminal device can display that there is a mapping relationship between JL_REV_TMP (table identifier) ​​and qw_form_er (table identifier), and the vector similarity is 31%. The terminal device can obtain the user's adjustment operations on the table mapping relationships and field mapping relationships, obtaining the adjusted table mapping relationships and adjusted field mapping relationships. The terminal device can send the adjusted table mapping relationships and adjusted field mapping relationships to the computing device. The computing device can perform data migration between a first database and a second database based on the adjusted table mapping relationships and adjusted field mapping relationships. In one implementation, the computing device can migrate data from the first database to the second database based on the adjusted table mapping relationships and adjusted field mapping relationships. In another implementation, the computing device can migrate data from the second database to the first database based on the adjusted table mapping relationships and adjusted field mapping relationships. The beneficial effects of this embodiment are as follows: In this embodiment, the table concatenation vector included in the table information corresponding to the first table can be used to indicate the business function and location information of the first table. That is, the table information corresponding to the first table can indicate the business function (that is, the use of the first table in the business scenario) and location information (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 can be located).Therefore, based on the business functions and location information of the first table, semantic retrieval of multiple second tables can achieve accurate retrieval based on business functions and location information, improving the accuracy of identifying the target second table, completing the semantic mapping between the first table and the target second table, and thus improving the accuracy of constructing table mapping relationships. The field concatenation vector included in the field information corresponding to the first field can be used to indicate the business function (i.e., the use of the first field in the business scenario) and location information (used to identify a certain field in the first table, thereby locating the position of the first field in the first table). In other words, the field information corresponding to the first field can indicate the business function and location information of the first field. Therefore, based on the field information of the first field (indicating the business function and location information of the first field), semantic retrieval of multiple second fields can achieve accurate retrieval based on business functions and location information, improving the accuracy of identifying the target second field, completing the semantic mapping between the first field and the target second field, and thus improving the accuracy of constructing field mapping relationships. Based on the table mapping relationship (indicating the mapping relationship between the first table in the first database and the target second table in the second database) and the field mapping relationship (indicating the mapping relationship between the first field in the first table and the target second field in the target second table), data migration can be performed between the first database and the second database, improving data migration efficiency. The following is an embodiment of the apparatus of this application, which can be used to execute the embodiment of the method of this application. For details not disclosed in the apparatus embodiment of this application, please refer to the embodiment of the method of this application. A schematic diagram of the structure of a data migration apparatus provided in this application embodiment is shown. As shown, the data migration apparatus 140 includes a construction module 141 and a data migration module 142. The construction module 141 is used to perform semantic retrieval processing on multiple second tables based on the table information corresponding to the first table, and determine the target second table that matches the first table; the first table is any one of the multiple tables included in the first database; the second table belongs to the multiple tables included in the second database; the table information includes a table concatenation vector; the table concatenation vector is used to indicate the business function and location information of the first table; the construction module 141 is also used to construct a table mapping relationship based on the first table and the target second table; the construction module 141 is also used to perform semantic retrieval processing on multiple second fields included in the target second table based on the field information of the first field, and determine the target second field that matches the first field; the first field is any one of the multiple fields included in the first table; the field information includes a field concatenation vector; the field concatenation vector is used to indicate the business function and location information of the first field; the construction module 141 is also used to construct a field mapping relationship based on the first field and the target second field; the data migration module 142 is used to perform data migration between the first database and the second database based on the table mapping relationship and the field mapping relationship.The data migration apparatus provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be repeated here. In one implementation, the initial table structure information corresponding to the first database is different from the initial table structure information corresponding to the second database. The data migration apparatus provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be repeated here. In one implementation, the construction module 141 is specifically used for: obtaining field information of a first field and field information of multiple second fields; the field information of the first field includes the field identifier of the first field and the field concatenation vector of the first field; the field information of the second field includes the field identifier of the second field and the field concatenation vector of the second field; and determining the target second field among the multiple second fields based on the field identifier of the first field, the field identifiers of multiple second fields, the field concatenation vector of the first field, and the field concatenation vector of the multiple second fields. The data migration apparatus provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be repeated here. In one implementation, the construction module 141 is specifically used to: determine whether an initial second field exists among a plurality of second fields; the field identifier of the initial second field is consistent with the field identifier of the first field; if it is determined that the initial second field does not exist among the plurality of second fields, calculate the vector similarity corresponding to the plurality of second fields according to the field concatenation vector of the first field and the field concatenation vector of the plurality of second fields respectively; the vector similarity corresponding to the second field indicates the similarity between the field concatenation vector of the first field and the field concatenation vector of the second field; and determine the target second field among the plurality of second fields based on the vector similarity corresponding to the plurality of second fields. The data migration apparatus provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here. In one implementation, the construction module 141 is specifically used to: determine at least one second field among a plurality of second fields whose corresponding vector similarity is greater than a first similarity threshold; and determine the target second field from at least one second field whose corresponding vector similarity is greater than the first similarity threshold according to a first preset number. The data migration apparatus provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here. In one implementation, the construction module 141 is further configured to: determine the initial second field as the target second field if an initial second field is found among a plurality of second fields. The data migration apparatus provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.In one implementation, the construction module 141 is specifically used for: obtaining field information of a first field and field information of multiple second fields; the field information of the first field includes a field concatenation vector of the first field; the field information of the second field includes a field concatenation vector of the second field; calculating the vector similarity corresponding to the multiple second fields based on the field concatenation vector of the first field and the field concatenation vectors of the multiple second fields respectively; the vector similarity corresponding to the second field indicates the similarity between the field concatenation vector of the first field and the field concatenation vector of the second field; and determining the target second field among the multiple second fields based on the vector similarity corresponding to the multiple second fields. The data migration apparatus provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here. In one implementation, the construction module 141 is further configured to: obtain the field identifier and field description information of the field to be processed; the field to be processed includes a first field or a second field; the field description information is used to indicate the business function of the field to be processed; the field identifier of the field to be processed is used to indicate the location information of the field to be processed; concatenate the field identifier and the field description information of the field to be processed to obtain the concatenation result of the field to be processed; and vectorize the concatenation result of the field to be processed to obtain the field concatenation vector of the field to be processed. The data migration device provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here. In one implementation, the construction module 141 is further configured to: determine that the field information of the field to be processed includes the field concatenation vector of the field to be processed; store the field information of the field to be processed in a vector library; the construction module 141 is specifically configured to: obtain the field information of the first field and the field information of multiple second fields stored in the vector library. The data migration device provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here. In one implementation, the construction module 141 is specifically used for: obtaining table information of a first table and table information of multiple second tables; the table information of the first table includes a table concatenation vector of the first table; the table information of the second tables includes a table concatenation vector of the second table; calculating the vector similarity corresponding to the multiple second tables based on the table concatenation vector of the first table and the table concatenation vector of the multiple second tables respectively; the vector similarity corresponding to the second table indicates the similarity between the table concatenation vector of the first table and the table concatenation vector of the second table; and determining the target second table among the multiple second tables based on the vector similarity corresponding to the multiple second tables and a second similarity threshold. The data migration apparatus provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be repeated here.In one implementation, the construction module 141 is specifically used to: obtain table information of a first table and table information of multiple second tables; the table information of the first table includes a table identifier and a table concatenation vector of the first table; the table information of the second tables includes a table identifier and a table concatenation vector of the second table; and determine the target second table among the multiple second tables based on the table identifier of the first table, the table identifiers of the multiple second tables, the table concatenation vector of the first table, and the table concatenation vector of the multiple second tables. The data migration apparatus provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here. In one implementation, the construction module 141 is specifically used to: determine whether an initial second table exists in a plurality of second tables; the table identifier of the initial second table is consistent with the table identifier of the first table; if it is determined that the initial second table does not exist in the plurality of second tables, calculate the vector similarity corresponding to the plurality of second tables according to the table concatenation vector of the first table and the table concatenation vector of the plurality of second tables respectively; the vector similarity corresponding to the second table indicates the similarity between the table concatenation vector of the first table and the table concatenation vector of the second table; and determine the target second table in the plurality of second tables according to the vector similarity corresponding to the plurality of second tables. The data migration apparatus provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here. In one implementation, the construction module 141 is specifically used to: determine at least one second table in the plurality of second tables whose corresponding vector similarity is greater than a second similarity threshold; and determine the target second table from the second table whose corresponding vector similarity is greater than the second similarity threshold according to a second preset number. The data migration apparatus provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here. In one implementation, the construction module 141 is further configured to: determine the initial second table as the target second table when an initial second table exists among multiple second tables. The data migration apparatus provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be repeated here. In one implementation, the construction module 141 is further configured to: obtain the table identifier and table description information of the table to be processed; the table to be processed includes a first table or a second table; the table description information is used to indicate the business function of the table to be processed; obtain the identifier of the first table set; the first table set is the table set to which the table to be processed belongs; the table identifier of the table to be processed and the identifier of the first table set are used to indicate the location information of the table to be processed; perform concatenation 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 the concatenation result of the table to be processed; perform vectorization processing on the concatenation result of the table to be processed to obtain the table concatenation vector of the table to be processed. The data migration apparatus provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be repeated here.In one implementation, the construction module 141 is further configured to: determine that the table information of the table to be processed includes the table concatenation vector of the table to be processed; store the table information of the table to be processed in a vector library; specifically, the construction module 141 is configured to: obtain the table information of the first table and the table information of multiple second tables stored in the vector library. The data migration apparatus provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here. In one implementation, the construction module 141 is further configured to: obtain initial table structure information corresponding to the database to be processed; if the language corresponding to the initial table structure information is not the target language, translate the table description information and field description information in the initial table structure information to obtain table structure information corresponding to the target language; wherein, if the database to be processed includes a first database, the table structure information corresponding to the target language is the first table structure information; wherein, the first table structure information includes the field identifier of the first field, the field description information of the first field, the table identifier of the first table, the table description information of the first table, and the identifier of the table set to which the first table belongs; or, if the database to be processed includes a second database, the table structure information corresponding to the target language is the second table structure information; wherein, the second table structure information includes the field identifier of the second field, the field description information of the second field, the table identifier of the second table, the table description information of the second table, and the identifier of the table set to which the second table belongs. The data migration device provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, and will not be described again here. A schematic diagram of the structure of a computing device provided in this application embodiment is shown. As shown, the computing device 150 includes a processor 151 and a memory 152; wherein the processor 151 is communicatively connected to the memory 152, and the memory 152 is used to store computer execution instructions; the processor 151 is configured to execute the technical solutions in the aforementioned method embodiments by executing the computer execution instructions stored in the memory 152. Optionally, the memory 152 can be independent or integrated with the processor 151. Optionally, when the memory 152 is a device independent of the processor 151, the computing device 150 may further include a bus 153 for connecting the aforementioned devices. The processor is used to execute the technical solutions in the aforementioned method embodiments, and its implementation principle and technical effects are similar, and will not be described again here. This application embodiment also provides a computer-readable storage medium storing computer execution instructions, which, when executed by a processor, are used to implement the technical solutions in any of the aforementioned method embodiments. This application embodiment provides a computer program product, including a computer program, which, when executed by a processor, is used to implement the technical solutions in the aforementioned method embodiments. Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to the program instructions.The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps included in the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks. Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features. These modifications or substitutions do not cause the essence of the corresponding technical solutions to depart from the scope of the technical solutions of the embodiments of this application. < / h3>

Claims

1. A data migration method, characterized in that, include: Based on the table information corresponding to the first table, semantic retrieval processing is performed on multiple second tables to determine the target second table that matches the first table. The first table is any one of the multiple tables included in the first database; the second table belongs to the multiple tables included in the second database; the table information includes a table concatenation vector; the table concatenation vector is used to indicate the business function and location information of the first table; Based on the first table and the target second table, a table mapping relationship is constructed; Based on the field information of the first field, semantic retrieval processing is performed on multiple second fields included in the target second table to determine the target second field that matches the first field; the first field is any field among the multiple fields included in the first table; the field information includes a field concatenation vector, which is used to indicate the business function and location information of the first field; Based on the first field and the target second field, a field mapping relationship is constructed; Based on the table mapping relationship and the field mapping relationship, data migration is performed between the first database and the second database.

2. The method according to claim 1, characterized in that, The step of performing semantic retrieval processing on multiple second fields included in the target second table based on the field information of the first field to determine the target second field that matches the first field includes: Obtain the field information of the first field and the field information of multiple second fields; the field information of the first field includes the field identifier of the first field and the field concatenation vector of the first field; the field information of the second field includes the field identifier of the second field and the field concatenation vector of the second field. The target second field is determined from the multiple second fields based on the field identifier of the first field, the field identifiers of the multiple second fields, the field concatenation vector of the first field, and the field concatenation vector of the multiple second fields.

3. The method according to claim 2, characterized in that, The step of determining the target second field among the multiple second fields based on the field identifier of the first field, the field identifiers of multiple second fields, the field concatenation vector of the first field, and the field concatenation vector of the multiple second fields includes: Determine whether an initial second field exists among the plurality of second fields; the field identifier of the initial second field is consistent with the field identifier of the first field; If the initial second field is not found among the multiple second fields, the vector similarity of the multiple second fields is calculated based on the field concatenation vector of the first field and the field concatenation vector of the multiple second fields respectively; the vector similarity of the second field indicates the similarity between the field concatenation vector of the first field and the field concatenation vector of the second field. The target second field is determined based on the vector similarity corresponding to the plurality of second fields.

4. The method according to claim 3, characterized in that, The step of determining the target second field among the plurality of second fields based on the vector similarity corresponding to the plurality of second fields includes: Determine at least one of the plurality of second fields whose vector similarity is greater than a first similarity threshold; Based on a first preset number, the target second field is determined from at least one corresponding second field whose vector similarity is greater than the first similarity threshold.

5. The method according to claim 3, characterized in that, The method further includes: If the initial second field is found to exist among the plurality of second fields, the initial second field is determined as the target second field.

6. The method according to any one of claims 2-5, characterized in that, Before obtaining the field information of the first field and the field information of multiple second fields, the method further includes: Obtain the field identifier and field description information of the field to be processed; the field to be processed includes a first field or a second field; the field description information is used to indicate the business function of the field to be processed; the field identifier of the field to be processed is used to indicate the location information of the field to be processed; The field identifier and field description information of the field to be processed are concatenated to obtain the concatenation result of the field to be processed. The concatenation result of the fields to be processed is vectorized to obtain the field concatenation vector of the fields to be processed.

7. The method according to any one of claims 1-6, characterized in that, The step of performing semantic retrieval processing on multiple second tables based on the table information corresponding to the first table to determine the target second table that matches the first table includes: Obtain the table information of the first table and the table information of multiple second tables; the table information of the first table includes the table concatenation vector of the first table; the table information of the second table includes the table concatenation vector of the second table; Based on the concatenated vectors of the first table and the concatenated vectors of multiple second tables, calculate the vector similarity of the multiple second tables respectively; the vector similarity of the second table indicates the similarity between the concatenated vectors of the first table and the concatenated vectors of the second table. The target second table is determined based on the vector similarity corresponding to the multiple second tables and a second similarity threshold.

8. The method according to claim 7, characterized in that, Before obtaining the table information of the first table and the table information of each of the second tables, the method further includes: Obtain the table identifier and table description information of the table to be processed; the table to be processed includes a first table or a second table; the table description information is used to indicate the business function of the table to be processed. Obtain the identifier of the first table set; the first table set is the table set to which the table to be processed belongs; the table identifier of the table to be processed and the identifier of the first table set are used to indicate the location information of the table to be processed; 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 are concatenated to obtain the concatenation result of the table to be processed. The concatenation result of the table to be processed is vectorized to obtain the table concatenation vector of the table to be processed.

9. The method according to claim 6 or 8, characterized in that, The method further includes: Obtain the initial table structure information corresponding to the database to be processed; If the language corresponding to the table description information and field description information in the initial table structure information is not the target language, the table description information and field description information in the initial table structure information are translated to obtain the table structure information corresponding to the target language. Wherein, if the database to be processed includes the first database, the table structure information corresponding to the target language is the first table structure information; wherein, the first table structure information includes the field identifier of the first field, the field description information of the first field, the table identifier of the first table, the table description information of the first table, and the identifier of the table set to which the first table belongs; or, When the database to be processed includes the second database, the table structure information corresponding to the target language is the second table structure information; wherein, the second table structure information includes the field identifier of the second field, the field description information of the second field, the table identifier of the second table, the table description information of the second table, and the identifier of the table set to which the second table belongs.

10. A computing device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory is used to store computer-executed instructions; The processor is configured to execute computer execution instructions stored in the memory to implement the method according to any one of claims 1-9.