Heterogeneous database function classification, heterogeneous database migration method

By optimizing input parameters using word vectors and generative adversarial networks, the problem of differences in function names and input parameters in heterogeneous database migration was solved, achieving efficient and accurate database migration and improved compatibility.

CN116662871BActive Publication Date: 2026-05-01INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INDUSTRIAL AND COMMERCIAL BANK OF CHINA
Filing Date
2023-02-16
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing technologies suffer from high migration costs, poor compatibility, and low accuracy during heterogeneous database migration, especially in addressing financial business risks caused by differences in function names and input parameters between different database systems.

Method used

The similarity of function names is calculated using word vectors to generate input parameters and execute function mapping relationships. Generative adversarial networks are then used to optimize the input parameters, ensuring consistency of output parameters, and finally, function classification and direct transfer are performed.

Benefits of technology

It reduces the cost of migrating heterogeneous databases, improves migration efficiency and accuracy, enhances compatibility between databases, and reduces financial business risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116662871B_ABST
    Figure CN116662871B_ABST
Patent Text Reader

Abstract

The present disclosure provides a heterogeneous database function classification and heterogeneous database migration method, which can be applied to the field of information security technology. The method comprises the following steps: obtaining a source database function set and a target database function set, the source database function set comprising a plurality of source library functions, the source library function comprising a source library function name, the target database function set comprising a plurality of target library functions, the target library function comprising a target library function name; calculating the similarity of the plurality of source library function names and the plurality of target library function names through a word vector to obtain a function name mapping relationship; obtaining an input parameter; based on the input parameter, executing the plurality of source library functions and the plurality of target library functions that exist in the function name mapping relationship to obtain an output parameter; and based on the difference of the output parameter, outputting a function classification of the source library function, the function classification at least comprising a direct migration category. The present disclosure also provides a heterogeneous database function classification and heterogeneous database migration device, equipment, a storage medium and a program product.
Need to check novelty before this filing date? Find Prior Art

Description

Heterogeneous database function classification and heterogeneous database migration methods Technical Field

[0001] This disclosure relates to the field of information security, specifically to a heterogeneous database function classification and heterogeneous database migration method. Background Technology

[0002] Database localization is a current requirement, specifically manifested in migrating data from traditional databases (or source databases) to domestic databases (or target databases). The relationship between traditional databases and domestic databases is that of heterogeneous databases, and the process of migrating data from traditional databases to domestic databases is called heterogeneous database data migration.

[0003] Domestic databases are updated and iterated very rapidly, requiring thorough testing and verification to ensure smooth migration and reduce application modification workload. Different databases exhibit significant differences in system functions; for example, functions with similar functionalities may have different names, or the same name may have different input or output parameters. Even if similar syntax works in both databases, the actual execution results may differ, potentially leading to risks in financial transactions.

[0004] In existing technologies, to ensure the security of data migration between heterogeneous databases, the common approach is to establish association trees and syntactic relationships, specify the function migration order and repair function syntax differences, and automatically adapt the function syntax differences during the migration process, automatically adapting the syntax of traditional databases to that of domestic databases. However, existing technologies still suffer from problems such as high migration costs, poor compatibility, and low accuracy. Summary of the Invention

[0005] In view of the above problems, this disclosure provides heterogeneous database function classification, heterogeneous database migration methods, apparatus, devices, media and program products to improve migration accuracy, migration efficiency and compatibility.

[0006] According to a first aspect of this disclosure, a method for classifying functions in heterogeneous databases is provided, comprising: obtaining a source database function set and a target database function set, wherein the source database function set includes multiple source library functions, each source library function including a source library function name, and the target database function set includes multiple target library functions, each target library function including a target library function name; calculating the similarity between the multiple source library function names and the multiple target library function names using word vectors to obtain a function name mapping relationship; obtaining input parameters; executing the multiple source library functions and the multiple target library functions that have the function name mapping relationship based on the input parameters to obtain output parameters; and outputting a function classification of the source library functions based on the differences in the output parameters, wherein the function classification includes at least a direct transfer category.

[0007] According to embodiments of this disclosure, the step of calculating the similarity between multiple source library function names and multiple target library function names using word vectors to obtain a function name mapping relationship includes: cleaning the multiple source library function names and the multiple target library function names respectively; converting the cleaned multiple source library function names and the multiple target library function names into word vectors respectively to obtain multiple source library function word vectors and multiple target library function word vectors; calculating the similarity between the multiple source library function word vectors and the multiple target library function word vectors, wherein the multiple source library function word vectors include at least a first word vector and the multiple target library function word vectors include at least a second word vector; determining a preset mapping interval in which the similarity between the first word vector and the second word vector lies; and determining the function name mapping relationship based on the preset mapping interval in which the similarity lies.

[0008] According to embodiments of this disclosure, the step of cleaning the plurality of source library function names and the plurality of target library function names includes: verifying whether the plurality of source library function names and the plurality of target library function names match a preset error reporting condition; and, if the plurality of source library function names and the plurality of target library function names match the preset error reporting condition, performing error correction processing according to the error reporting condition.

[0009] According to an embodiment of this disclosure, the input parameters are generated by a generative adversarial network (GAN). The method for generating the input parameters includes: acquiring true input parameter samples and random noise; generating pseudo input parameter samples using a generator based on the random noise; judging the true input parameter samples and the pseudo input parameter samples using a discriminator to obtain a discrimination result, wherein the discrimination result includes a first discrimination result and a second discrimination result, wherein the first discrimination result is an input parameter sample judged as true by the discriminator, and the second discrimination result is an input parameter sample judged as false by the discriminator; using the input parameter samples judged as true by the discriminator as input parameters; and passing the input parameter samples judged as false by the discriminator into the generator to optimize the generation logic of pseudo input parameter samples in the generator.

[0010] According to embodiments of this disclosure, the true input parameter samples include input parameter samples containing input parameter type labels and input parameter samples not containing input parameter type labels.

[0011] According to an embodiment of this disclosure, the function name mapping relationship includes at least a synonym relationship. The step of executing the plurality of source library functions and the plurality of target library functions that have the function name mapping relationship based on the input parameters to obtain output parameters includes: inputting the input parameters into the source library functions and the target library functions that have the synonym relationship to obtain output parameters, wherein the input parameters include parameter type, parameter number, and parameter value.

[0012] According to an embodiment of this disclosure, the step of outputting the function classification of the source library function based on the difference in the output parameters includes: if the source library function and the target library function are synonyms and the output parameters are consistent, then the function classification of the source library function is determined to be a direct migration category.

