Heterogeneous data source-oriented data management method, system and equipment and storage medium

Through the combination of DataX and Spark/Hive, a visual interface and API interface are provided, which solves the problems of cumbersome operations and difficult integration in the management of heterogeneous data sources, and achieves efficient and real-time data analysis.

CN118656365AActive Publication Date: 2024-09-17ANHUI CREDIT REPORTING CO LTD

Patent Information

Application Number
CN202411132078.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2024-09-17
Estimated Expiration
2044-08-19

AI Technical Summary

Technical Problem

In the existing technology, data management of heterogeneous data sources lacks a visual interface, the operation process is cumbersome, and it is difficult to integrate with other systems, which affects the real-time nature of data analysis.

Method used

Define data collection tasks through configuration files, use DataX to provide a visual interface to synchronize data, combine Spark and Hive big data platforms for offline management and real-time storage, generate reusable API interfaces, and realize data interaction between multiple systems.

Benefits of technology

It simplifies data governance operations, improves the convenience and real-time performance of tasks, reduces data analysis time, and supports data synchronization and interaction for non-technical personnel.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118656365A
    Figure CN118656365A
Patent Text Reader

Abstract

The invention provides a data governance method, system and device for heterogeneous data sources and a storage medium, and relates to the technical field of data analysis, the data governance method comprises the following steps: defining a data collection task through a configuration file; collecting data from a first data source in the heterogeneous data sources to obtain a first array; synchronizing the first array to a second data source in the heterogeneous data sources based on DataX to obtain a second array; and processing the second array based on the big data platform to generate a reusable first target array and generate an API interface. Visual interface operation is provided through a heterogeneous data source synchronization tool DataX, and a user only needs to perform parameter configuration on a page without writing corresponding script codes; in the process of generating the first target array, a visual operation interface can be provided through the preset big data platform, a processing program is simple, and under the condition that the data scale is large, the task execution time can be controlled, and the real-time performance of data analysis can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data analysis technology, and in particular to a data governance method, system, device and storage medium for heterogeneous data sources. Background Art

[0002] Heterogeneous data sources refer to multiple data sources with different data structures, access methods, and forms. In the process of informatization construction, due to the phased, technical, and economic factors of various system construction, users will accumulate a large amount of data in different storage methods, from simple file data to complex network databases, which constitute heterogeneous data sources. In big data processing systems, the data sources in heterogeneous data sources are diverse and the data volume is huge, which requires efficient and reliable data collection and processing.

[0003] In related technologies, DataX is usually used for data collection, and offline data development is performed based on Spark and Hive. DataX is a general data collection tool that can read from different data sources and write to the target data source. Spark is a fast and general cluster computing system suitable for various data processing scenarios. Hive provides a SQL-like query language based on Hadoop and is used for large-scale data analysis.

[0004] These tools support users in data collection, data analysis, processing and mining, and provide support for data governance; however, these tools are cumbersome in the task definition operation process, which makes data governance of heterogeneous data sources more complicated for non-technical personnel and difficult to integrate with other systems. Summary of the invention

[0005] In view of the deficiencies in the prior art, the present invention provides a data governance method, system, device and storage medium for heterogeneous data sources, which solves the problems of lack of a visual interface and cumbersome operation process in current data governance.

[0006] To achieve the above objectives, the present invention is implemented through the following technical solutions: In a first aspect, an embodiment of the present application provides a data governance method for heterogeneous data sources, the data governance method comprising: defining data collection tasks through a configuration file to support the collection of structured data and unstructured data; based on the data collection tasks and a preset collection method, collecting data from a first data source in a heterogeneous data source to obtain a first array; wherein the heterogeneous data sources include MySQL databases, Oracle databases, MongoDB databases, CSV databases, and Hive data warehouses; through a visual page configuration method, synchronizing the first array to a second data source in a heterogeneous data source based on DataX to obtain a second array; based on a preset big data platform, performing offline governance, hierarchical warehousing, real-time storage, and job scheduling on the second array to generate a reusable first target array; configuring and generating an API interface based on field information in the first target array to complete data interaction between multiple systems according to the API interface.

[0007] According to a first aspect of an embodiment of the present application, the first data source is one of a MySQL database, an Oracle database, a MongoDB database, and a CSV database, and the second data source is a Hive data warehouse.

