Data model conversion method and device and computer readable storage medium
By obtaining the model transfer relationship map and conversion rules, the data model to be converted is converted into an intermediate data model. Through detection and adjustment, the problem of low conversion efficiency of data model in the upgrade and transformation of information system is solved, and a fast and accurate data model is realized Conversion and difference processing reduce costs.
Patent Information
- Application Number
- CN202411173817.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-12-13
AI Technical Summary
During the upgrade and transformation of the information system, the data model conversion efficiency is low, resulting in the risk of data loss, error or leakage during the data model conversion process, and it requires repeated testing and verification, which is time-consuming and labor-intensive.
By obtaining the model transfer relationship graph and model conversion rules, the data model to be converted is converted into an intermediate data model, and adjusting it by detecting the model difference information until the intermediate data model is adjusted to the target data model, and the characteristics are determined using the neural network. Adjust the difference information and the generated target script.
It realizes the rapid and accurate comparison and conversion processing of data models, reduces labor and time costs, and improves the efficiency and accuracy of data model conversion.
Smart Images

Figure CN119127987A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the fields of computer technology and software technology, and in particular to a data model conversion method, device and computer-readable storage medium. Background Art
[0002] During the digital transformation of various types of enterprises, it not only involves the redesign and optimization of business processes, but also includes the upgrade and transformation of existing information systems. In this process, data model conversion and data migration have become key and complex steps. The data model is the basic architecture that defines how data is stored, organized, and processed. It includes elements such as data structure, relationships, and constraints. Due to the significant differences between the data models of the old and new information systems, such as different structures, additions and deletions of fields, and changes in relationships, data model conversion becomes a complex and time-consuming process.
[0003] Usually, the data model conversion for information system upgrade is to analyze the old and new models, including data structure, data type, table relationship, constraints, etc. Compare them one by one and define mapping rules, including field-to-field mapping, data type conversion, conversion default value setting, data cleaning rules, etc., and write customized scripts according to the mapping rules. These scripts are used to automate the data conversion process (data extraction, conversion and loading). Any data errors or inconsistencies found during the migration process require further data cleaning and optimization to write corresponding scripts to adapt to the performance and storage requirements of the new system.
[0004] In the above method, each system upgrade requires a lot of time to sort out and analyze the data model to determine which version to choose and which script package programs to reuse from the model upgrade mapping rules and customized scripts of the historically completed customer system, and then revise and compile them to form a new customer system upgrade script package. Although this method can reduce the workload to a certain extent by reusing historical scripts, there may still be risks of data loss, errors or leakage during data model conversion and data migration, which requires repeated testing and verification, revision and correction, which is time-consuming and laborious.
[0005] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0006] The present application provides a data model conversion method, device and computer-readable storage medium to at least solve the technical problem of low data model conversion efficiency in the process of upgrading and transforming an information system in the prior art.
[0007] According to one aspect of the present application, a data model conversion method is provided, comprising: obtaining a model transfer relationship graph and a model conversion rule, wherein the model transfer relationship graph is used to represent object entities and the relationship between object entities in a data model to be converted and a target data model in the form of a graph, and the model conversion rule is a rule based on which the data model to be converted is converted into a target data model; according to the model transfer relationship graph and the model conversion rule, the data model to be converted is converted into an intermediate data model; model difference information between the intermediate data model and the target data model is detected; and the intermediate data model is adjusted according to the model difference information until the intermediate data model is adjusted to the target data model.
[0008] Optionally, in the data model conversion method provided in the present application, a model transfer relationship graph is obtained, including: generating graph nodes based on object entities in the data model to be converted and the target data model; generating edges between graph nodes based on the relationship between object entities; obtaining the creation time, update time and update source information of the graph nodes; and generating a model transfer relationship graph based on the graph nodes, the edges between the graph nodes, and the creation time, update time and update source information of the graph nodes.
[0009] Optionally, in the data model conversion method provided in the present application, obtaining model conversion rules includes: obtaining definition information of a model conversion scope, wherein the model conversion scope is used to characterize the data types, interface types, form types, and component types involved in the model conversion process; obtaining definition information of a model mapping relationship, wherein the model mapping relationship includes at least a mapping relationship of a data type, a mapping relationship of a field, and a mapping relationship of a field attribute change method; and generating model conversion rules based on the definition information of the model conversion scope and the definition information of the model mapping relationship.
[0010] Optionally, in the data model conversion method provided in the present application, the data model to be converted is converted into an intermediate data model according to the model transfer relationship map and the model conversion rules, including: obtaining a conversion strategy set by the user, wherein the conversion strategy is used to characterize the user's selection and combination of multiple conversion parameters involved in the model conversion process; based on the conversion strategy, the model transfer relationship map and the model conversion rules, the data model to be converted is converted into an intermediate data model.
[0011] Optionally, in the data model conversion method provided in the present application, the data model to be converted is converted into an intermediate data model according to the conversion strategy, the model transfer relationship map and the model conversion rules, including: reading the map information of the model transfer relationship map; performing preprocessing operations on the map information according to the conversion strategy to obtain target map information, wherein the preprocessing operation is used to filter part of the map information according to the conversion strategy and to correct erroneous information in the map information; according to the model conversion rules and the target map information, the data model to be converted is converted into an intermediate data model.
[0012] Optionally, in the data model conversion method provided in the present application, model difference information between the intermediate data model and the target data model is detected, and the intermediate data model is adjusted according to the model difference information until the intermediate data model is adjusted to the target data model, including: determining feature difference information between the intermediate data model and the target data model in M feature dimensions through a neural network, wherein M is an integer greater than 1; using the feature difference information of the M feature dimensions as model difference information; generating a target script according to the model difference information; and performing at least one adjustment operation on the intermediate data model through the target script, wherein at least one adjustment operation is used to continuously reduce the model difference between the intermediate data model and the target data model until the neural network determines that there is no feature difference between the intermediate data model and the target data model in any of the M feature dimensions, and determines that the intermediate data model is adjusted to the target data model.
[0013] Optionally, in the data model conversion method provided in the present application, after performing at least one adjustment operation on the intermediate data model through the target script, a target conversion rule is determined through a neural network based on the target script and model difference information, wherein the target conversion rule is the conversion rule used when adjusting the intermediate data model to the target data model; the model conversion rule is updated according to the target conversion rule.
[0014] Optionally, in the data model conversion method provided in the present application, the multiple conversion parameters include at least the following parameters: a conversion range parameter, which is used to characterize the data primary key identifier selected during the model conversion process, and the data primary key identifier includes at least: a user identifier corresponding to the data, a storage module identifier corresponding to the data, and a data type identifier; a deployment path parameter, which is used to characterize the database switching path selected during the model conversion process; a data conversion strategy parameter, which is used to characterize the data processing method for each type of data during the model conversion process; and a verification parameter, which is used to characterize the verification method set for the multiple selected conversion parameters.
[0015] According to another aspect of the present application, a data model conversion device is also provided, which includes: an acquisition unit, used to acquire a model transfer relationship graph and a model conversion rule, wherein the model transfer relationship graph is used to represent object entities and the relationship between object entities in a data model to be converted and a target data model in the form of a graph, and the model conversion rule is a rule based on which the data model to be converted is converted into a target data model; a conversion unit, used to convert the data model to be converted into an intermediate data model according to the model transfer relationship graph and the model conversion rule; a detection unit, used to detect model difference information between the intermediate data model and the target data model; and an adjustment unit, used to adjust the intermediate data model according to the model difference information until the intermediate data model is adjusted to the target data model.
[0016] According to another aspect of the present application, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, wherein when the computer program runs, the device where the computer-readable storage medium is located executes any one of the above-mentioned data model conversion methods.
[0017] In the present application, a model transfer relationship map and a model conversion rule are first obtained, wherein the model transfer relationship map is used to represent the object entities and the relationship between the object entities in the data model to be converted and the target data model in the form of a map, and the model conversion rule is the rule based on which the data model to be converted is converted into the target data model. Then, according to the model transfer relationship map and the model conversion rule, the data model to be converted is converted into an intermediate data model. By detecting the model difference information between the intermediate data model and the target data model, the intermediate data model is finally adjusted according to the model difference information until the intermediate data model is adjusted to the target data model.
[0018] From the above content, it can be seen that this application defines the automatic conversion algorithm and conversion strategy of the data model through the model transfer relationship map and model conversion rules, and realizes the fast and accurate comparison and conversion processing of the data model for upgrading the large-scale information system. Based on the model transfer relationship map, this application can not only quickly and accurately analyze the source data model (i.e., the data model to be converted), and realize accurate and effective extraction of relevant descriptive information of the source data model, but also determine the association relationship between different object entities in the source data model, as well as the difference relationship and mapping relationship between the source data model and the target data model, and automatically adapt the optimal conversion strategy to perform data model conversion processing.
[0019] It can be seen that the present application achieves the purpose of automatically realizing data model conversion, thereby reducing the manpower cost and time cost required for the data model conversion process, and further solving the technical problem of low data model conversion efficiency in the process of upgrading and transforming the information system in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0021] Figure 1 is a flow chart of an optional data model conversion method according to an embodiment of the present application;
[0022] Figure 2 is a schematic diagram of an optional data model conversion system according to an embodiment of the present application;
[0023] Figure 3 is a flowchart of an optional data migration process according to an embodiment of the present application;
[0024] Figure 4 is a schematic diagram of an optional different type of data migration process according to an embodiment of the present application;
[0025] Figure 5 is an optional schematic diagram of table conversion during data model conversion according to an embodiment of the present application;
[0026] Figure 6 It is a schematic diagram of a data model conversion device according to an embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] It should also be noted that the information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) collected by this application are information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data are in compliance with the relevant laws, regulations and standards of the relevant regions, necessary confidentiality measures are taken, and public order and good customs are not violated, and corresponding operation portals are provided for users to choose to authorize or refuse. For example, an interface is set up between this system and relevant users or organizations. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.
[0030] In addition, the information system referred to in the present invention includes but is not limited to various enterprise digital / information management systems, ERP systems, and various systems related to various aspects and links of enterprise operation, production, and services, such as financial management, supply chain management, production management, human resource management, sales and marketing management systems, etc. The technical solution of this application can be applied to general information system upgrade scenarios.
[0031] According to an embodiment of the present application, an embodiment of a data model conversion method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0032] Figure 1 is a flowchart of an optional data model conversion method according to an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:
[0033] Step S101, obtaining a model transfer relationship graph and model conversion rules.
[0034] In step S101, the model transfer relationship graph is used to represent the object entities and the relationship between the object entities in the data model to be converted and the target data model in the form of a graph, and the model conversion rules are the rules based on which the data model to be converted is converted into the target data model.
[0035] Optionally, a data model conversion system can be used as the execution subject of the data model conversion method of the embodiment of the present application, wherein the data model conversion system can be a software system or an embedded system combining software and hardware. In addition, in addition to using the data model conversion system as the execution subject, systems, devices or apparatuses in other forms of expression can also be used as the execution subject, and the present application does not specifically limit the type of the execution subject.
[0036] For the convenience of description, the following explanation of the solution is based on an example in which the execution subject is a data model conversion system.
[0037] Optionally, Figure 2 is a schematic diagram of an optional data model conversion system according to an embodiment of the present application, such as Figure 2 As shown, the data model conversion system includes the following components: a model transfer relationship graph construction component, a model conversion rule definition component, an automatic conversion algorithm component, an automatic conversion strategy component, and a record feedback component.
[0038] First, the model transfer relationship graph construction component and the model conversion rule definition component are introduced. Among them, the model transfer relationship graph construction component is used to pre-construct the model transfer relationship graph. For example, if the data model used by an information system in the first version is data model A, and the data model used in the second version is data model B, then when the user upgrades the information system from the first version to the second version, data model A is the data model to be converted, and data model B is the target data model. As the service provider of the information system, the service provider can pre-construct the model transfer relationship graph corresponding to the data model to be converted and the target data model through the model transfer relationship graph construction component. Among them, the nodes in the model transfer relationship graph represent the object entities in the data model (such as tables, fields, etc.), and the edges represent the relationships between the object entities (such as the subordinate relationship between fields and tables, the association relationship between tables, etc.).
[0039] The model conversion rule definition component defines a series of data model conversion rules based on the model transfer relationship graph. When defining data model conversion rules, it is necessary to consider the differences between the source data model (corresponding to the above-mentioned data model to be converted) and the target data model, including but not limited to data type mapping, field mapping, field attribute change mapping, etc.
[0040] Step S102: converting the data model to be converted into an intermediate data model according to the model transfer relationship graph and the model conversion rules.
[0041] In step S102, the automatic conversion algorithm component can construct an automatic conversion algorithm based on the model transfer relationship graph to reduce the manual intervention steps in the model conversion process. The conversion from the source data model to the target data model is understood and executed through an intelligent method. The automatic conversion algorithm is mainly designed and converted based on the data model conversion rules constructed above.
[0042] Step S103: detecting model difference information between the intermediate data model and the target data model.
[0043] Optionally, when using an automatic conversion algorithm to perform model conversion on a data model to be converted, the most ideal state is that the data model to be converted can be successfully converted into a target data model at one time. However, during the automatic conversion process, conversion differences may occur, resulting in the data model to be converted not being successfully converted into the target data model at one time. Therefore, in step S103, the data model conversion system can also detect model difference information between the intermediate data model and the target data model. The detection method can be through neural network detection or through manual intervention.
[0044] Step S104: adjusting the intermediate data model according to the model difference information until the intermediate data model is adjusted to the target data model.
[0045] Optionally, after detecting and obtaining the model difference information between the intermediate data model and the target data model, the intermediate data model can be adjusted by designing a script. The purpose of the adjustment is to optimize the similarity between the intermediate data model and the target data model until the similarity between the intermediate data model and the target data model is greater than or equal to a preset similarity (for example, 100%), which indicates that the source data model has been successfully converted into the target data model.
[0046] Optionally, during the model conversion process, the feedback recording component can record the user's log information in detail each time the data model is converted, and collect user feedback information, including user satisfaction with the model conversion results, error reports when problems are encountered, and solutions, etc. Continuous iterative optimization processing is performed through the feedback learning mechanism combined with reinforcement learning technology.
[0047] Based on the contents of the above steps S101 to S104, it can be known that in the present application, the model transfer relationship map and the model conversion rules are first obtained, wherein the model transfer relationship map is used to represent the object entities and the relationship between the object entities in the data model to be converted and the target data model in the form of a map, and the model conversion rules are the rules based on which the data model to be converted is converted into the target data model. Then, according to the model transfer relationship map and the model conversion rules, the data model to be converted is converted into an intermediate data model. By detecting the model difference information between the intermediate data model and the target data model, the intermediate data model is finally adjusted according to the model difference information until the intermediate data model is adjusted to the target data model.
[0048] From the above content, it can be seen that this application defines the automatic conversion algorithm and conversion strategy of the data model through the model transfer relationship map and model conversion rules, and realizes the fast and accurate comparison and conversion processing of the data model for upgrading the large-scale information system. Based on the model transfer relationship map, this application can not only quickly and accurately analyze the source data model (i.e., the data model to be converted), and realize accurate and effective extraction of relevant descriptive information of the source data model, but also determine the association relationship between different object entities in the source data model, as well as the difference relationship and mapping relationship between the source data model and the target data model, and automatically adapt the optimal conversion strategy to perform data model conversion processing.
[0049] It can be seen that the present application achieves the purpose of automatically realizing data model conversion, thereby reducing the manpower cost and time cost required for the data model conversion process, and further solving the technical problem of low data model conversion efficiency in the process of upgrading and transforming the information system in the prior art.
[0050] In an optional embodiment, when obtaining the model transfer relationship graph, the data model conversion system can generate graph nodes based on the object entities in the data model to be converted and the target data model; generate edges between graph nodes based on the relationship between object entities. The data model conversion system can also obtain the creation time, update time and update source information of the graph nodes; generate the model transfer relationship graph based on the graph nodes, the edges between the graph nodes, and the creation time, update time and update source information of the graph nodes.
[0051] Optionally, in the process of constructing the model transfer relationship map, the model transfer relationship map construction component can construct the model transfer relationship map based on the acquired database architecture, data model (including the data model to be converted and the target data model) and metadata information. Among them, the nodes in the model transfer relationship map are the object entities of the database (data tables, fields, etc.), and the edges represent the relationships between object entities (such as the subordinate relationship between fields and tables, the association relationship between tables, etc.). In addition, the model transfer relationship map also needs to identify the creation and update time of the nodes in the map (corresponding to the product version), as well as the update source information (customer cases, versions, problem list range, etc.) for algorithm updates and iterative optimization.
[0052] In an optional embodiment, when acquiring the model conversion rule, the data model conversion system may acquire the definition information of the model conversion scope, wherein the model conversion scope is used to characterize the data type, interface type, form type, and component type involved in the model conversion process; and acquire the definition information of the model mapping relationship, wherein the model mapping relationship at least includes the mapping relationship of the data type, the mapping relationship of the field, and the mapping relationship of the field attribute change method. Then, the data model conversion system may generate the model conversion rule according to the definition information of the model conversion scope and the definition information of the model mapping relationship.
[0053] Optionally, the model conversion rule definition refers to the rule logic for clarifying data conversion for each type of data model based on the model transfer relationship graph. The model conversion rule includes the model conversion scope and the model mapping relationship definition. The model conversion scope includes: menu, basic data (type), document data (type), voucher data, third-party interface (type), unstructured data type. Model mapping includes but is not limited to data type mapping, field mapping, field attribute change mapping, etc.
[0054] In an optional embodiment, when converting the data model to be converted into an intermediate data model according to the model transfer relationship map and the model conversion rules, the data model conversion system can obtain a conversion strategy set by the user, wherein the conversion strategy is used to characterize the user's selection and combination of multiple conversion parameters involved in the model conversion process. Then, according to the conversion strategy, the model transfer relationship map and the model conversion rules, the data model to be converted is converted into an intermediate data model.
[0055] Optionally, the above-mentioned conversion strategy can also be referred to as an automatic conversion strategy, wherein the automatic conversion strategy is generated by an automatic conversion strategy component. Specifically, the automatic conversion strategy module can realize the function of allowing the user to select and combine multiple conversion parameters and generate an automatic conversion strategy, so that when performing model conversion, the data model conversion system can automatically repair or discard potential data errors (such as data mismatch, format error, integrity problem, etc.) according to the generated automatic conversion strategy. In combination with each user's model conversion case, the model conversion result can be input into the automatic conversion strategy component, and the automatic conversion strategy component optimizes the strategy value / threshold of the corresponding automatic conversion strategy based on the model conversion result.
[0056] Optionally, the multiple conversion parameters include at least the following parameters: a conversion range parameter, which is used to characterize the data primary key identifier selected during the model conversion process, and the data primary key identifier includes at least: a user identifier corresponding to the data, a storage module identifier corresponding to the data, and a data type identifier; a deployment path parameter, which is used to characterize the database switching path selected during the model conversion process; a data conversion strategy parameter, which is used to characterize the data processing method for each type of data during the model conversion process; and a verification parameter, which is used to characterize the verification method for the selected multiple conversion parameter settings.
[0057] Optionally, the configurable parameters of the automatic conversion strategy include at least the following parameters:
[0058] Upgrade range (conversion range parameters): all units + all modules + all types; selected units + all modules + all types; selected units + all modules + selected types; selected units + selected modules + all types; selected units + single modules + all types; selected units + single modules + single types; single units + all modules + all types; single units + selected modules + all types; single units + selected modules + selected types; single units + single modules + selected types; single units + single modules + single types. Among them, "unit" is a user identifier; "module" is a storage module identifier; "type" is a data type identifier.
[0059] Deployment path parameters: configuration library-simulation library-target library; configuration library-target library. For example, Figure 3As shown, when it is necessary to upgrade the production database of information system version 6 / 7 / 8 to the production database of information system version 9, first determine whether it is necessary to create a simulation database of information system version 9. If necessary, create the simulation database of information system version 6 / 7 / 8 and the simulation database of information system version 9; if not, only need to create the simulation database of information system version 9. After creating the simulation database of information system version 9, it is also necessary to determine whether to create a configuration database of information system version 9. If so, create the configuration database of information system version 9, and after the configuration database is formally configured and imported into a production database, the data in the production database of information system version 6 / 7 / 8 is migrated to the production database, and then the production database of information system version 9 can be obtained. After the platform application service is deployed and verified successfully, the system switch can be formally carried out to realize the application service of information system version 9. If it is not necessary to create the configuration database of information system version 9, the configuration database of information system version 9 is not created for system configuration and configuration transmission.
[0060] Data type parameters: structured data (standard menu, custom menu, basic data, documents and models, etc.), unstructured data. For example, Figure 4 As shown, this application supports the migration of structured data (such as structured data tables of oracle or MySql databases of information system 8 and previous versions) and unstructured data (such as large fields of DB database + file data of file system). The data migration process includes the conversion of data models, and finally the structured data can be migrated to the target database (such as the production database of information system 9 version) by updating the path, etc.; the unstructured data can be migrated to the external system (such as the unstructured platform system) by uploading files.
[0061] Data conversion strategy parameters: support data processing methods such as multi-table storage merging, dimension splitting, and various ETL conversions.
[0062] Standard menu configuration parameters: full coverage; corresponding coverage; difference upgrade; difference discard.
[0063] Custom menu configuration parameters: corresponding overwrite; difference upgrade; difference discard.
[0064] Basic data configuration parameters: full coverage; corresponding coverage; difference upgrade; difference discard.
[0065] Table configuration parameters: used to set the conversion processing method when the table structure remains unchanged and the table name and field name are changed / unchanged; the conversion processing method for each type of field; the conversion processing method for different types of data tables and different magnitudes of data. For example, Figure 5As shown, the original business detail table can be converted into a new storage reconstruction design table, or the original business detail table and the original business auxiliary detail table can be converted into a new storage reconstruction design table.
[0066] Configuration parameters of the integration interface: data pull mode or data push mode.
[0067] Data archiving configuration parameters: used to configure the archiving processing method for unstructured data.
[0068] Initialization configuration parameters: used to configure initialization methods such as upgrade synchronization preset, import after upgrade, and no processing.
[0069] Verification parameters are used to determine the feasibility of the transformation parameter selection combination.
[0070] In an optional embodiment, the data model to be converted is converted into an intermediate data model according to a conversion strategy, a model transfer relationship map and a model conversion rule, including: reading the map information of the model transfer relationship map; performing a preprocessing operation on the map information according to the conversion strategy to obtain target map information, wherein the preprocessing operation is used to filter part of the map information according to the conversion strategy and to correct erroneous information in the map information; according to the model conversion rule and the target map information, the data model to be converted is converted into an intermediate data model.
[0071] Optionally, the automatic conversion algorithm component can traverse the model transfer relationship graph, read and obtain the graph information, and then the automatic conversion strategy component performs preprocessing operations on the graph information according to the conversion strategy to obtain the target graph information, wherein the preprocessing operation is used to filter part of the graph information according to the conversion strategy and correct the erroneous information in the graph information. Subsequently, the automatic conversion algorithm component automatically performs model conversion on the data model to be converted according to the defined model conversion rules.
[0072] In addition, the automatic conversion algorithm component can also verify the model conversion results through built-in logic and tools to ensure that the conversion meets the requirements of the target data model. By collecting and analyzing feedback information during the conversion process, the automatic conversion algorithm component can continuously optimize the model conversion rules to improve the efficiency and accuracy of subsequent conversion operations.
[0073] In an optional embodiment, the data model conversion system may determine feature difference information between the intermediate data model and the target data model in M feature dimensions through a neural network, where M is an integer greater than 1. Then, the data model conversion system may use the feature difference information of the M feature dimensions as model difference information; and generate a target script based on the model difference information. Finally, the data model conversion system performs at least one adjustment operation on the intermediate data model through the target script, wherein at least one adjustment operation is used to continuously reduce the model difference between the intermediate data model and the target data model, until the neural network determines that there is no feature difference between the intermediate data model and the target data model in any of the M feature dimensions, and determines that the intermediate data model is adjusted to the target data model.
[0074] Optionally, the data model conversion system can use a machine learning algorithm (such as a convolutional kernel neural network, a recurrent neural network) to automatically extract and identify model difference information between the intermediate data model and the target data model, and then generate a target script based on the model difference information, and perform at least one adjustment operation on the intermediate data model through the target script, wherein the at least one adjustment operation is used to continuously narrow the model difference between the intermediate data model and the target data model until the neural network determines that there is no feature difference between the intermediate data model and the target data model in any of the M feature dimensions, and determines that the intermediate data model is adjusted to the target data model.
[0075] Optionally, model difference information can be recorded in the system log generated during the model conversion process, where the feedback recording component records the log information of each model conversion in detail, and classifies and analyzes the error reports and solutions (such as target scripts) that occur during the model conversion process reported by users (including analysis of user feedback and problems automatically detected by the system) to determine whether it is caused by defects in the algorithm itself, quality issues of customer data, or inappropriate rule settings. It is also possible to perform performance analysis on the data model conversion process, extract data volume thresholds for different data model conversions, strengthen the algorithm's machine learning, and iteratively update the corresponding model conversion rules, so as to autonomously learn and adapt to the ever-changing data environment and user needs. The optimization of model conversion rules mainly includes:
[0076] Function upgrade optimization: Analyze the function (menu) upgrade differences after the data model upgrade of different products or versions, optimize the function layering information based on the analysis results, and update the corresponding model conversion strategy.
[0077] Data upgrade optimization: Analyze the differences in data models and data conversion after upgrading data models for different products or versions, and optimize model conversion strategies.
[0078] Integration interface optimization: Analyze the differences in integration conversion after upgrading the data models of different products or versions, and optimize the integration mapping relationship, integration component model, and integration conversion strategy.
[0079] In an optional embodiment, after performing at least one adjustment operation on the intermediate data model through the target script, the data model conversion system can determine the target conversion rule based on the target script and the model difference information through the neural network, wherein the target conversion rule is the conversion rule used when adjusting the intermediate data model to the target data model. Then, the data model conversion system can update the model conversion rule according to the target conversion rule.
[0080] Optionally, the data model conversion system can combine the problem list and solutions recorded by the feedback component (data model mapping relationship differences, field naming changes, relationship constraints and relationship structure adjustments, etc.), automatically learn the target conversion rules and patterns through a neural network, and update the original model conversion rules accordingly, thereby achieving continuous optimization of the conversion rules to improve the efficiency and accuracy of subsequent system upgrade data conversion. Technical effect.
[0081] From the above content, it can be seen that the present application provides a data model conversion method and system based on knowledge graph, which aims to automatically complete the conversion of data models and data migration by utilizing the semantic understanding and reasoning ability of knowledge graph. Compared with the traditional processing method of comparing data models, tables, and fields one by one, marking version numbers, and updating migration according to corresponding interface customized scripts, the present application constructs a model transfer relationship graph, and uses automatic conversion algorithms and model conversion rules to convert and migrate the source data model to the target data model, thereby significantly improving the efficiency and accuracy of model conversion. In addition, the present application also provides a feedback learning mechanism for realizing continuous iterative optimization of data model transfer relationship graphs and automatic conversion algorithms, so as to better meet the needs of various customer data migration scenarios and ensure high-quality data migration.
[0082] According to another aspect of the present application, a data model conversion device is also provided, wherein: Figure 6 is a schematic diagram of a data model conversion device according to an embodiment of the present application, such as Figure 6 As shown, the data model conversion device includes: an acquisition unit 601, a conversion unit 602, a detection unit 603 and an adjustment unit 604.
[0083] Among them, the acquisition unit 601 is used to obtain the model transfer relationship map and the model conversion rules, wherein the model transfer relationship map is used to represent the object entities and the relationship between the object entities in the data model to be converted and the target data model in the form of a map, and the model conversion rules are the rules based on which the data model to be converted is converted into the target data model; the conversion unit 602 is used to convert the data model to be converted into an intermediate data model according to the model transfer relationship map and the model conversion rules; the detection unit 603 is used to detect the model difference information between the intermediate data model and the target data model; the adjustment unit 604 is used to adjust the intermediate data model according to the model difference information until the intermediate data model is adjusted to the target data model.
[0084] Optionally, the acquisition unit 601 includes: a first processing subunit, a second processing subunit, a first acquisition subunit, and a third processing subunit. The first processing subunit is used to generate graph nodes based on object entities in the data model to be converted and the target data model; the second processing subunit is used to generate edges between graph nodes based on the relationship between object entities; the first acquisition subunit is used to obtain the creation time, update time and update source information of the graph nodes; the third processing subunit is used to generate a model transfer relationship graph based on the graph nodes, the edges between the graph nodes, and the creation time, update time and update source information of the graph nodes.
[0085] Optionally, the acquisition unit 601 includes: a second acquisition subunit, a third acquisition subunit and a fourth processing subunit. The second acquisition subunit is used to acquire the definition information of the model conversion scope, wherein the model conversion scope is used to characterize the data type, interface type, form type and component type involved in the model conversion process; the third acquisition subunit is used to acquire the definition information of the model mapping relationship, wherein the model mapping relationship at least includes the mapping relationship of the data type, the mapping relationship of the field and the mapping relationship of the field attribute change method; the fourth processing subunit is used to generate the model conversion rule according to the definition information of the model conversion scope and the definition information of the model mapping relationship.
[0086] Optionally, the conversion unit 602 includes: a third acquisition subunit and a conversion subunit. The third acquisition subunit is used to acquire a conversion strategy set by a user, wherein the conversion strategy is used to characterize the user's selection and combination of multiple conversion parameters involved in the model conversion process; the conversion subunit is used to convert the data model to be converted into an intermediate data model according to the conversion strategy, the model transfer relationship map and the model conversion rule.
[0087] Optionally, the conversion subunit includes: a reading module, a preprocessing module and a conversion module. The reading module is used to read the graph information of the model transfer relationship graph; the preprocessing module is used to perform preprocessing operations on the graph information according to the conversion strategy to obtain target graph information, wherein the preprocessing operation is used to filter part of the graph information according to the conversion strategy and correct the erroneous information in the graph information; the conversion module is used to convert the data model to be converted into an intermediate data model according to the model conversion rules and the target graph information.
[0088] Optionally, the adjustment unit 604 includes: a first determination subunit, a second determination subunit, a third determination subunit, and an adjustment operation subunit. The first determination subunit is used to determine the feature difference information of the intermediate data model and the target data model in M feature dimensions through a neural network, wherein M is an integer greater than 1; the second determination subunit is used to use the feature difference information of the M feature dimensions as model difference information; the third determination subunit is used to generate a target script according to the model difference information; the adjustment operation subunit is used to perform at least one adjustment operation on the intermediate data model through the target script, wherein at least one adjustment operation is used to continuously reduce the model difference between the intermediate data model and the target data model, until the neural network determines that there is no feature difference between the intermediate data model and the target data model in any of the M feature dimensions, and determines that the intermediate data model is adjusted to the target data model.
[0089] Optionally, the data model conversion device further includes: a first determination unit and an updating unit. The first determination unit is used to determine a target conversion rule based on a target script and model difference information through a neural network, wherein the target conversion rule is a conversion rule used when adjusting an intermediate data model to a target data model; and the updating unit is used to update the model conversion rule according to the target conversion rule.
[0090] Optionally, the multiple conversion parameters include at least the following parameters: a conversion range parameter, which is used to characterize the data primary key identifier selected during the model conversion process, and the data primary key identifier includes at least: a user identifier corresponding to the data, a storage module identifier corresponding to the data, and a data type identifier; a deployment path parameter, which is used to characterize the database switching path selected during the model conversion process; a data conversion strategy parameter, which is used to characterize the data processing method for each type of data during the model conversion process; and a verification parameter, which is used to characterize the verification method for the selected multiple conversion parameter settings.
[0091] According to another aspect of the present application, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, wherein when the computer program runs, the device where the computer-readable storage medium is located executes any one of the above-mentioned data model conversion methods.
[0092] According to another aspect of the present application, an electronic device is also provided, wherein the electronic device includes one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by one or more processors, the one or more processors are implemented to run the programs, wherein the program is configured to execute any one of the above-mentioned data model conversion methods at runtime.
[0093] The above-mentioned embodiments or examples disclosed in the present application are not exhaustive, but are only illustrative of some embodiments or examples, and are not intended to be specific limitations on the scope of protection disclosed in the present application. In the absence of contradiction, each step in a certain embodiment or example in the present application can be implemented as an independent example, and the steps can be combined arbitrarily. For example, the scheme after removing some steps in a certain embodiment or example can also be implemented as an independent example, and the order of the steps in a certain embodiment or example can be arbitrarily exchanged. In addition, the optional methods or optional examples in a certain embodiment or example can be combined arbitrarily; in addition, the various embodiments or examples can be combined arbitrarily, for example, some or all steps of different embodiments or examples can be combined arbitrarily, and a certain embodiment or example can be combined arbitrarily with the optional methods or optional examples of other embodiments or examples.
[0094] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0095] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0096] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0097] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0098] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0099] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0100] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A data model conversion method, characterized in that: include: Obtain a model transfer relationship graph and a model conversion rule, wherein the model transfer relationship graph is used to represent object entities in a to-be-converted data model and a target data model and the relationship between the object entities in the form of a graph, and the model conversion rule is a rule based on which the to-be-converted data model is converted into the target data model; According to the model transfer relationship graph and the model conversion rule, the data model to be converted is converted into an intermediate data model; Detecting model difference information between the intermediate data model and the target data model; The intermediate data model is adjusted according to the model difference information until the intermediate data model is adjusted to the target data model.
2. The data model conversion method according to claim 1, characterized in that: Get the model transfer relationship graph, including: Generate graph nodes according to object entities in the data model to be converted and the target data model; Generate edges between the graph nodes based on the relationships between the object entities; Obtaining the creation time, update time and update source information of the graph node; The model transfer relationship graph is generated according to the graph nodes, the edges between the graph nodes, and the creation time, update time and update source information of the graph nodes.
3. The data model conversion method according to claim 1, characterized in that: Get model conversion rules, including: Obtaining definition information of a model conversion scope, wherein the model conversion scope is used to characterize data types, interface types, form types, and component types involved in a model conversion process; Obtain definition information of a model mapping relationship, wherein the model mapping relationship includes at least a mapping relationship of a data type, a mapping relationship of a field, and a mapping relationship of a field attribute change mode; The model conversion rule is generated according to the definition information of the model conversion range and the definition information of the model mapping relationship.
4. The data model conversion method according to claim 1, characterized in that: According to the model transfer relationship graph and the model conversion rule, the data model to be converted is converted into an intermediate data model, including: Acquire a conversion strategy set by a user, wherein the conversion strategy is used to characterize a selection and combination method of a plurality of conversion parameters involved in a model conversion process by the user; According to the conversion strategy, the model transfer relationship map and the model conversion rule, the data model to be converted is converted into the intermediate data model.
5. The data model conversion method according to claim 4, characterized in that: According to the conversion strategy, the model transfer relationship map and the model conversion rule, the data model to be converted is converted into the intermediate data model, including: Reading graph information of the model transfer relationship graph; Performing a preprocessing operation on the graph information according to the conversion strategy to obtain target graph information, wherein the preprocessing operation is used to filter part of the graph information according to the conversion strategy and to correct erroneous information in the graph information; According to the model conversion rule and the target graph information, the data model to be converted is converted into the intermediate data model.
6. The data model conversion method according to claim 1, characterized in that: Detecting model difference information between the intermediate data model and the target data model, and adjusting the intermediate data model according to the model difference information until the intermediate data model is adjusted to the target data model, including: Determine feature difference information between the intermediate data model and the target data model in M feature dimensions through a neural network, where M is an integer greater than 1; Using the feature difference information of the M feature dimensions as the model difference information; Generate a target script according to the model difference information; The intermediate data model is adjusted at least once through the target script, wherein the at least one adjustment operation is used to continuously reduce the model difference between the intermediate data model and the target data model, until the neural network determines that there is no feature difference between the intermediate data model and the target data model in any one of the M feature dimensions, and determines that the intermediate data model is adjusted to the target data model.
7. The data model conversion method according to claim 6, characterized in that: After performing at least one adjustment operation on the intermediate data model through the target script, the data model conversion method further includes: Determining a target conversion rule according to the target script and the model difference information through the neural network, wherein the target conversion rule is a conversion rule used when adjusting the intermediate data model to the target data model; The model conversion rule is updated according to the target conversion rule.
8. The data model conversion method according to claim 4, characterized in that: The multiple conversion parameters include at least the following parameters: The conversion range parameter is used to characterize the data primary key identifier selected during the model conversion process, and the data primary key identifier includes at least: a user identifier corresponding to the data, a storage module identifier corresponding to the data, and a data type identifier; Deployment path parameter, used to characterize the database switching path selected during the model conversion process; Data conversion strategy parameters, which are used to characterize the way each type of data is processed during the model conversion process; The calibration parameters are used to characterize the calibration method for the selected multiple conversion parameter settings.
9. A data model conversion device, characterized in that: include: an acquisition unit, used to acquire a model transfer relationship graph and a model conversion rule, wherein the model transfer relationship graph is used to represent object entities in a to-be-converted data model and a target data model and the relationship between the object entities in the form of a graph, and the model conversion rule is a rule based on which the to-be-converted data model is converted into the target data model; A conversion unit, configured to convert the to-be-converted data model into an intermediate data model according to the model transfer relationship graph and the model conversion rule; A detection unit, used to detect model difference information between the intermediate data model and the target data model; An adjusting unit is used to adjust the intermediate data model according to the model difference information until the intermediate data model is adjusted to the target data model.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located executes the data model conversion method according to any one of claims 1 to 8.
Citation Information
Cited By
Reverse generation-based oil-gas exploration data transfer method, equipment and medium
CN119760008A
