A method for intelligent synchronization of heterogeneous database data
By introducing machine learning models and rules-based decision engines into the data synchronization tool, identifying data formats and configuring conversion solutions, the problem of insufficient adaptability and flexibility of existing tools is solved, and efficient and accurate data synchronization of heterogeneous databases is achieved. .
Patent Information
- Application Number
- CN202410321488.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-20
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-03-20
AI Technical Summary
Existing data synchronization tools lack adaptability and flexibility, making it difficult to support multiple database types and dynamic synchronization requirements, resulting in insufficient data synchronization efficiency and accuracy.
Using a heterogeneous database data intelligent synchronization method, the machine learning model is used to identify the data format, configure the data format conversion scheme, and perform pre- and post-processing, including format conversion, pattern recognition, data cleaning, data synchronization and conflict recognition, to Achieve efficient data synchronization.
It realizes the flexibility and adaptability of data synchronization, supports multiple database types, improves the efficiency and accuracy of data synchronization, reduces maintenance costs, and promotes the automation and intelligence of data management.
Smart Images

Figure CN118035358B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data synchronization, and in particular relates to a method for intelligent synchronization of heterogeneous database data. Background Art
[0002] With the rapid development of information technology, enterprises are undergoing digital transformation, which places higher demands on data extraction, processing and synchronization. In the face of the surge in data volume and diversified data processing requirements, existing data synchronization tools are often limited to the database types or specific versions they support, lacking the necessary adaptability and flexibility. In addition, many tools are designed to adapt only to a fixed set of synchronization rules, which limits their application scenarios and reusability, while also increasing the investment of enterprises in time and economic resources. Summary of the invention
[0003] In view of the above-mentioned deficiencies in the prior art, the method for intelligent synchronization of heterogeneous database data provided by the present invention solves the problem of insufficient adaptability and flexibility of the existing data synchronization methods.
[0004] In order to achieve the above-mentioned invention object, the technical solution adopted by the present invention is: a method for intelligent synchronization of data in heterogeneous databases, the method for intelligent synchronization of data is deployed in a business system, and comprises the following steps:
[0005] S1. Data Identification: Use machine learning models to identify the format of business system input data;
[0006] S2. Rule configuration: According to the format recognition result, configure the data format conversion scheme corresponding to the input data;
[0007] S3, pre-processing: pre-process the input data based on the configured data format conversion scheme, including format conversion, pattern recognition and data cleaning;
[0008] S4, data synchronization: synchronize the input data through pre-processing with the business system data;
[0009] S5, post-processing: perform post-processing on the synchronized data to complete data synchronization; wherein the post-processing includes data consistency and format verification and conflict identification.
[0010] Furthermore, the step S1 specifically includes:
[0011] S11. Collect typical data samples from different types of databases and extract their key features;
[0012] S12. Based on the extracted key features, train machine learning models corresponding to different databases for identifying data formats;
[0013] S13. Use the machine learning model to identify the format of the input data, and parse the data based on the identification results and map them to the processing flow configured by the rules.
[0014] Furthermore, the step S2 is specifically as follows:
[0015] S21. Build a rule-based decision engine, and use the logic rules in the rule conversion library provided by the business system to determine whether to perform synchronous processing on the input data;
[0016] If yes, proceed to step S22;
[0017] If not, there is no need to synchronize data;
[0018] S22. Use association rule learning algorithms to analyze historical data format conversion cases to form a prediction model, and use the prediction model to mine conversion patterns between data types and formats;
[0019] S23. Configure a corresponding data format conversion solution according to the conversion mode corresponding to the input data.
[0020] Furthermore, in the step S23, after determining the data format conversion scheme, the following steps are further included:
[0021] S24, collecting data performance after data synchronization or structure conversion according to the data format conversion plan;
[0022] S25. Optimizing the prediction model according to the performance of the collected data;
[0023] S26. Continuously monitor the execution effect of data synchronization conversion, and learn and adapt through predictive models to achieve optimal data synchronization performance.
[0024] Furthermore, in step S3, the format conversion method is:
[0025] According to the identified data format and the configured data format conversion scheme, the input data format is converted into the data format of the business system database according to the logical rules in the rule conversion library;
[0026] The pattern recognition method is:
[0027] Identify the field type of input data, and automatically check whether the field type is compatible with the business system database system based on the identification result, and perform format adjustment if it is incompatible;
[0028] The data cleaning method is:
[0029] Remove inconsistent or invalid data from input data.
[0030] Furthermore, the step S4 is specifically as follows:
[0031] Data synchronization is performed on the input data after pre-processing, including using stream processing algorithms to handle format differences in data streams, using the MapReduce framework to optimize batch processing algorithms for batch data synchronization, and continuously monitoring and tracking data synchronization performance indicators and adjusting data synchronization processing strategies accordingly.
[0032] Furthermore, in step S5, the method for data consistency and format verification is:
[0033] Use machine learning models to perform data consistency and format checks on synchronized data, mark inconsistent data items, and correct them according to recommended logic rules; wherein the data consistency and format verification results are fed back to the decision engine of the business system to optimize the rule conversion library;
[0034] The method for conflict identification and processing is:
[0035] The prediction model is used to predict data conflicts that occur after data format conversion and automatically process them; wherein the automatic processing results are fed back to the prediction model to optimize the data processing strategy of the prediction model.
[0036] Furthermore, a real-time monitoring mechanism is deployed during the format conversion process, and the format conversion details are recorded in a log.
[0037] Furthermore, the method also includes utilizing a collection mechanism to obtain user feedback on the format conversion effect, and optimizing the machine learning model and rule conversion library based on the feedback results.
[0038] The beneficial effects of the present invention are:
[0039] (1) The method of the present invention can flexibly configure synchronization rules and support static and dynamic synchronization demand adjustment, aiming to improve the efficiency and accuracy of data synchronization.
[0040] (2) This method supports a wide range of database types, including popular relational databases and non-relational databases, to meet the synchronization requirements of various data storage environments.
[0041] (3) The present invention designs pre-processing and post-processing processes before and after data synchronization, and can perform data pre-processing and post-processing according to detailed synchronization rules, thereby ensuring the high consistency and accuracy of various types of data during the conversion process.
[0042] (4) The intelligent recognition function in the method of the present invention can adapt to databases of various structures or versions, greatly improving the adaptability and reliability of data synchronization.
[0043] (5) The rule-based decision engine in the present invention supports dynamic updating of synchronization rules, allowing users to adjust synchronization strategies according to business needs.
[0044] (6) The flexibility of the method of the present invention enables enterprises to manage and synchronize data more efficiently and securely, while reducing maintenance costs and improving the efficiency and accuracy of data processing; at the same time, the application of the method of the present invention will promote enterprises to move towards a higher level of automation in the field of data management, realize the intelligence of the data synchronization process, and also open up a new path for the development of future data integration and synchronization technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 This is a flow chart of the method for intelligent synchronization of heterogeneous database data provided by the present invention. DETAILED DESCRIPTION
[0046] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those skilled in the art, as long as various changes are within the spirit and scope of the present invention defined and determined by the attached claims, these changes are obvious, and all inventions and creations using the concept of the present invention are protected.
[0047] The embodiment of the present invention provides a method for intelligent synchronization of data in heterogeneous databases. The method is deployed in a business system, such as Figure 1 As shown, the following steps are included:
[0048] S1. Data identification: Use machine learning models to identify the format of business system input data;
[0049] S2. Rule configuration: According to the format recognition result, configure the data format conversion scheme corresponding to the input data;
[0050] S3, pre-processing: pre-process the input data based on the configured data format conversion scheme, including format conversion, pattern recognition and data cleaning;
[0051] S4, data synchronization: synchronize the input data through pre-processing with the business system data;
[0052] S5, post-processing: perform post-processing on the synchronized data to complete data synchronization; wherein the post-processing includes data consistency and format verification and conflict identification.
[0053] Step S1 in the embodiment of the present invention is specifically:
[0054] S11. Collect typical data samples from different types of databases and extract their key features;
[0055] S12. Based on the extracted key features, train machine learning models corresponding to different databases for identifying data formats;
[0056] S13. Use the machine learning model to identify the format of the input data, and parse the data based on the identification results and map them to the processing flow configured by the rules.
[0057] In step S11 of this embodiment, typical data samples of various database systems are collected, including but not limited to data in formats such as SQL, NoSQL, XML, and JSON; these samples will be used to train the machine learning model so that the model can recognize and understand different database formats.
[0058] In step S12 of this embodiment, the collected data samples are preprocessed to extract key features, including metadata, field types, data dimensions, and key-value pair patterns of the data structure. Feature extraction is very important for subsequent model training, which determines the recognition accuracy of the model and the selection of a deep learning network model to train the machine learning model with the extracted features. During the training process, the model parameters are optimized through cross-validation technology to improve the generalization ability and accuracy of the model. The trained model is deployed in the actual business system for format recognition of new data sources.
[0059] In step S13 of this embodiment, when new data is input into the system, the model analyzes its structure and features, determines which database type it belongs to, and identifies the supported data types and document formats; based on the identification results, the system uses a parser to parse the data and maps it to the rule configuration processing flow.
[0060] Step S2 of the embodiment of the present invention is specifically as follows:
[0061] S21. Build a rule-based decision engine, and use the logic rules in the rule conversion library provided by the business system to determine whether to perform synchronous processing on the input data;
[0062] If yes, proceed to step S22;
[0063] If not, there is no need to synchronize data;
[0064] S22. Use association rule learning algorithms to analyze historical data format conversion cases to form a prediction model, and use the prediction model to mine conversion patterns between data types and formats;
[0065] S23. Configure a corresponding data format conversion solution according to the conversion mode corresponding to the input data.
[0066] In step S21 of this embodiment, the data mapping obtained by the parser is used as input to build a rule-based decision engine, which determines whether to perform data or structure synchronization according to the logical rules in the rule conversion library provided by the business.
[0067] In step S23 of this embodiment, the most appropriate data format conversion scheme is automatically adapted according to the conversion mode learned by the machine learning model and association rules corresponding to the input data, and the scheme is displayed for the user to select.
[0068] In step S23 of this embodiment, after the data format conversion scheme is determined, the following steps are further included:
[0069] S24, collecting data performance after data synchronization or structure conversion according to the data format conversion plan;
[0070] S25. Optimizing the prediction model according to the performance of the collected data;
[0071] S26. Continuously monitor the execution effect of data synchronization conversion, and learn and adapt through predictive models to achieve optimal data synchronization performance.
[0072] Specifically, in this embodiment, the data performance of users after completing data synchronization or structural conversion is collected, and the recommendation logic is optimized in combination with reinforcement learning technology, and the recommendation strategy of the prediction model is adjusted in real time to improve conversion efficiency and quality; the business system provides a performance evaluation framework, which analyzes the performance data collected by the system after each user conversion, and can measure the performance impact of conversion rules of different data types, considering factors including data consistency before and after conversion, synchronization speed, system resource usage, etc.; further, the system will continuously monitor the execution effect of the conversion rules, and learn and adapt through the prediction model to achieve optimal data synchronization performance.
[0073] In step S3 of the embodiment of the present invention, the format conversion method is:
[0074] According to the identified data format and configured data format conversion scheme, the input data format is converted into the data format of the business system database according to the logical rules in the rule conversion library;
[0075] Specifically, in this embodiment, combined with the analysis and recommendation results of steps S1 and S2, the data format conversion is implemented, and the data format conversion rules recommended by the hybrid model recommendation system are used to convert the DATE field in the Oracle database to the DATETIME format supported by SQL Server. The system provides a mode for manual modification of the recommendation rules. The user can customize the mode recommended by the system. After the adjustment is completed, the system automatically stores the change action as the user's personalized model. The system will give priority to calling it when executing the recommended model later. The system automatically generates a conversion script based on the model configuration output, and can configure periodic tasks so that the conversion process can be automatically executed, reducing manual intervention and reducing errors. After performing the format conversion, the system will automatically verify the accuracy of the conversion result and send feedback information back to the AI recommendation engine to continuously optimize the conversion rule library.
[0076] In step S3 of the embodiment of the present invention, the pattern recognition method is:
[0077] Identify the field type of the input data, and automatically check whether the field type is compatible with the business system database system based on the identification result, and perform format adjustment if it is incompatible.
[0078] Specifically, in this embodiment, the field type of the input data is accurately identified, format incompatibility issues are preprocessed, and then based on the pattern recognition results, the system automatically checks whether the field type is compatible with the target database system, and recommends or performs format adjustments when necessary.
[0079] In step S3 of the embodiment of the present invention, the method of data cleaning is:
[0080] Remove inconsistent or invalid data from input data.
[0081] Specifically, in this embodiment, based on identification and verification, the system first performs data cleaning to remove inconsistent or invalid data to ensure that the data quality meets the requirements of subsequent processing procedures. Pattern recognition and preprocessing processes are integrated into a continuous integration system, and the accuracy and processing efficiency of the algorithm are continuously optimized through real-time monitoring and data feedback.
[0082] Step S4 in the embodiment of the present invention is specifically as follows:
[0083] Data synchronization is performed on the input data after pre-processing, including using stream processing algorithms to handle format differences in data streams, using the MapReduce framework to optimize batch processing algorithms for batch data synchronization, and continuously monitoring and tracking data synchronization performance indicators and adjusting data synchronization processing strategies accordingly.
[0084] Specifically, in this embodiment, before data synchronization, a comprehensive format check is performed on all inputs to be synchronized according to the method in step S3 to ensure that they have been converted into a format supported by the target database; if any format inconsistency is found during the check process, the recommended conversion rules are automatically executed to make necessary format corrections; before executing data synchronization, a final check is performed to confirm the consistency and integrity of the data to ensure the stability of the synchronization process.
[0085] During data synchronization, stream processing algorithms are used to handle format differences in data streams and ensure the real-time and correctness of data. For large-volume data synchronization, the MapReduce framework is used to optimize batch processing algorithms, strengthen parallel processing in distributed environments and convert format issues in large data sets, and effectively improve batch performance and efficiency of synchronization processing. Monitoring tools are used to continuously track performance indicators of data synchronization, including transmission rate and error rate, and adaptive feedback control algorithms, such as reinforcement learning, are applied to automatically adjust the processing flow and optimize the performance of synchronization execution. Based on the performance indicators of real-time monitoring and the statistical data of historical error rates, the synchronization algorithm dynamically adjusts the synchronization strategy, and intelligently selects the most appropriate synchronization solution for specific data types or format issues through the decision tree algorithm, ensuring that data synchronization is both efficient and accurate.
[0086] In step S5 of the embodiment of the present invention, the method of data consistency and format verification is:
[0087] A machine learning model is used to perform data consistency and format checks on the synchronized data, inconsistent data items are marked, and they are corrected according to the recommended logic rules; wherein the data consistency and format verification results are fed back to the decision engine of the business system to optimize the rule conversion library.
[0088] Specifically, the deep learning model is also responsible for verifying whether the data format strictly complies with the standards of the target database, identifying and marking those data items with inconsistent formats. For various identified consistency and format issues, the system automatically executes the correction process, including but not limited to reapplying the format conversion rules. After completing the consistency and format verification, the system feeds the verification results back to the decision engine for further rule optimization and adjustment.
[0089] In step S5 of this embodiment, the conflict identification and processing method is:
[0090] The prediction model is used to predict data conflicts that occur after data format conversion and automatically process them; wherein the automatic processing results are fed back to the prediction model to optimize the data processing strategy of the prediction model.
[0091] Specifically, the predictive model is used to identify data conflicts that may arise after format conversion, including data dependency and referential integrity issues. The predictive model automatically handles identified conflicts based on intelligent strategies provided by machine learning algorithms to ensure consistency after data synchronization. The system feeds the processing results back to the model so that the predictive model can continuously learn and adjust to improve the accuracy and efficiency of handling similar conflicts in the future. The post-processing process will continuously monitor the consistency and format accuracy of the data to ensure that the data in the database always maintains the highest quality standards and optimizes the processing strategy over time.
[0092] In the embodiment of the present invention, a real-time monitoring mechanism is deployed during the above format conversion process, and the format conversion details are recorded in a log.
[0093] Specifically, a real-time monitoring mechanism is deployed during the data format conversion process to ensure that the monitoring system can capture any anomalies in the conversion process in real time. The monitoring system is responsible for detecting the integrity and consistency of the data during the conversion process to ensure that no data is lost or damaged during the conversion. Once a potential problem is monitored, the system can send an early warning and trigger an automatic repair process to reduce the need for manual intervention. Through detailed logging, it is ensured that all details of the data format conversion are recorded in detail in the log, including timestamps, operation details, operator information, etc. At the same time, in the business system of this embodiment, a powerful log analysis tool is integrated to facilitate subsequent data analysis and problem tracking, and quickly locate and solve problems.
[0094] The data synchronization method in the embodiment of the present invention further includes using a collection mechanism to obtain user feedback on the format conversion effect, and optimizing the machine learning model and the rule conversion library according to the feedback results.
[0095] Specifically, in this embodiment, the reinforcement learning model is applied to the format conversion process to automatically learn and optimize the processing strategies for various data types and structures. Through the feedback of reinforcement learning, the system can adaptively adjust the conversion rules to cope with new data scenarios and structures, and enhance the processing capabilities. The continuous improvement system based on feedback designs a collection mechanism to obtain user feedback on the format conversion effect and incorporate the user's intuitive experience into the improvement process. Regularly analyze historical performance data and log information, identify improvement points through machine learning models, and continuously iterate and optimize format conversion rules and efficiency. Update the performance benchmark based on the results of continuous optimization to ensure that the format conversion process meets the latest efficiency and quality standards.
[0096] Based on the above data synchronization method provided by the present invention, the system can automatically process and synchronize the data format differences between different databases to ensure the integrity and accuracy of the data during the transmission process; this not only reduces the need for manual intervention, improves the intelligence and automation of the synchronization process, but also demonstrates the uniqueness of the system in processing diverse data sources.
[0097] The present invention provides a specific example based on the above data synchronization method, the scenario is as follows:
[0098] Source database: Oracle
[0099] Table name: orders
[0100] Fields:
[0101] order_id: NUMBER
[0102] order_date: DATE
[0103] customer_name:NVARCHAR2(100)
[0104] order_total: FLOAT
[0105] Target database: SQL Server
[0106] Table name: orders
[0107] Fields:
[0108] order_id: INT
[0109] order_date: DATETIME
[0110] customer_name: NVARCHAR(100)
[0111] order_total: FLOAT
[0112] Specific data synchronization process:
[0113] The machine learning model analyzes the data type and format differences between Oracle and SQL Server, and then parses the DDL of the two database schema definitions through NLP technology and prepares data type conversion mapping.
[0114] Based on the data type differences between Oracle and SQL Server, the AI engine recommends converting the order date from Oracle's DATE to SQL Server's DATETIME. The prediction model estimates the performance of different data format conversion strategies to select the best conversion path.
[0115] Before data synchronization, convert the DATE field in Oracle to the DATETIME format supported by SQL Server. The data cleansing process includes confirming data type compatibility and standardizing string and floating point formats.
[0116] The synchronization script first creates or updates the orders table structure in SQL Server to match the Oracle structure. The system performs data conversion to synchronize Oracle's order_date to the corresponding DATETIME format field in SQL Server.
[0117] After data synchronization is completed, the deep learning model is automatically activated to perform data consistency verification to ensure the accurate expression of date and numerical data in SQL Server.
[0118] During the data synchronization process, the back-end system conducts real-time monitoring and records every step of the data format conversion to ensure strict fidelity of the data content and format.
[0119] The system integrates user feedback and synchronized log data to continuously guide AI model learning and improve its ability to handle complex data format problems.
[0120] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
[0121] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.
Claims
1. A method for intelligent synchronization of heterogeneous database data, characterized in that: The data intelligent synchronization method is deployed in a business system and includes the following steps: S1. Data identification: Use machine learning models to identify the format of business system input data; S2. Rule configuration: According to the format recognition result, configure the data format conversion scheme corresponding to the input data; S3, pre-processing: pre-process the input data based on the configured data format conversion scheme, including format conversion, pattern recognition and data cleaning; S4, data synchronization: synchronize the input data through pre-processing with the business system data; S5, post-processing: performing post-processing on the synchronized data to complete data synchronization; wherein the post-processing includes data consistency and format verification and conflict identification; The step S1 is specifically as follows: S11. Collect typical data samples from different types of databases and extract their key features; S12. Based on the extracted key features, train machine learning models corresponding to different databases for identifying data formats; S13, using the machine learning model to identify the format of the input data, and performing data parsing based on the identification results and mapping them to the processing flow configured by the rules; The step S13 is specifically as follows: when new data is input into the system, the structure and features thereof are analyzed by the machine learning model, the database type to which the data belongs is determined, and the supported data types and document formats are identified as the recognition results; according to the recognition results, the system uses the parser to parse the data and maps it to the rule configuration processing flow; The step S2 is specifically as follows: S21. Build a rule-based decision engine, and use the logic rules in the rule conversion library provided by the business system to determine whether to perform synchronous processing on the input data; If yes, proceed to step S22; If not, there is no need to synchronize data; S22. Use association rule learning algorithms to analyze historical data format conversion cases to form a prediction model, and use the prediction model to mine conversion patterns between data types and formats; S23. Configure a corresponding data format conversion solution according to the conversion mode corresponding to the input data.
2. The method for intelligent synchronization of heterogeneous database data according to claim 1, characterized in that: In the step S23, after determining the data format conversion scheme, the following step is further included: S24, collecting data performance after data synchronization or structure conversion according to the data format conversion plan; S25. Optimizing the prediction model according to the performance of the collected data; S26. Continuously monitor the execution effect of data synchronization conversion, and learn and adapt through predictive models to achieve optimal data synchronization performance.
3. The method for intelligent synchronization of heterogeneous database data according to claim 1, characterized in that: In step S3, the format conversion method is: According to the identified data format and configured data format conversion scheme, the input data format is converted into the data format of the business system database according to the logical rules in the rule conversion library; The pattern recognition method is: Identify the field type of input data, and automatically check whether the field type is compatible with the business system database system based on the identification result, and perform format adjustment if it is incompatible; The data cleaning method is: Remove inconsistent or invalid data from input data.
4. The method for intelligent synchronization of heterogeneous database data according to claim 1, characterized in that: The step S4 is specifically as follows: Data synchronization is performed on the input data after pre-processing, including using stream processing algorithms to handle format differences in data streams, using the MapReduce framework to optimize batch processing algorithms for batch data synchronization, and continuously monitoring and tracking data synchronization performance indicators and adjusting data synchronization processing strategies accordingly.
5. The method for intelligent synchronization of heterogeneous database data according to claim 1, characterized in that: In step S5, the method for data consistency and format verification is: Using a machine learning model to perform data consistency and format checks on the synchronized data, marking inconsistent data items, and correcting them according to recommended logic rules; wherein the data consistency and format verification results are fed back to the decision engine of the business system to optimize the rule conversion library; The method for conflict identification and processing is: The prediction model is used to predict data conflicts that occur after data format conversion and automatically process them; wherein the automatic processing results are fed back to the prediction model to optimize the data processing strategy of the prediction model.
6. The method for intelligent synchronization of heterogeneous database data according to claim 1, characterized in that: A real-time monitoring mechanism is deployed during the format conversion process, and the format conversion details are recorded in a log.
7. The method for intelligent synchronization of heterogeneous database data according to claim 1, characterized in that: The method also includes utilizing a collection mechanism to obtain user feedback on the format conversion effect, and optimizing the machine learning model and rule conversion library based on the feedback results.
Citation Information
Patent Citations
Method and system for automatically synchronizing and sharing data of intelligent measurement master station
CN117675838A
Order synchronization method of business management platform
CN117725122A