[0008] According to the first aspect of the embodiment of the present application, the aforementioned configuration generates an API interface based on the field information in the first target array to complete data interaction between multiple systems according to the API interface, including: based on DataX, synchronizing the first target array to the target database to obtain a second target array, wherein the query efficiency of the target database is higher than the query efficiency of the Hive data warehouse; processing the second target array by configuration to generate an API interface; wherein the API interface is used to expose the second target array to the outside to complete data interaction between multiple systems.

[0009] According to a first aspect of an embodiment of the present application, when the first data source is a MySQL database, the second array is Hive-SQL information; in the process of offline management of the second array, the data management method for heterogeneous data sources also includes: receiving Hive-SQL information through a preset Spark cluster, wherein the Spark cluster is configured to provide a visual operation interface; based on the Hive-SQL information, calling a Spark task unit preset in the Spark cluster; after the Spark task unit receives the Hive-SQL information, executing the Spark task unit through the Spark cluster to generate a corresponding Spark command, and the Spark command is used to interact with the corresponding Hive data warehouse.

[0010] According to the first aspect of the embodiment of the present application, the big data platform includes an offline analysis unit, a data warehouse unit, a real-time computing unit and a scheduling unit, and the four are respectively configured to be able to perform offline governance, hierarchical warehousing, real-time storage and job scheduling on the second array based on Spark, Hive, Flink and xxl-job to generate a reusable first target array.

[0011] According to the first aspect of the embodiment of the present application, the aforementioned method of synchronizing the first array to the second data source in the heterogeneous data source based on DataX through a visual page configuration method to obtain the second array includes: creating a data synchronization page based on the data type and library table information of the heterogeneous data source; wherein the data synchronization page is configured with a first port and a second port and the two correspond to data source parameters and data destination parameters respectively; after the data synchronization page completes the task configuration by setting parameters, obtaining data synchronization request information; extracting the data source parameters and data destination parameters in the data synchronization request information, and encapsulating the two to obtain a read plug-in and a write plug-in; submitting the read plug-in and the write plug-in to DataX, so that the first array is mapped from the first port to the second port based on DataX, and generating a second array corresponding to the second data source.

[0012] According to the first aspect of the embodiment of the present application, in the process of encapsulating data source parameters and data destination parameters, the data governance method for heterogeneous data sources also includes: based on a composite method combining the template method pattern and the strategy pattern, extracting the common part of the database group configuration and using the common part as a primary template; wherein the database group includes a first data source and a second data source; by matching the secondary templates corresponding to each database in the database group with the primary template, multiple target templates that can differentially characterize each database are determined; and each target template is bound to its corresponding preset strategy to achieve system decoupling.

[0013] In the second aspect, an embodiment of the present application provides a data governance system for heterogeneous data sources, which includes a definition module, a collection module, a synchronization module, a processing module and an interaction module; the definition module is used to define data collection tasks through configuration files to support the collection of structured data and unstructured data; the collection module is used to collect data from a first data source in a heterogeneous data source based on data collection tasks and preset collection methods to obtain a first array; wherein the heterogeneous data sources include MySQL databases, Oracle databases, MongoDB databases, CSV databases and Hive data warehouses; the synchronization module is used to synchronize the first array to a second data source in a heterogeneous data source based on DataX through a visual page configuration method to obtain a second array; the processing module is used to perform offline governance, hierarchical warehousing, real-time storage and job scheduling on the second array based on a preset big data platform to generate a reusable first target array; the interaction module is used to generate an API interface based on the field information configuration in the first target array to complete data interaction between multiple systems according to the API interface.

[0014] In a third aspect, an embodiment of the present application provides an electronic device comprising: a processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the data governance method for heterogeneous data sources in the aforementioned first aspect is implemented.