[0013] A second aspect of this disclosure provides a heterogeneous database migration method, comprising: obtaining function name mapping relationships, function classifications, and source database data, wherein the source database data includes source library functions; finding target library functions based on the source library functions through the mapping relationships; and performing direct migration based on the source library functions corresponding to the direct migration categories in the function classifications, wherein the function name mapping relationships and the function classifications are obtained by performing the above-described heterogeneous database function classification method.

[0014] A third aspect of this disclosure provides a heterogeneous database function classification apparatus, comprising: a classification element acquisition module for acquiring a source database function set and a target database function set, wherein the source database function set includes multiple source library functions, each source library function including a source library function name, and the target database function set includes multiple target library functions, each target library function including a target library function name; a similarity calculation module for calculating the similarity between the multiple source library function names and the multiple target library function names using word vectors to obtain a function name mapping relationship; an input parameter acquisition module for acquiring input parameters; a function execution module for executing the multiple source library functions and the multiple target library functions that have the function name mapping relationship based on the input parameters to obtain output parameters; and a function classification module for outputting the function classification of the source library functions based on the differences in the output parameters, wherein the function classification includes at least a direct transfer category.

[0015] According to embodiments of this disclosure, the similarity calculation module is configured to: clean the plurality of source library function names and the plurality of target library function names respectively; convert the cleaned plurality of source library function names and the plurality of target library function names into word vectors respectively, to obtain plurality of source library function word vectors and plurality of target library function word vectors; calculate the similarity between the plurality of source library function word vectors and the plurality of target library function word vectors, wherein the plurality of source library function word vectors include at least a first word vector and the plurality of target library function word vectors include at least a second word vector; determine a preset mapping interval in which the similarity between the first word vector and the second word vector lies; and determine the function name mapping relationship based on the preset mapping interval in which the similarity lies.

[0016] According to an embodiment of this disclosure, the similarity calculation module is used to verify whether the plurality of source library function names and the plurality of target library function names match a preset error reporting condition; and when the plurality of source library function names and the plurality of target library function names match the preset error reporting condition, to perform error correction processing according to the error reporting condition.

[0017] According to an embodiment of this disclosure, the input parameters are generated by a generative adversarial network (GAN). The apparatus includes: a test parameter generation module for acquiring true input parameter samples and random noise; generating pseudo input parameter samples using a generator based on the random noise; judging the true input parameter samples and the pseudo input parameter samples using a discriminator to obtain a discrimination result, the discrimination result including a first discrimination result and a second discrimination result, wherein the first discrimination result is an input parameter sample judged as true by the discriminator, and the second discrimination result is an input parameter sample judged as false by the discriminator; using the input parameter samples judged as true by the discriminator as input parameters; and inputting the input parameter samples judged as false by the discriminator into the generator to optimize the generation logic of pseudo input parameter samples in the generator.

[0018] According to embodiments of this disclosure, the true input parameter samples include input parameter samples containing input parameter type labels and input parameter samples not containing input parameter type labels.

[0019] According to an embodiment of this disclosure, the function name mapping relationship includes at least a synonym relationship. The function execution module is used to input the input parameters to the source library function and the target library function that have the synonym relationship, so as to execute and obtain output parameters. The input parameters include parameter type, parameter number and parameter value.

[0020] According to an embodiment of this disclosure, the function classification module is used to determine that the source library function is classified as a direct migration category when the source library function and the target library function are synonyms and the output parameters are consistent.

[0021] A fourth aspect of this disclosure provides a heterogeneous database migration apparatus, comprising: a migration element preparation module for acquiring function name mapping relationships, function classifications, and source database data, wherein the source database data includes source library functions; a migration target lookup module for finding target library functions based on the source library functions and through the mapping relationships; and a migration execution module for performing direct migration based on the source library functions corresponding to the direct migration categories in the function classifications, wherein the function name mapping relationships and the function classifications are obtained by executing the above-described heterogeneous database function classification method.

[0022] A fifth aspect of this disclosure provides an electronic device comprising: one or more processors; and a memory for storing one or more programs, wherein, when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to perform the above-described heterogeneous database function classification and heterogeneous database migration methods.

[0023] A sixth aspect of this disclosure also provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the above-described heterogeneous database function classification and heterogeneous database migration methods.

[0024] A seventh aspect of this disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described heterogeneous database function classification and heterogeneous database migration methods.

[0025] In the embodiments of this disclosure, the function name mapping relationship of heterogeneous databases is obtained by calculating similarity through word vectors. Under this mapping relationship, different input parameters are used to ensure full coverage of the test results. Then, the function is classified according to the execution results to guide the migration of heterogeneous databases, reduce the migration cost of heterogeneous databases, and improve the migration efficiency, accuracy and compatibility of heterogeneous databases. Attached Figure Description

[0026] The foregoing contents, as well as other objects, features, and advantages of this disclosure, will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:

[0027] Figure 1 schematically illustrates an application scenario of heterogeneous database function classification and heterogeneous database function migration method according to embodiments of the present disclosure;

[0028] Figure 2 schematically illustrates a flowchart of a heterogeneous database function classification method according to an embodiment of the present disclosure;

[0029] Figure 3 schematically illustrates a flowchart of a mapping relationship determination method according to an embodiment of the present disclosure;

[0030] Figure 4 schematically illustrates a flowchart of a data cleaning method according to an embodiment of the present disclosure;

[0031] Figure 5 schematically illustrates a flowchart of an input parameter generation method according to an embodiment of the present disclosure;

[0032] Figure 6A schematically illustrates a structural block diagram of a generative adversarial network according to an embodiment of the present disclosure;

[0033] Figure 6B schematically illustrates a structural block diagram of another generative adversarial network according to an embodiment of the present disclosure;

[0034] Figure 7 schematically illustrates a flowchart of an output parameter calculation method according to an embodiment of the present disclosure;

[0035] Figure 8 schematically illustrates a flowchart of a function classification output method according to an embodiment of the present disclosure;

[0036] Figure 9 schematically illustrates a flowchart of a heterogeneous database migration method according to an embodiment of the present disclosure;

[0037] Figure 10 schematically illustrates a structural block diagram of a heterogeneous database function classification apparatus according to an embodiment of the present disclosure;

[0038] Figure 11 schematically illustrates a structural block diagram of a heterogeneous database migration apparatus according to an embodiment of the present disclosure; and