[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing programs or instructions, which, when executed by a processor, implement the data governance method for heterogeneous data sources in the aforementioned first aspect.

[0016] The present invention provides a data governance method, system, device and storage medium for heterogeneous data sources. Compared with the prior art, it has the following beneficial effects: After collecting and registering the first array from the first data source in the heterogeneous data source, the present application provides a visual interface operation through the heterogeneous data source synchronization tool DataX, and synchronizes the first array to the second data source to obtain the second array. DataX supports the interaction of reading and writing data in multiple data sources, and the user only needs to configure the parameters on the page, without writing the corresponding script code, to complete the data synchronization configuration; in the process of offline data development of the second array to generate a reusable first target array, a visual operation interface can be provided through the preset big data platform and the processing procedure is simple. In the case of a large data scale, the task execution time can be controlled to ensure the real-time data analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 It is a flowchart of a data governance method for heterogeneous data sources provided in an embodiment of the present application; Figure 2 yes Figure 1 A schematic diagram of a part of the process of performing data management on the second array in S140; Figure 3 yes Figure 1 An exemplary flow chart of S130; Figure 4 It is a structural diagram of a data governance system for heterogeneous data sources provided in an embodiment of the present application; Figure 5 is a schematic diagram of an exemplary data governance system for heterogeneous data sources provided in an embodiment of the present application; Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention are clearly and completely described. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0019] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0020] The embodiments of the present application solve the problems of lack of visual interface and cumbersome operation process in current data governance by providing a data governance method, system, device and storage medium for heterogeneous data sources, realize visual interface operation, improve the convenience of control tasks, shorten the execution time to ensure the real-time nature of data analysis.

[0021] The technical solution in the embodiment of the present application is to solve the above technical problems, and the overall idea is as follows: In big data processing systems, we often face the problem of data collection from heterogeneous data sources. The data sources in heterogeneous data sources are diverse and the data volume is huge, which requires efficient and reliable data collection and processing. Among them, heterogeneous data sources refer to multiple data sources with different data structures, access methods, and forms. In the process of informatization construction, due to the phased, technical and economic factors of various system construction, users will accumulate a large amount of data in different storage methods, from simple file data to complex network databases, which constitute heterogeneous data sources.

[0022] In related technologies, in order to meet this challenge, DataX is usually used for data collection, and offline data development is performed based on Spark and Hive. DataX is an open source general data collection tool that can read from different data sources and write to the target data source. DataX is efficient, flexible and easy to expand, and can meet complex data collection needs, but DataX lacks a visual interface. DataX needs to define tasks through configuration files. Therefore, DataX is more complicated for non-technical personnel. At the same time, as an independent tool, DataX is difficult to integrate with other systems. For example, it cannot be directly executed as a scheduled task, which brings difficulties to automation and timing.

[0023] In addition to data collection, offline data development is also a key link. Common offline data development frameworks include Spark and Hive. Spark is a fast and general cluster computing system that is suitable for various data processing scenarios; Hive provides a SQL-like query language based on Hadoop and is used for large-scale data analysis. However, offline data development also faces challenges, such as cumbersome program writing and debugging, and as the data scale grows, the task execution time may become longer, affecting the real-time nature of data analysis.

[0024] In summary, in the process of data collection and governance in big data processing systems, tools such as DataX, Spark, and Hive support users in data collection, data analysis, processing, and mining, providing support for data governance; however, these tools are more cumbersome in the task definition operation process, which makes data governance of heterogeneous data sources more complicated for non-technical personnel and difficult to integrate with other systems.

[0025] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0026] The following first introduces a data governance method for heterogeneous data sources provided by an embodiment of the present application.

[0027] The present application provides a flow chart of a data governance method for heterogeneous data sources, such as Figure 1 As shown, the data governance method for heterogeneous data sources may include the following steps S110-S150.

[0028] S110. Define data collection tasks through configuration files to support the collection of structured data and unstructured data.

[0029] S120. Based on the data collection task and the preset collection method, collect data from a first data source in the heterogeneous data sources to obtain a first array; wherein the heterogeneous data source includes a MySQL database, an Oracle database, a MongoDB database, a CSV database, and a Hive data warehouse.

[0030] S130. Synchronize the first array to the second data source in the heterogeneous data source based on DataX through a visual page configuration method to obtain a second array.

[0031] S140. Based on the preset big data platform, offline management, hierarchical storage, real-time storage and job scheduling are performed on the second array to generate a reusable first target array.

[0032] S150. Generate an API interface based on the field information configuration in the first target array, so as to complete data interaction among multiple systems according to the API interface.

[0033] In an embodiment of the present application, the data processing process in a heterogeneous data source includes stages such as data collection, data synchronization, data governance, and data services; the original first array can be obtained through data collection, and in order to uniformly process the collected first array, the first array can be synchronized to another database in the heterogeneous data source, and in this other database, the second array can be processed by a preset quantity governance tool to obtain a first target array that can be reused, and then the field information in the first target array is configured into an API interface; it can be understood that API interface is the abbreviation of application development interface, and API interface allows third-party programs to call data or provide data-based services through the network; through the aforementioned API interface generated based on the first target array configuration, the valid information in the reusable first target array can be exposed to the outside for interaction between multiple systems.