[0039] Figure 12 schematically illustrates a block diagram of an electronic device suitable for implementing heterogeneous database function classification and heterogeneous database migration methods according to embodiments of the present disclosure. Detailed Implementation

[0040] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.

[0041] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0042] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.

[0043] When using expressions such as "at least one of A, B, and C", they should generally be interpreted in accordance with the meaning that is commonly understood by a person skilled in the art (e.g., "a system having at least one of A, B, and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B, and C, etc.).

[0044] Before providing a detailed description of the embodiments of this disclosure, it is necessary to explain some key technical terms involved in the embodiments of this disclosure one by one, as follows:

[0045] Heterogeneous databases refer to a collection of multiple related database systems. The heterogeneity of heterogeneous databases is mainly reflected in heterogeneous computer architecture, heterogeneous operating system architecture, and heterogeneous DBMS itself. They can be relational database systems such as Oracle and SQL Server, or databases with different data models. Heterogeneous systems are software systems with the same or similar business functions, but inconsistent implementation methods and internal structures.

[0046] Word embedding, also known as word-embedded natural language processing (NLP), is a collective term for a set of language modeling and feature learning techniques. Words or phrases from the vocabulary are mapped to real-valued vectors. Word embedding technology transforms words into dense vectors, generally considered as feature vectors of a word, and similar words tend to have similar word vectors.

[0047] Embedding uses a low-dimensional dense vector to represent an object, so that the vector can express certain features of the corresponding object, and the distance between the vectors can reflect the similarity between objects.

[0048] Cosine similarity, also known as cosine similarity, is a measure of the similarity between two vectors by calculating the cosine of the angle between them.

[0049]

[0050] The given similarity range is from -1 to 1, where -1 means that the two vectors point in completely opposite directions; 1 means that they point in exactly the same direction; 0 usually means that they are independent of each other, and values ​​in between represent intermediate similarity or dissimilarity.

[0051] Generative Adversarial Networks (GANs) are model frameworks with powerful generative capabilities. GANs are generally widely used and have achieved significant success in the generation of continuous data such as images. A GAN must include at least a generator and a discriminator. The generator generates samples similar to the original data, while the discriminator determines whether the generated samples are real or fake.

[0052] Semi-supervised generative adversarial networks (GANs). Semi-supervised learning provides class labels to a small portion of the training dataset and classifies new samples through an internal data hiding structure.

[0053] For heterogeneous database migration, databases like Oracle typically have over 300 system functions. Adding the differences in input parameter types, quantities, and values, the number of scenarios can reach tens of thousands. This requires significant manpower to identify the differences between functions and perform compatibility modifications. Manual testing of system function compatibility is crucial to understanding the differences between heterogeneous database system functions and providing this information for application rewriting. Existing technologies can construct conversion mapping relationships between heterogeneous databases. Based on the functions related to different databases, the differences in keywords can be identified and configured into templates. Simultaneously, template selection enables the conversion of relevant syntax.

[0054] Existing technologies, such as Oracle database function migration methods, establish relationship trees and syntax trees, specify the function migration order and repair function syntax differences respectively, and automatically adapt function syntax differences during the migration process, automatically adapting Oracle syntax to the syntax of the preset type database.

[0055] The disadvantages of existing technologies include the following:

[0056] 1. High migration costs and low efficiency. Currently, to achieve smooth migration of heterogeneous databases, a large amount of manpower is required to sort out and modify system functions and analyze the compatibility differences of heterogeneous databases, which consumes a lot of manpower and time costs. Moreover, different applications need to modify the different functions according to their own needs, making it impossible to form a uniform system.

[0057] 2. Limited compatibility with heterogeneous database versions. Existing technologies support building relational and syntactic trees for Oracle database functions; or constructing conversion mapping relationships between Oracle and heterogeneous databases, sorting out keyword differences and configuring them into templates, and selecting templates to achieve relevant syntax conversions. However, these methods only apply to Oracle database migrations and cannot cover migrations between all heterogeneous databases, resulting in limited database compatibility.

[0058] 3. Low migration accuracy. Existing technologies lack comprehensive testing covering real-world production scenarios. Even with identical functions and input parameters, output discrepancies can occur, posing a high risk of deployment. With the continuous updates and iterations of domestic database versions, repeated manual testing is necessary, and it is difficult to exhaustively cover all input parameter scenarios.

[0059] To address the shortcomings of existing technologies in migrating heterogeneous databases, such as low efficiency, low accuracy, and poor compatibility, embodiments of this disclosure provide a heterogeneous database function classification method, comprising: obtaining a source database function set and a target database function set, wherein the source database function set includes multiple source library functions, each source library function including a source library function name, and the target database function set includes multiple target library functions, each target library function including a target library function name; calculating the similarity between the multiple source library function names and the multiple target library function names using word vectors to obtain a function name mapping relationship; obtaining input parameters; executing the multiple source library functions and the multiple target library functions that have the function name mapping relationship based on the input parameters to obtain output parameters; and outputting the function classification of the source library functions based on the differences in the output parameters, wherein the function classification includes at least a direct migration category.

[0060] In the embodiments of this disclosure, the function name mapping relationship of heterogeneous databases is obtained by calculating similarity through word vectors. Under this mapping relationship, different input parameters are used to ensure full coverage of the test results. Then, the function is classified according to the execution results to guide the migration of heterogeneous databases, reduce the migration cost of heterogeneous databases, and improve the migration efficiency, accuracy and compatibility of heterogeneous databases.

[0061] Figure 1 schematically illustrates an application scenario of heterogeneous database function classification and heterogeneous database function migration method according to embodiments of the present disclosure.

[0062] As shown in Figure 1, application scenario 100 according to this embodiment may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as a medium for providing a communication link between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0063] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).

[0064] Terminal devices 101, 102, and 103 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0065] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using terminal devices 101, 102, and 103 (for example only). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.

[0066] It should be noted that the heterogeneous database function classification and migration methods provided in this disclosure embodiment can generally be executed by server 105. Correspondingly, the heterogeneous database function classification and migration apparatus provided in this disclosure embodiment can generally be located in server 105. The heterogeneous database function classification and migration methods provided in this disclosure embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105. Correspondingly, the heterogeneous database function classification and migration apparatus provided in this disclosure embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105.

[0067] It should be understood that the number of terminal devices, networks, and servers shown in Figure 1 is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0068] The following will describe in detail the heterogeneous database function classification and heterogeneous database function migration method of the disclosed embodiments based on the scenario described in Figure 1, and with reference to Figures 2 to 9.