[0034] It should be noted that DataX, as a heterogeneous data source synchronization tool, can provide visual interface operations. In the process of synchronizing data for the first array, the present application does not need to spell out the synchronization task script code and submit it to DataX in the form of a command line on the server for each data synchronization task. The present application has a visual page configuration method, which makes the data synchronization function in the form of a page. The data synchronization operation between the first array and the second array based on DataX is also relatively simple for non-technical personnel.

[0035] The above is a specific implementation method of the data governance method for heterogeneous data sources provided in an embodiment of the present application. After collecting and registering the first array from the first data source, the heterogeneous data source synchronization tool DataX can provide a visual interface operation, and synchronize the first array to the second data source to obtain the second array. DataX supports the interaction of reading and writing data in multiple data sources, and the user only needs to configure the parameters on the page without writing the corresponding script code to complete the data synchronization configuration; in the process of offline data development of the second array, a visual operation interface can be provided through the preset big data platform and the processing procedure is simple. When the data scale is large, the task execution time can be controlled to provide a guarantee for the real-time performance of data analysis.

[0036] In one example, a big data platform includes an offline analysis unit, a data warehouse unit, a real-time computing unit, and a scheduling unit, and the four are respectively configured to perform offline governance, hierarchical warehousing, real-time storage, and job scheduling on the second array based on Spark, Hive, Flink, and xxl-job to generate a reusable first target array.

[0037] In some embodiments, the first data source is one of a MySQL database, an Oracle database, a MongoDB database, and a CSV database, and the second data source is a Hive data warehouse.

[0038] In the embodiments of the present application, it can be understood that Hive is a data warehouse tool based on Hadoop. The Hive data warehouse can be used to extract, transform and load data. The Hive data warehouse is a mechanism that can store, query and analyze large-scale data stored in Hadoop, and can map structured data files to a database table. Based on this, in the process of data governance for heterogeneous data sources, data in databases such as MySQL databases, Oracle databases, MongoDB databases and CSV databases can be synchronously mapped to the Hive data warehouse to facilitate offline governance, hierarchical warehousing, real-time storage and job scheduling to generate reusable data information.

[0039] In some embodiments, an API interface is generated based on the field information configuration in the first target array, so as to complete data interaction among multiple systems according to the API interface, that is, S150 may include the following steps: S151. Based on DataX, synchronize the first target array to the target database to obtain a second target array, wherein the query efficiency of the target database is higher than the query efficiency of the Hive data warehouse.

[0040] S152. Process the second target array by configuration to generate an API interface; wherein the API interface is used to expose the second target array to the outside to complete data interaction between multiple systems.

[0041] In the embodiments of the present application, it can be understood that the Hive data warehouse is built on Hadoop based on static batch processing. The query operation process of the Hive data warehouse strictly complies with the job execution model of Hadoop MapReduce. The Hive data warehouse converts the user's hiveQL statement into a MapReduce job through an interpreter and submits it to the Hadoop cluster. Hadoop monitors the job execution process and then returns the job execution result to the user.

[0042] It should be emphasized that Hadoop usually has high latency and requires a lot of overhead in the process of job submission and scheduling. Therefore, the Hive data warehouse cannot achieve low-latency and fast queries on large-scale data sets.

[0043] Based on this, before configuring the API interface, the present application synchronizes the obtained first target array to the target database, the query efficiency of which is higher than that of the Hive data warehouse, thereby ensuring the high real-time performance of the operation.

[0044] In some embodiments, when the first data source is a MySQL database, the second array is Hive-SQL information. Figure 2 In the process of offline management of the second array, the data management method for heterogeneous data sources may further include the following steps: S210: Receive Hive-SQL information through a preset Spark cluster, wherein the Spark cluster is configured to provide a visual operation interface.

[0045] S220. Based on the Hive-SQL information, call the Spark task unit preset in the Spark cluster.

[0046] S230. After the Spark task unit receives the Hive-SQL information, the Spark task unit is executed through the Spark cluster to generate a corresponding Spark command, where the Spark command is used to interact with the corresponding Hive data warehouse.