[0069] Figure 2 schematically illustrates a flowchart of a heterogeneous database function classification method according to an embodiment of the present disclosure.

[0070] As shown in Figure 2, the heterogeneous database function classification method of this embodiment includes operations S210 to S250, and the heterogeneous database function classification method can be executed by server 105.

[0071] In operation S210, a source database function set and a target database function set are obtained. The source database function set includes multiple source library functions, each of which includes a source library function name. The target database function set includes multiple target library functions, each of which includes a target library function name.

[0072] Specifically, this involves retrieving native system functions from the source and target databases. System functions include their names and input parameters. The function name is composed of one or more words, a combination of words and symbols, or a string with a specific meaning. For example, in the truncation function `SELECT trunc(164.67, -1.6)`, "trunc" is the function name, and "164.67" and "-1.6" are its two different input parameters.

[0073] In operation S220, the similarity between multiple source library function names and multiple target library function names is calculated using word vectors to obtain the function name mapping relationship.

[0074] Specifically, by quantifying these function names and converting them into word vectors, and then calculating the similarity between different word vectors, the correspondence between function names with the same or similar meanings can be obtained. It should be noted that the pairwise similarity calculation is performed between source library function names and target library function names; function names within the same database do not need to have their similarity calculated. The following will explain this operation S220 in detail.

[0075] Figure 3 schematically illustrates a flowchart of a mapping relationship determination method according to an embodiment of the present disclosure.

[0076] As shown in Figure 3, the mapping relationship determination method of this embodiment includes operations S310 to S350, which can at least partially execute the above-mentioned operation S220.

[0077] In operation S310, the multiple source library function names and the multiple target library function names are cleaned respectively.

[0078] The purpose of cleaning is to reduce the number / probability of errors during the execution of later test functions, which is independent of the input parameters.

[0079] Figure 4 schematically illustrates a flowchart of a data cleaning method according to an embodiment of the present disclosure.

[0080] As shown in Figure 4, the data cleaning method of this embodiment includes operations S410 to S420, which can at least partially perform the above-mentioned operation S310.

[0081] In operation S410, it is verified whether the plurality of source library function names and the plurality of target library function names match the preset error reporting conditions.

[0082] In operation S420, if the plurality of source library function names and the plurality of target library function names match a preset error reporting condition, error correction processing is performed according to the error reporting condition.

[0083] Specifically, the error condition refers to factors that can induce an error in the function execution result. For example, errors may occur due to at least the following reasons: execution in Chinese or English, punctuation marks in Chinese or English, quantity values, data types, and currency symbols. These can all be factors that induce errors. These error factors are then matched.

[0084] Correspondingly, these error factors are corrected accordingly, and those that cannot be corrected or are difficult to correct are handed over to manual intervention. The error correction process corresponds one-to-one with the above error conditions. For example, when punctuation marks are matched in both Chinese and English, the Chinese marks are uniformly matched as English marks to avoid later errors and improve compatibility.

[0085] In the embodiments of this disclosure, the process of re-examining and verifying data includes aspects such as processing punctuation marks, special characters, and case conversion, thereby improving data quality.

[0086] In operation S320, the cleaned source library function names and target library function names are converted into word vectors to obtain multiple source library function word vectors and multiple target library function word vectors.

[0087] The vector can be obtained by building a language model. The core of the modeling method is the distribution hypothesis, which states that the target word can be identified by surrounding words. Specifically, a word vector is generally considered to be a feature vector of a word. A word vector model is a related model used to generate word vectors. It can map each word to a word vector, digitizing text so that computers can better understand it. This model can solve the curse of dimensionality and insufficient semantic expression caused by one-hot encoding. Currently, the most commonly used method in natural language processing is distributed word identification. Distributed word identification represents a word as a fixed-length and dense continuous vector. This vector can be obtained by building a language model. The core of the modeling method is the distribution hypothesis, which states that the target word can be represented by surrounding words. The modeling method mainly involves two steps: first, defining a way to describe the context; and second, selecting a model that can describe the relationship between the context and the target word. Since a function name can be composed of multiple words, these words can be pre-quantified into a sequence. By searching this sequence, the corresponding values ​​can be obtained and then used. For example, when a function is composed of two meaningful characters, the resulting word vector is two-dimensional. The corresponding two-dimensional vectors in the source database and the target database are matched and calculated.

[0088] In operation S330, the similarity between the multiple source library function word vectors and the multiple target library function word vectors is calculated, wherein the multiple source library function word vectors include at least a first word vector and the multiple target library function word vectors include at least a second word vector.

[0089] Specifically, there are many methods for similarity calculation. In the embodiments disclosed herein, the similarity calculation is based on vectors. For example, similarity calculation can employ classic algorithms such as Pearson correlation coefficient, Euclidean distance, Manhattan distance, and cosine similarity.

[0090] In embodiments of this disclosure, similarity calculation can be performed using cosine similarity. This involves calculating the distance between two vectors to determine their similarity. The cosine distance between the embedding vectors uses the cosine of the angle between two vectors in a vector space as a measure of their difference. A cosine value closer to 1 and an angle closer to 0 indicates greater similarity between the two vectors; conversely, a cosine value closer to 0 and an angle closer to 90 degrees indicates less similarity. The cosine distance between the two vectors, thus yielding a similarity score, is obtained through this calculation.

[0091] It is understandable that the first word vector mentioned above refers to a word vector in the word vector of the source library function, and the second word vector mentioned above refers to a word vector in the word vector of the target library function.

[0092] In operation S340, the preset mapping interval of the similarity between the first word vector and the second word vector is determined.

[0093] In operation S350, the function name mapping relationship is determined based on the preset mapping interval where the similarity is located.

[0094] Specifically, the preset mapping interval refers to a range within a predefined threshold, which can be greater than a certain threshold, less than a certain threshold, or between two thresholds. Using a function from the source database as a benchmark, similarity is calculated between the word vectors and those from multiple target database functions. Word vectors with similarity scores greater than a certain similarity threshold are taken as synonym vectors (this can be one or more), or the function with the highest similarity score among all calculated similarities is taken as the synonym vector. Of course, the mapping relationship includes not only synonyms (or closely related words), but also words with opposite meanings.

[0095] Operate S230 to obtain input parameters.

[0096] Input parameters can be pre-configured manually or pre-configured by the machine according to certain logic. The logic for manual pre-configuration will not be elaborated here. The following will detail the method of pre-configuring by the machine according to certain logic, as shown below:

[0097] Figure 5 schematically illustrates a flowchart of an input parameter generation method according to an embodiment of the present disclosure.

[0098] Figure 6A schematically illustrates a structural block diagram of a generative adversarial network according to an embodiment of the present disclosure.

[0099] Figure 6B schematically illustrates a block diagram of another generative adversarial network according to an embodiment of the present disclosure.

[0100] As shown in Figure 5, the data cleaning method of this embodiment includes operations S510 to S550, which are performed at least before operation S230.

[0101] According to embodiments of this disclosure, the input parameters are generated by a generative adversarial network.

[0102] In the S510 operation, the true input parameter samples and random noise are obtained.

[0103] According to embodiments of this disclosure, the true input parameter samples include input parameter samples containing input parameter type labels and input parameter samples not containing input parameter type labels.

[0104] Specifically, the input parameters of the function are split to obtain parameters of various types such as dates, numbers, and strings. A small number of parameter data are then labeled according to their type (semi-supervised learning data). The labeled and unlabeled raw data are used as real samples in the training dataset. Of course, these samples need to be quantized before being used in the discriminator, participating in the calculation as vectors.

[0105] In operation S520, pseudo-input parameter samples are generated by a generator based on the random noise.

[0106] The random noise can also exist in the form of a vector, or it can exist in the form of numbers, characters, etc., and then be converted into a vector form as a pseudo-input parameter sample.

[0107] In operation S530, based on the true input parameter sample and the false input parameter sample, a discriminator is used to make a judgment and obtain a judgment result. The judgment result includes a first judgment result and a second judgment result. The first judgment result is the input parameter sample that the discriminator judges to be true, and the second judgment result is the input parameter sample that the discriminator judges to be false.

[0108] In operation S540, the input parameter sample that the discriminator identifies as true is used as the input parameter.

[0109] In operation S550, the input parameter samples identified as false by the discriminator are passed to the generator to optimize the generation logic of the false input parameter samples in the generator.

[0110] As shown in Figure 6A, the generator and discriminator compete with each other. The generator deceives the discriminator into believing that the generated samples are genuine input samples, while the discriminator correctly classifies real and generated samples. Specifically, the input network is trained through steps such as feature vector extraction to generate pseudo-samples similar to the original data samples. Simultaneously, it continuously optimizes data judged as pseudo-samples, gradually improving its own network so that the generated data is not detected by the discriminator. The discriminator is responsible for determining whether the input samples are real or generated. Through training and classification, the discriminator continuously optimizes its own network to make its judgments more accurate. Samples judged as real are classified and output as input samples, while samples judged as fake are returned to the generator, creating an adversarial relationship.

[0111] Furthermore, the generative adversarial network (GAN) in the embodiments of this disclosure can be a semi-supervised GAN. Semi-supervised learning differs from supervised learning (where each sample in the dataset has a label) and unsupervised learning (where no labels are used). It provides class labels only for a small subset of the training dataset, classifying new samples from this small subset of labeled data points to effectively classify them. A semi-supervised GAN is a type of GAN where the discriminator is a multi-classifier that classifies correctly identified samples into their corresponding categories and excludes incorrectly identified samples. The goal is to generate pseudo-data to help the discriminator learn relevant patterns in the data, perfectly fitting the distribution of the real data so that the discriminator cannot distinguish between real and pseudo-data. After training, the discriminator module outputs the classification type as a classifier.

[0112] As shown in Figure 6B, unlike Figure 6A, the discriminator in 6B also has the ability to classify when the input is true.

[0113] The generator training involves using a random noise vector "z". By calculating G(z) to fit the distribution of the real data, pseudo-samples "x*" are generated. The generator is trained by backpropagating the discriminator loss D(x*) to trick the discriminator into misclassifying the pseudo-samples as real samples. For discriminator training: the discriminator receives input from three classes of data (pseudo-samples (x*) obtained by the generator, real unlabeled samples (x), and real labeled data samples (x, y), where y is the label of the sample). 1) Distinguishing between real and pseudo samples (unsupervised): The trainable parameters of the discriminator are updated by calculating the losses of D(x) and D(x*) and backpropagating the total loss of binary classification to minimize the loss, thus training the discriminator. The sigmoid function is used to calculate the unsupervised binary classification probability to distinguish between real and pseudo samples. 2) Accurately classifying real sample labels (supervised): The loss of D(x, y) is calculated and backpropagated to minimize the multi-class classification loss. The softmax function is used to calculate the supervised multi-class classification probability to accurately classify samples judged as real. 3. The discriminator acts as a classifier, outputting classifications to distinguish between pseudo-samples and real samples, and determining the correct category for real samples.

[0114] For example, data samples are acquired in a business system, including unlabeled real samples x and a small number of real samples (x, y) with class labels, and input into the discriminator. The sample labels are divided into three categories (numerical, date, and character), labeled 0, 1, and 2. The generator adds an input noise vector z to the parameter training G(z), mapping it to pseudo-samples x*, making x* fit the real samples as closely as possible, and inputs it into the discriminator. Simultaneously, the generator retrains to generate more realistic pseudo-samples x* by obtaining samples judged as fake by the discriminator D(x*), and inputs them into the discriminator. The discriminator is trained on the three classes of data D(x), D(x*), and D(x, y) respectively. A sigmoid function is used for binary classification, and its parameters are trained using backpropagation of binary cross-entropy loss, outputting the probability of samples being real or fake. A softmax function is used, which provides a probability distribution over a given number of classes (3 classes in this example). The higher the probability of a given class label, the more confident the discriminator is that the sample belongs to that class, assigning the class label to the real samples and outputting a multi-class classification.

[0115] It should be noted that generative adversarial networks are generative model frameworks that simulate global data and are mostly used in the field of continuous data generation such as images. They are rarely used in the field of text generation (or in the field of parameter generation disclosed herein).

[0116] In operation S240, based on the input parameters, the plurality of source library functions and the plurality of target library functions that have the function name mapping relationship are executed to obtain the output parameters.

[0117] Specifically, mapping relationships can take many forms, such as synonym relationships and antonym relationships. Among these, output testing is performed on functions with synonym relationships (potentially one-to-many). Furthermore, testing is conducted across multiple dimensions using a massive amount of input parameters to determine whether the output parameters remain consistent across different dimensions.

[0118] Figure 7 schematically illustrates a flowchart of an output parameter calculation method according to an embodiment of the present disclosure.

[0119] As shown in Figure 7, the output parameter calculation method of this embodiment includes operation S710, which can at least perform the above-mentioned operation S240.