[0047] In the embodiment of the present application, it can be understood that the present application integrates the big data processing framework Spark into the system, and the system is encapsulated with a Spark task unit. After the user submits SQL information on the page, the SQL information is synchronized to the Hive data warehouse via DataX to obtain Hive-SQL information; the system can call the Spark task unit to generate the corresponding Spark command, and interact with the corresponding Hive data warehouse through the Spark command to execute the Hive-SQL information. In this process, the user only needs to write the SQL information on the corresponding page of the system, and the system can convert the SQL information into the corresponding Spark code and run it. The whole operation process is relatively simple, and non-professionals can also operate it conveniently.

[0048] In some embodiments, please refer to Figure 3 , through a visual page configuration method, based on DataX, the first array is synchronized to the second data source in the heterogeneous data source to obtain the second array, that is, S130 may include the following steps: S310. Create a data synchronization page based on the data type and library table information of the heterogeneous data source; wherein the data synchronization page is configured with a first port and a second port and the two ports correspond to data source parameters and data destination parameters respectively.

[0049] S320. After completing the task configuration by setting parameters on the data synchronization page, obtain data synchronization request information.

[0050] S330: extract the data source parameter and the data destination parameter in the data synchronization request information, and encapsulate the two to obtain a read plug-in and a write plug-in.

[0051] S340, submitting the read plug-in and the write plug-in to DataX, so that the first array is mapped from the first port to the second port based on DataX, and generating a second array corresponding to the second data source.

[0052] In an embodiment of the present application, the data synchronization function based on DataX is constructed in the form of a page. The user only needs to configure the relevant parameters on the data synchronization page to complete the task configuration of data synchronization, and realizes the visual data synchronization of heterogeneous data sources through the data synchronization page; it can be understood that after the user submits the corresponding configuration, the data source parameters and data destination parameters in the request are encapsulated into a read plug-in and a write plug-in, and the read plug-in and the write plug-in are stored in the system database; when it is necessary to run the data synchronization task, the system will submit the read plug-in and the write plug-in to DataX, thereby using DataX to complete the data synchronization task, map the first array from the first port to the second port, and generate a second array corresponding to the second data source.

[0053] In some embodiments, in the process of encapsulating the data source parameters and the data destination parameters, the data governance method for heterogeneous data sources may further include the following steps: S410, based on a composite method combining the template method mode and the strategy mode, extract the common part of the database group configuration and use the common part as a primary template; wherein the database group includes a first data source and a second data source.

[0054] S420 , determining a plurality of target templates that can differentially characterize each database by matching the secondary template corresponding to each database in the database group with the primary template.

[0055] S430: Bind each target template with its corresponding preset strategy to achieve system decoupling.

[0056] In the embodiments of the present application, it can be understood that since heterogeneous data sources include MySQL database, Oracle database, MongoDB database, CSV database, Hive data warehouse and DAMO database, the configuration information required by each database is not exactly the same; based on this, in order to efficiently encapsulate data source parameters and data destination parameters, the present application adopts a combination of template method mode and strategy mode to extract the common part of the database group configuration as a first-level template, and then match the second-level template corresponding to each database with the first-level template, and then determine the target template corresponding to each database one by one; it can be understood that binding each target template with its corresponding preset strategy can effectively realize system decoupling; each target template realizes differentiated expression of the database.

[0057] The present application also provides a data management system 500 for heterogeneous data sources. Figure 4 As shown, the data governance system 500 may include the following modules: The definition module 510 is used to define data collection tasks through configuration files to support the collection of structured data and unstructured data.

[0058] The acquisition module 520 is used to acquire data from a first data source in the heterogeneous data sources based on the data acquisition task and the preset acquisition method to obtain a first array; wherein the heterogeneous data source includes a MySQL database, an Oracle database, a MongoDB database, a CSV database and a Hive data warehouse.

[0059] The synchronization module 530 is used to synchronize the first array to the second data source in the heterogeneous data source based on DataX through a visual page configuration method to obtain a second array.

[0060] The processing module 540 is used to perform offline management, hierarchical warehousing, real-time storage and job scheduling on the second array based on a preset big data platform to generate a reusable first target array.

[0061] The interaction module 550 is used to generate an API interface based on the field information configuration in the first target array, so as to complete data interaction among multiple systems according to the API interface.

[0062] According to an embodiment of the present application, any multiple modules among the definition module 510, the acquisition module 520, the synchronization module 530, the processing module 540 and the interaction module 550 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module.