[0120] In operation S710, the input parameters are input to the source library function and the target library function that have the aforementioned synonym relationship, in order to obtain output parameters. The input parameters include parameter type, number of parameters, and parameter values. Of course, financial symbols are also included.

[0121] Specifically, parameter type refers to the type of parameter, which can generally be, for example, numbers, text, characters, etc.

[0122] This can be achieved by executing SQL scripts containing functions. The execution results are then compared. By combining function names with a large number of input parameters of different types, quantities, and values, tens of thousands of test cases are constructed to simulate real-world business scenarios. This verifies the accuracy of the business scenario migration as much as possible and identifies potential business risks that may arise from the migration and transformation in advance.

[0123] For example, the differences in output between local currency symbols when converting numeric types from heterogeneous databases are shown below:

[0124] SELECT to_char(66.66,′L99.99′)FROM dual;--¥66.66

[0125] SELECT to_char(66.66,′L99.99′);--$66.66

[0126] Here, "66.66, 'L99.99'" are the input parameters of two heterogeneous functions. "¥66.66" and "$66.66" are different results obtained by executing the corresponding functions with the same input parameters; the former is "¥" and the latter is "$". This may be an issue related to the currency symbol dimension.

[0127] For another example, heterogeneous databases show differences in the output of truncation functions, as shown below:

[0128] SELECT trunc(164.67,-1.6)FROM dual;--160

[0129] SELECT trunc(164.67,-1.6);--100

[0130] The two truncation functions mentioned above use different methods for node truncation: one truncates the integer part, while the other rounds it to the nearest whole number. This results in different values ​​being output. Therefore, the output will differ depending on the range of parameter values.

[0131] Of course, regarding the number of parameters, some function parameters are optional and not required to be executed. Therefore, you can choose different input parameters to test whether the results are consistent. This will not be elaborated further here.

[0132] In operation S250, based on the differences in the output parameters, the function classification of the source library functions is output, and the function classification includes at least the direct transfer category.

[0133] Figure 8 schematically illustrates a flowchart of a function classification output method according to an embodiment of the present disclosure.

[0134] As shown in Figure 8, the function classification output method of this embodiment includes operation S810, which can at least perform the above-mentioned operation S250.

[0135] In operation S810, if the source library function and the target library function are synonyms and the output parameters are consistent, then the function classification of the source library function is determined to be the direct migration category.

[0136] Of course, besides the direct migration category in operation S810 mentioned above, this also includes cases where the function name is synonymous but the output differs, the function name is not synonymous but the output is the same, and the function name and output differ. These cases can also be categorized. For the two cases of function names being synonymous but the output differing, and function names being not synonymous but the output being the same, corresponding prompts can be set during database migration to provide hints and speed up the processing. For example, a list of differences can be generated for functions with differing outputs as a prompt.

[0137] In the embodiments of this disclosure, the function name mapping relationship of heterogeneous databases is obtained by calculating similarity through word vectors. Under this mapping relationship, different input parameters are used to ensure full coverage of the test results. Then, the function is classified according to the execution results to guide the migration of heterogeneous databases, reduce the migration cost of heterogeneous databases, and improve the migration efficiency, accuracy and compatibility of heterogeneous databases.

[0138] Figure 9 schematically illustrates a flowchart of a heterogeneous database migration method according to an embodiment of the present disclosure.

[0139] As shown in Figure 9, the heterogeneous database migration method of this embodiment includes operations S910 to S930.

[0140] In operation S910, the function name mapping relationship, function classification and source database data are obtained, and the source database data includes source library functions.

[0141] In operation S920, the target library function is found based on the source library function through the mapping relationship.

[0142] In operation S930, direct migration is performed based on the source library function corresponding to the direct migration category in the function classification.

[0143] According to embodiments of this disclosure, the function name mapping relationship and the function classification are obtained by performing the above-described heterogeneous database function classification method.

[0144] During the migration phase, in cases of the direct migration category mentioned above, the script is directly generated for the target database. In cases other than the direct migration category, the SQL syntax is reconstructed based on the mapping relationship and converted into the corresponding script for the target database.

[0145] In the embodiments of this disclosure, the function name mapping relationship of heterogeneous databases is obtained by calculating similarity through word vectors. Under this mapping relationship, different input parameters are used to ensure full coverage of the test results. Then, the function is classified according to the execution results to guide the migration of heterogeneous databases, reduce the migration cost of heterogeneous databases, and improve the migration efficiency, accuracy and compatibility of heterogeneous databases.

[0146] Based on the above-described heterogeneous database function classification and heterogeneous database migration methods, this disclosure also provides a heterogeneous database function classification and heterogeneous database migration apparatus. The apparatus will be described in detail below with reference to Figures 10 and 11.

[0147] Figure 10 schematically illustrates a structural block diagram of a heterogeneous database function classification apparatus according to an embodiment of the present disclosure.

[0148] As shown in Figure 10, the heterogeneous database function classification device 1000 of this embodiment includes a classification element acquisition module 1010, a similarity calculation module 1020, an input parameter acquisition module 1030, a function execution module 1040, and a function classification module 1050.

[0149] The classification element acquisition module 1010 is used to acquire a source database function set and a target database function set. The source database function set includes multiple source library functions, each with a source library function name. The target database function set includes multiple target library functions, each with a target library function name. In one embodiment, the classification element acquisition module 1010 can be used to perform the operation S210 described above, which will not be repeated here.

[0150] The similarity calculation module 1020 is used to calculate the similarity between multiple source library function names and multiple target library function names using word vectors, thereby obtaining the function name mapping relationship. In one embodiment, the similarity calculation module 1020 can be used to perform the operation S220 described above, which will not be repeated here.

[0151] The input parameter acquisition module 1030 is used to acquire input parameters. In one embodiment, the input parameter acquisition module 1030 can be used to perform the operation S230 described above, which will not be repeated here.

[0152] The function execution module 1040 is used to execute the plurality of source library functions and the plurality of target library functions that have the function name mapping relationship based on the input parameters, and obtain output parameters. In one embodiment, the function execution module 1040 can be used to execute the operation S240 described above, which will not be repeated here.

[0153] The function classification module 1050 is used to output the function classification of the source library functions based on the differences in the output parameters, wherein the function classification includes at least the direct transfer category. In one embodiment, the function classification module 1050 can be used to perform the operation S250 described above, which will not be repeated here.