[0063] In some embodiments, the interaction module 550 may be specifically used to: Based on DataX, the first target array is synchronized to the target database to obtain the second target array, wherein the query efficiency of the target database is higher than the query efficiency of the Hive data warehouse.

[0064] The second target array is processed by configuration to generate an API interface; wherein the API interface is used to expose the second target array to the outside to complete data interaction between multiple systems.

[0065] In some embodiments, when the first data source is a MySQL database, the second array is Hive-SQL information; the processing module 540 may specifically include: A receiving unit 541 is used to receive Hive-SQL information through a preset Spark cluster, wherein the Spark cluster is configured to provide a visual operation interface; A calling unit 542 is used to call a preset Spark task unit in the Spark cluster based on Hive-SQL information; The command generation unit 543 is used to execute the Spark task unit through the Spark cluster to generate a corresponding Spark command after the Spark task unit receives the Hive-SQL information. The Spark command is used to interact with the corresponding Hive data warehouse.

[0066] In some embodiments, the synchronization module 530 may specifically include: The page creation unit 531 is used to create a data synchronization page based on the data type and library table information of the heterogeneous data source; wherein the data synchronization page is configured with a first port and a second port and the two ports correspond to data source parameters and data destination parameters respectively.

[0067] The request acquisition unit 532 is used to acquire data synchronization request information after completing the task configuration by setting parameters on the data synchronization page.

[0068] The extraction and encapsulation unit 533 is used to extract the data source parameter and the data destination parameter in the data synchronization request information, and encapsulate the two to obtain a reading plug-in and a writing plug-in.

[0069] The submission generation unit 534 is used to submit the read plug-in and the write plug-in to DataX, so that the first array is mapped from the first port to the second port based on DataX, and a second array corresponding to the second data source is generated.

[0070] In some embodiments, the extraction and encapsulation unit 533 may be specifically used to: Based on a composite approach combining the template method pattern and the strategy pattern, the common part of the database group configuration is extracted and used as a primary template; wherein the database group includes a first data source and a second data source.

[0071] By matching the secondary template corresponding to each database in the database group with the primary template, a plurality of target templates that can differentially characterize each database are determined.

[0072] Bind each target template with its corresponding preset strategy to achieve system decoupling.

[0073] The present application also provides an exemplary data management system for heterogeneous data sources. Figure 5, data sources can include MySQL database, Oracle database, MongoDB database, API database, CSV database, DAMO database and Hive data warehouse, etc. In the process of data governance, data collection from the data source is required first. The data collection methods include offline collection based on DataX, real-time collection based on Kafka, Internet collection based on Python, and third-party system collection based on Http / Ftp. The big data platform includes offline computing and analysis units, data warehouses, real-time computing units and scheduling units; among them, the data warehouse includes ODS layer, DWD layer, DWS layer, DIM layer, TMP layer and APP layer, and the original data collected from the data source is mapped to the ODS layer of the Hive data warehouse.

[0074] The scheduling unit can perform job scheduling based on Hue / xxl-job. xxl-job is a lightweight, high-performance distributed task scheduling framework. xxl-job is easy to use without losing flexibility and functionality. xxl-job can realize advanced functions such as scheduled task scheduling, task dependency processing, task failover, and failure retry, ensuring that each data processing task can be executed on time and accurately. In addition, xxl-job also provides real-time monitoring functions, including real-time monitoring and operation logs of task running status, as well as task alarm functions. Once a task fails to execute or an exception occurs, the system can promptly notify relevant personnel through emails, text messages, etc., greatly improving the efficiency and reliability of task management.

[0075] After offline management, hierarchical warehouse building, real-time storage and job scheduling are performed on the aforementioned second array, and a reusable first target array is generated, due to the low query efficiency of the Hive data warehouse, in order to ensure the query efficiency of big data, the reusable first target array is exchanged to the target database through DataX, and data is shared through the target database. The system can provide data interface API, search and SDK services to facilitate data interaction between multiple systems.

[0076] In some embodiments, the aforementioned data governance system for heterogeneous data sources may also include a quality control module, an operation and maintenance module, and a security management module; wherein the quality control module is used to perform quality monitoring, morphological exploration, and data comparison during the data governance process to ensure data quality; the operation and maintenance module is used to perform scheduling monitoring, failure reruns, and error alarms during the data governance process; the security management module is used to perform permission management, operation audits, and data desensitization during the data governance process.