[0154] In the embodiments of this disclosure, the function name mapping relationship of heterogeneous databases is obtained by calculating similarity through word vectors. Under this mapping relationship, different input parameters are used to ensure full coverage of the test results. Then, the function is classified according to the execution results to guide the migration of heterogeneous databases, reduce the migration cost of heterogeneous databases, and improve the migration efficiency, accuracy and compatibility of heterogeneous databases.

[0155] According to embodiments of this disclosure, the similarity calculation module is configured to: clean the plurality of source library function names and the plurality of target library function names respectively; convert the cleaned plurality of source library function names and the plurality of target library function names into word vectors respectively, to obtain plurality of source library function word vectors and plurality of target library function word vectors; calculate the similarity between the plurality of source library function word vectors and the plurality of target library function word vectors, wherein the plurality of source library function word vectors include at least a first word vector and the plurality of target library function word vectors include at least a second word vector; determine a preset mapping interval in which the similarity between the first word vector and the second word vector lies; and determine the function name mapping relationship based on the preset mapping interval in which the similarity lies.

[0156] According to an embodiment of this disclosure, the similarity calculation module is used to verify whether the plurality of source library function names and the plurality of target library function names match a preset error reporting condition; and when the plurality of source library function names and the plurality of target library function names match the preset error reporting condition, to perform error correction processing according to the error reporting condition.

[0157] According to an embodiment of this disclosure, the input parameters are generated by a generative adversarial network (GAN). The apparatus includes: a test parameter generation module for acquiring true input parameter samples and random noise; generating pseudo input parameter samples using a generator based on the random noise; judging the true input parameter samples and the pseudo input parameter samples using a discriminator to obtain a discrimination result, the discrimination result including a first discrimination result and a second discrimination result, wherein the first discrimination result is an input parameter sample judged as true by the discriminator, and the second discrimination result is an input parameter sample judged as false by the discriminator; using the input parameter samples judged as true by the discriminator as input parameters; and inputting the input parameter samples judged as false by the discriminator into the generator to optimize the generation logic of pseudo input parameter samples in the generator.

[0158] According to embodiments of this disclosure, the true input parameter samples include input parameter samples containing input parameter type labels and input parameter samples not containing input parameter type labels.

[0159] According to an embodiment of this disclosure, the function name mapping relationship includes at least a synonym relationship. The function execution module is used to input the input parameters to the source library function and the target library function that have the synonym relationship, so as to execute and obtain output parameters. The input parameters include parameter type, parameter number and parameter value.

[0160] According to an embodiment of this disclosure, the function classification module is used to determine that the source library function is classified as a direct migration category when the source library function and the target library function are synonyms and the output parameters are consistent.

[0161] According to embodiments of this disclosure, any multiple modules among the classification element acquisition module 1010, similarity calculation module 1020, input parameter acquisition module 1030, function execution module 1040, and function classification module 1050 can be combined into one module, or any one of these modules can be split into multiple modules. Alternatively, at least some of the functions of one or more of these modules can be combined with at least some of the functions of other modules and implemented in one module. According to embodiments of this disclosure, at least one of the classification element acquisition module 1010, similarity calculation module 1020, input parameter acquisition module 1030, function execution module 1040, and function classification module 1050 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging the circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, at least one of the classification element acquisition module 1010, similarity calculation module 1020, input parameter acquisition module 1030, function execution module 1040, and function classification module 1050 can be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is run.

[0162] Figure 11 schematically illustrates a structural block diagram of a heterogeneous database migration apparatus according to an embodiment of the present disclosure.

[0163] As shown in Figure 11, the heterogeneous database migration device 1100 of this embodiment includes a migration element preparation module 1110, a migration target search module 1120, and a migration execution module 1130.

[0164] The migration element preparation module 1110 is used to obtain function name mapping relationships, function classifications, and source database data, wherein the source database data includes source library functions. In one embodiment, the migration element preparation module 1110 can be used to perform the operation S910 described above, which will not be repeated here.

[0165] The migration target lookup module 1120 is used to look up target library functions based on the source library functions and through the mapping relationship. In one embodiment, the migration target lookup module 1120 can be used to perform the operation S920 described above, which will not be repeated here.

[0166] The migration execution module 1130 is used to perform direct migration based on the source library functions corresponding to the direct migration category in the function classification. In one embodiment, the migration execution module 1130 can be used to execute the operation S930 described above, which will not be repeated here.

[0167] In the embodiments of this disclosure, the function name mapping relationship of heterogeneous databases is obtained by calculating similarity through word vectors. Under this mapping relationship, different input parameters are used to ensure full coverage of the test results. Then, the function is classified according to the execution results to guide the migration of heterogeneous databases, reduce the migration cost of heterogeneous databases, and improve the migration efficiency, accuracy and compatibility of heterogeneous databases.

[0168] According to embodiments of this disclosure, any plurality of modules in the migration element preparation module 1110, migration target lookup module 1120, and migration execution module 1130 may be combined into one module, or any one of these modules may be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of other modules and implemented in one module. According to embodiments of this disclosure, at least one of the migration element preparation module 1110, migration target lookup module 1120, and migration execution module 1130 may be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging circuitry, or implemented in any one of software, hardware, and firmware methods, or in a suitable combination of any of these methods. Alternatively, at least one of the migration element preparation module 1110, migration target search module 1120, and migration execution module 1130 may be implemented at least partially as a computer program module, which can perform corresponding functions when the computer program module is run.

[0169] Figure 12 schematically illustrates a block diagram of an electronic device suitable for implementing heterogeneous database function classification and heterogeneous database migration methods according to embodiments of the present disclosure.

[0170] As shown in FIG12, an electronic device 1200 according to an embodiment of the present disclosure includes a processor 1201, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1202 or a program loaded from a storage portion 1208 into a random access memory (RAM) 1203. The processor 1201 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 1201 may also include onboard memory for caching purposes. The processor 1201 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0171] RAM 1203 stores various programs and data required for the operation of electronic device 1200. Processor 1201, ROM 1202, and RAM 1203 are interconnected via bus 1204. Processor 1201 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 1202 and / or RAM 1203. It should be noted that the programs may also be stored in one or more memories other than ROM 1202 and RAM 1203. Processor 1201 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in said one or more memories.

[0172] According to embodiments of this disclosure, the electronic device 1200 may further include an input / output (I / O) interface 1205, which is also connected to the bus 1204. The electronic device 1200 may also include one or more of the following components connected to the I / O interface 1205: an input section 1206 including a keyboard, mouse, etc.; an output section 1207 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a LAN card, modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to the I / O interface 1205 as needed. A removable medium 1211, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 1210 as needed so that computer programs read from it can be installed into the storage section 1208 as needed.

[0173] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.

[0174] According to embodiments of this disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this disclosure, the computer-readable storage medium may include ROM 1202 and / or RAM 1203 and / or one or more memories other than ROM 1202 and RAM 1203 described above.

[0175] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to cause the computer system to implement the methods provided in the embodiments of this disclosure.

[0176] When the computer program is executed by the processor 1201, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0177] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 1209, and / or installed from the removable medium 1211. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.

[0178] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 1209, and / or installed from the removable medium 1211. When the computer program is executed by the processor 1201, it performs the functions defined in the system of this disclosure embodiment. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0179] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0180] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0181] Those skilled in the art will understand that the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.

[0182] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.

Claims

1. A method for classifying functions in heterogeneous databases, comprising: Obtain source database function sets and target database function sets. The source database function set includes multiple source library functions, each with a source library function name. The target database function set includes multiple target library functions, each with a target library function name. Calculate the similarity between the multiple source library function names and the multiple target library function names using word vectors to obtain the function name mapping relationship. Obtain input parameters; wherein the input parameters are generated based on an adversarial neural network; based on the input parameters, execute the plurality of source library functions and the plurality of target library functions that have the function name mapping relationship to obtain output parameters; and based on the differences in the output parameters, output the function classification of the source library functions, wherein the function classification includes at least the direct transfer category; wherein, the step of outputting the function classification of the source library functions based on the differences in the output parameters includes: if the source library functions and the target library functions are synonyms and the output parameters are consistent, then the function classification of the source library functions is determined to be the direct transfer category; wherein, The method for generating the input parameters includes: acquiring true input parameter samples and random noise; generating pseudo input parameter samples using a generator based on the random noise; judging the true input parameter samples and the pseudo input parameter samples using a discriminator to obtain a discrimination result, wherein the discrimination result includes a first discrimination result and a second discrimination result, wherein the first discrimination result is an input parameter sample judged as true by the discriminator, and the second discrimination result is an input parameter sample judged as false by the discriminator; using the input parameter samples judged as true by the discriminator as input parameters; and passing the input parameter samples judged as false by the discriminator into the generator to optimize the generation logic of pseudo input parameter samples in the generator.

2. The method according to claim 1, wherein, The step of calculating the similarity between multiple source library function names and multiple target library function names using word vectors to obtain function name mapping relationships includes: cleaning the multiple source library function names and the multiple target library function names respectively; converting the cleaned multiple source library function names and the multiple target library function names into word vectors respectively, obtaining multiple source library function word vectors and multiple target library function word vectors; calculating the similarity between the multiple source library function word vectors and the multiple target library function word vectors, wherein the multiple source library function word vectors include at least a first word vector and the multiple target library function word vectors include at least a second word vector; determining a preset mapping interval in which the similarity between the first word vector and the second word vector lies; and determining the function name mapping relationship based on the preset mapping interval in which the similarity lies.

3. The method according to claim 2, wherein, The step of cleaning the plurality of source library function names and the plurality of target library function names includes: verifying whether the plurality of source library function names and the plurality of target library function names match a preset error reporting condition; and, if the plurality of source library function names and the plurality of target library function names match the preset error reporting condition, performing error correction processing according to the error reporting condition.

4. The method according to claim 1, wherein, The true input parameter samples include input parameter samples that contain input parameter type labels and input parameter samples that do not contain input parameter type labels.

5. The method according to claim 2, wherein, The function name mapping relationship includes at least a synonym relationship. The step of executing the plurality of source library functions and the plurality of target library functions that have the function name mapping relationship based on the input parameters to obtain output parameters includes: inputting the input parameters into the source library functions and the target library functions that have the synonym relationship to obtain output parameters, wherein the input parameters include parameter type, number of parameters and parameter values.

6. A method for migrating heterogeneous databases, comprising: Obtain function name mapping relationships, function categories, and source database data, wherein the source database data includes source library functions; Based on the source library functions, the target library functions are found through the mapping relationship; And perform direct migration based on the source library functions corresponding to the direct migration categories in the function classification, wherein the function name mapping relationship and the function classification are obtained by performing the method according to any one of claims 1 to 5.

7. A heterogeneous database function classification device, comprising: The classification element acquisition module is used to acquire source database function sets and target database function sets. The source database function set includes multiple source library functions, each of which includes a source library function name. The target database function set includes multiple target library functions, each of which includes a target library function name. The similarity calculation module is used to calculate the similarity between multiple source library function names and multiple target library function names using word vectors, and obtain the function name mapping relationship; An input parameter acquisition module is used to acquire input parameters, wherein the input parameters are generated based on an adversarial neural network; a function execution module is used to execute, based on the input parameters, a plurality of source library functions and a plurality of target library functions that have a function name mapping relationship, to obtain output parameters; and a function classification module is used to output the function classification of the source library functions based on the differences in the output parameters, wherein the function classification includes at least a direct transfer category; wherein, outputting the function classification of the source library functions based on the differences in the output parameters includes: if the source library functions and the target library functions are synonyms and the output parameters are consistent, then determining the function of the source library functions. The data is classified as a direct transfer category; wherein, the method for generating the input parameters includes: obtaining true input parameter samples and random noise; generating pseudo input parameter samples through a generator based on the random noise; judging the true input parameter samples and the pseudo input parameter samples through a discriminator to obtain a discrimination result, the discrimination result including a first discrimination result and a second discrimination result, the first discrimination result being the input parameter samples judged as true by the discriminator, and the second discrimination result being the input parameter samples judged as false by the discriminator; using the input parameter samples judged as true by the discriminator as input parameters; and passing the input parameter samples judged as false by the discriminator into the generator to optimize the generation logic of pseudo input parameter samples in the generator.

8. A heterogeneous database migration device, comprising: The migration element preparation module is used to obtain function name mapping relationships, function classifications, and source database data, wherein the source database data includes source library functions. The migration target lookup module is used to find the target library function based on the source library function and through the mapping relationship; And a migration execution module, used to perform direct migration based on the source library functions corresponding to the direct migration categories in the function classification, wherein the function name mapping relationship and the function classification are obtained by executing the method according to any one of claims 1 to 5.

9. An electronic device, comprising: One or more processors; A storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to perform the method according to any one of claims 1 to 6.

10. A computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 6.

11. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Data conversion method and device, server and storage medium

    CN114416847A

  • Cross-city time series data migration prediction method and system

    CN115422994A