[0077] This data governance system for heterogeneous data sources is based on the springCloud technology stack. In terms of monitoring, the system integrates the monitoring system and ELK-related technologies. The system uses Prometheus and Grafana for real-time monitoring and performance indicator collection and storage, and visualizes and retrieves log data based on Kibana to ensure that the system can promptly alarm when there are software and hardware problems, thereby ensuring the stability of the system.

[0078] The system also manages audit logs based on ELK to ensure that problems encountered during system operation can be traced to improve the stability and reliability of the system. In terms of operation and maintenance, the system uses Docker and K8s as the operation and maintenance system to manage the nodes in the system. In addition, the system uses Jenkins as a tool for continuous integration and continuous delivery, which realizes automated construction, testing and deployment, and improves development and deployment efficiency.

[0079] Furthermore, the system uses Docker as a containerization technology to package each microservice into an independent container, achieving environmental isolation and deployment consistency, so that services can be quickly deployed and expanded.

[0080] In some embodiments, the present application provides an electronic device, the structure diagram of the electronic device is as follows Figure 6 shown.

[0081] The electronic device may include a processor 610 and a memory 620 storing computer program instructions.

[0082] Specifically, the processor 610 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0083] The memory 620 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 620 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 620 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 620 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 620 is a non-volatile solid-state memory.

[0084] The memory 620 may include a read-only memory (ROM), a random access memory (RAM), a disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Therefore, generally, the memory 620 includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it can perform the operations described in any one of the data governance methods for heterogeneous data sources in the above-mentioned embodiments.

[0085] The processor 610 implements any one of the data governance methods for heterogeneous data sources in the above-mentioned embodiments by reading and executing computer program instructions stored in the memory 620.

[0086] In one example, the electronic device may further include a communication interface 630 and a bus 600. Figure 6 As shown, the processor 610, the memory 620, and the communication interface 630 are connected via a bus 600 and communicate with each other.

[0087] The communication interface 630 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application. Bus 600 includes hardware, software or both, and the parts of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 600 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.

[0088] In addition, in combination with the data governance method for heterogeneous data sources in the above embodiments, the embodiments of the present application may provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the data governance methods for heterogeneous data sources in the above embodiments is implemented.

[0089] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

[0090] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0091] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0092] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0093] In summary, compared with the prior art, this application has the following beneficial effects: 1. This application provides a visual interface operation through the heterogeneous data source synchronization tool DataX to synchronize the first array to the second data source to obtain the second array; DataX supports the interaction of reading and writing data in multiple data sources, and the user only needs to configure the parameters on the page without writing the corresponding script code to complete the data synchronization configuration task.

[0094] 2. In the process of offline data development for the second array, since the present application integrates the big data processing framework Spark into the system and provides a visual operation interface, taking the first data source as MySQL database and the second array as Hive-SQL information as an example, the user only needs to write SQL information on the corresponding page of the system, and the system will be able to convert the SQL information into corresponding Spark code and run it. The whole operation process is relatively simple and non-professionals can also operate it conveniently.

[0095] 3. Before generating an API interface to complete data interaction between multiple systems, this application synchronizes the first target array to the target database, and processes the second target array through configuration to generate an API interface; since the query efficiency of the target database is higher than that of the Hive data warehouse, the high latency problem of the Hive data warehouse is solved. When the data scale is large, the task execution time can be effectively controlled to ensure the real-time nature of data analysis.

[0096] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data governance method for heterogeneous data sources, characterized in that: include: Define data collection tasks through configuration files to support the collection of structured and unstructured data; Based on the data collection task and the preset collection method, data is collected from a first data source in the heterogeneous data sources to obtain a first array; wherein the heterogeneous data source includes a MySQL database, an Oracle database, a MongoDB database, a CSV database, and a Hive data warehouse; By means of a visual page configuration method, based on DataX, the first array is synchronized to a second data source in a heterogeneous data source to obtain a second array; Based on a preset big data platform, the second array is managed offline, stored in layers, stored in real time, and scheduled, to generate a reusable first target array; An API interface is generated based on the field information configuration in the first target array, so as to complete data interaction among multiple systems according to the API interface.

2. The data governance method for heterogeneous data sources according to claim 1, characterized in that: The first data source is one of the MySQL database, the Oracle database, the MongoDB database, and the CSV database, and the second data source is the Hive data warehouse.

3. The data governance method for heterogeneous data sources according to claim 2, characterized in that: The generating an API interface based on the field information configuration in the first target array, so as to complete data interaction among multiple systems according to the API interface, includes: Based on the DataX, the first target array is synchronized to a target database to obtain a second target array, wherein the query efficiency of the target database is higher than the query efficiency of the Hive data warehouse; The second target array is processed by configuration to generate an API interface; wherein the API interface is used to expose the second target array to the outside to complete data interaction between multiple systems.

4. The data governance method for heterogeneous data sources according to claim 3, characterized in that: When the first data source is the MySQL database, the second array is Hive-SQL information; In the process of offline management of the second array, the data management method for heterogeneous data sources further includes: Receiving the Hive-SQL information through a preset Spark cluster, wherein the Spark cluster is configured to provide a visual operation interface; Based on the Hive-SQL information, calling a preset Spark task unit in the Spark cluster; After the Spark task unit receives the Hive-SQL information, the Spark task unit is executed by the Spark cluster to generate a corresponding Spark command, where the Spark command is used to interact with the corresponding Hive data warehouse.

5. The data governance method for heterogeneous data sources according to any one of claims 1 to 4, characterized in that: The big data platform includes an offline analysis unit, a data warehouse unit, a real-time computing unit and a scheduling unit, and the four are respectively configured to perform offline management, hierarchical warehousing, real-time storage and job scheduling on the second array based on Spark, Hive, Flink and xxl-job to generate a reusable first target array.

6. The data governance method for heterogeneous data sources according to any one of claims 1 to 4, characterized in that: The method of synchronizing the first array to a second data source in a heterogeneous data source based on DataX through a visualized page configuration method to obtain a second array includes: Based on the data type and library table information of the heterogeneous data source, a data synchronization page is created; wherein the data synchronization page is configured with a first port and a second port and the two ports correspond to the data source parameter and the data destination parameter respectively; After completing the task configuration by setting parameters on the data synchronization page, obtaining data synchronization request information; Extracting the data source parameter and the data destination parameter in the data synchronization request information, and encapsulating the two to obtain a read plug-in and a write plug-in; The read plug-in and the write plug-in are submitted to DataX, so that the first array is mapped from the first port to the second port based on DataX, and a second array corresponding to the second data source is generated.

7. The data governance method for heterogeneous data sources according to claim 6, characterized in that: In the process of encapsulating the data source parameter and the data destination parameter, the data governance method for heterogeneous data sources further includes: Based on a composite method combining the template method mode and the strategy mode, a common part of the database group configuration is extracted and the common part is used as a primary template; wherein the database group includes the first data source and the second data source; Determine a plurality of target templates that can differentially characterize each database by matching the secondary template corresponding to each database in the database group with the primary template; Each of the target templates is bound to its corresponding preset strategy to achieve system decoupling.

8. A data governance system for heterogeneous data sources, characterized in that: include: The definition module is used to define data collection tasks through configuration files to support the collection of structured and unstructured data; A collection module, used for collecting data from a first data source in the heterogeneous data sources based on the data collection task and the preset collection method to obtain a first array; wherein the heterogeneous data source includes a MySQL database, an Oracle database, a MongoDB database, a CSV database and a Hive data warehouse; A synchronization module, configured to synchronize the first array to a second data source in a heterogeneous data source based on DataX through a visual page configuration method to obtain a second array; A processing module, used to perform offline management, hierarchical warehouse building, real-time storage and job scheduling on the second array based on a preset big data platform to generate a reusable first target array; The interaction module is used to generate an API interface based on the field information configuration in the first target array, so as to complete data interaction among multiple systems according to the API interface.

9. An electronic device, characterized in that: include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements a data governance method for heterogeneous data sources as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores programs or instructions, and when the programs or instructions are executed by the processor, the data governance method for heterogeneous data sources as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • intelligent WEB search system and method applied to government aided decision making

    CN109657072A

  • Civil aviation data synchronization method and device based on DataX

    CN114519199A

  • Digital decision platform architecture constructed based on deep learning framework

    CN116049151A

  • Scheduling method and device based on Hive batch processing

    CN116627609A

  • Interface circuit with high frequency clock ofsemiconductor memory device

    KR1020030054201A

Cited By

  • Handshake protocol method and system based on SM2 algorithm and SM4 algorithm

    CN119544386A