Method and equipment for improving data mart according to data lake
By scanning and modifying tasks in the data lake and conducting data consistency and timeliness analysis, the duplicate construction and citation confusion in the construction of bank data marts is solved, the standardization and consistency of data marts are achieved, and the data is ensured. High quality and business continuity.
Patent Information
- Application Number
- CN202410836535.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-09-20
AI Technical Summary
There are problems of duplicate construction and confusing data reference in the construction of the bank's data mart, which leads to data quality problems and difficulties in maintaining, and the inability to timely perceive source system changes, affecting the smooth progress of the data migration process.
By scanning tasks regularly in the data lake, reading configuration information, determining whether the tasks comply with market citation specifications, modifying non-compliant tasks, and performing data consistency and timeliness analysis, generating verification result tables, positioning differences and optimizing tasks , provides automated scripts and data conversion tools to ensure task standardization and data consistency.
The standardization of the data mart is realized, data availability and business coherence are ensured, data accuracy and consistency are ensured, errors and redundancy are reduced, data backup and recovery process is simplified, data transparency and business decision-making are improved. accuracy.
Smart Images

Figure CN118673330A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and device for improving a data mart based on a data lake. Background Art
[0002] In the practice of data construction in banks, there is a situation of duplicate construction. For example, in the process of building markets in different business domains, facing many source systems, the source layer data is generally cleaned and processed separately to form the market's own basic layer data, and the market has serious duplicate construction. At the same time, there is also confusion in references. For example, in the process of self-construction of different markets, in addition to directly using the source layer, there are also cases of disorderly references to other market data. This leads to the inability to fully analyze the impact on downstream when problems occur, causing data quality problems and difficult maintenance. In addition, it is impossible to perceive changes in the source system in a timely manner. Changes in the source system require many-to-many notifications, which are easy to miss. Problems are often discovered only after they occur, or even hidden for a long time.
[0003] In order to shield the impact of references to different data sources, some banks will choose data lake as a platform that can store structured and unstructured data, meeting the needs of enterprises for unified data management and analysis. However, in the process of data mart migration, the following problems will be faced: lack of a complete set of mart migration modification process, such as lack of automatic identification of non-standard mart content, lack of automatic script modification tools, lack of complete migration tools, including data quality verification tools before and after migration, and data timeliness verification tools before and after migration, to ensure that the normal business is not affected during the migration process. Summary of the invention
[0004] The purpose of the present invention is to provide a method and device for improving a data mart based on a data lake in view of the deficiencies in the prior art.
[0005] To achieve the above objectives, in a first aspect, the present invention provides a method for improving a data mart based on a data lake, comprising:
[0006] Regularly scan the tasks running online in the big data platform, read the configuration information of the big data platform, and determine whether the tasks comply with the mart reference specification based on the configuration information and the pre-built data mart reference data lake standard;
[0007] Extract tasks that do not conform to the market reference specifications, modify the tasks that do not conform to the market reference specifications, then deploy the modified tasks to the big data platform, and obtain result data based on running the modified tasks;
[0008] Read the result data obtained by running the modified task and the result data obtained by running the task before the modification, and perform data consistency analysis and time consistency analysis on the result data obtained by running the modified task and the result data obtained by running the task before the modification. If both the data consistency analysis and the time consistency analysis pass, it means that the modified task has been standardized and the result data are consistent, and it is allowed to be applied to production. Otherwise, generate a verification result table, compare the differences based on the verification result table, then locate the specific cause, and optimize the task based on the specific cause.
[0009] Furthermore, the method of modifying the program of tasks that do not conform to the market reference specification is as follows:
[0010] Read the data lake dictionary, and convert the data lake metadata information and the mapping information based on the modification in the data lake dictionary into a standard format;
[0011] Configure modification rules, and use automated scripts to read tasks that do not conform to the marketplace reference specifications, connect the context, and replace the tasks that have formed the specifications based on the modification rules.
[0012] Furthermore, the data consistency analysis includes:
[0013] Perform field-level consistency and order-of-magnitude consistency comparison on the result data obtained by running the modified task and the result data obtained by running the task before the modification.
[0014] Convert the result data obtained by running the task before the modification into a format that is consistent with the result data obtained by running the task after the modification;
[0015] Determine the correspondence between the fields in the result data after modification and the fields in the result data before modification;
[0016] According to the field mapping, the result data is aligned with the original result data, and the data is compared field by field to check the consistency of the data;
[0017] Use cross-check verification and md5 algorithm for consistency comparison;
[0018] Use SQL statements for comparison.
[0019] Furthermore, the time consistency analysis includes:
[0020] Read the execution logs and scheduling information of the tasks before and after the modification on the big data platform;
[0021] Generate comparison content according to the correspondence between the task before modification and the task after modification, the comparison content including the new task name, the corresponding old task name, the new task start time, the old task start time, the new task end time, the old task end time, the new task execution time, the old task execution time and the difference between the new and old task completion times;
[0022] A time consistency analysis is performed based on the difference in completion time between the new and old tasks, the start time of the new task, and the start time of the old task.
[0023] In a second aspect, the present invention provides a device for improving a data mart based on a data lake, comprising:
[0024] A task scanning module is used to regularly scan the tasks running online in the big data platform, read the configuration information of the big data platform, and determine whether the tasks comply with the mart reference specification based on the configuration information and the pre-built data mart reference data lake standard;
[0025] The task improvement module is used to extract tasks that do not meet the market reference specifications, modify the tasks that do not meet the market reference specifications, and then deploy the modified tasks to the big data platform, and obtain result data based on running the modified tasks;
[0026] The analysis module is used to read the result data obtained by running the modified task and the result data obtained by running the task before the modification, and perform data consistency analysis and time consistency analysis on the result data obtained by running the modified task and the result data obtained by running the task before the modification. If both the data consistency analysis and the time consistency analysis are passed, it means that the modified task has been standardized and the result data are consistent, and it is allowed to be applied to production. Otherwise, a verification result table is generated, and the differences are compared according to the verification result table, and then the specific reasons are located, and the tasks are optimized according to the specific reasons.
[0027] Furthermore, the method of modifying the program of the task that does not conform to the market reference specification is as follows:
[0028] Read the data lake dictionary, and convert the data lake metadata information and the mapping information based on the modification in the data lake dictionary into a standard format;
[0029] Configure modification rules, and use automated scripts to read tasks that do not conform to the marketplace reference specifications, connect the context, and replace the tasks that have formed the specifications based on the modification rules.
[0030] Furthermore, the data consistency analysis includes:
[0031] Perform field-level consistency and order-of-magnitude consistency comparison on the result data obtained by running the modified task and the result data obtained by running the task before the modification.
[0032] Convert the result data obtained by running the task before the modification into a format that is consistent with the result data obtained by running the task after the modification;
[0033] Determine the correspondence between the fields in the result data after modification and the fields in the result data before modification;
[0034] According to the field mapping, the result data is aligned with the original result data, and the data is compared field by field to check the consistency of the data;
[0035] Use cross-check verification and md5 algorithm for consistency comparison;
[0036] Use SQL statements for comparison.
[0037] Furthermore, the time consistency analysis includes:
[0038] Read the execution logs and scheduling information of the tasks before and after the modification on the big data platform;
[0039] Generate comparison content according to the correspondence between the task before modification and the task after modification, the comparison content including the new task name, the corresponding old task name, the new task start time, the old task start time, the new task end time, the old task end time, the new task execution time, the old task execution time and the difference between the new and old task completion times;
[0040] A time consistency analysis is performed based on the difference in completion time between the new and old tasks, the start time of the new task, and the start time of the old task.
[0041] Beneficial effects: The present invention completes the migration of the underlying programs of the data mart to the data lake, ensures data availability and business continuity, provides a more standardized data mart construction method, and unifies data sources; helps to ensure the accuracy and consistency of data, and reduces errors and redundancy; helps to conduct more accurate and efficient data analysis and reporting, and reduces the complexity and cost of maintaining different data formats and structures; by providing consistent and reliable data, data mart standardization supports faster and more informed business decisions, and standardized data is easier to share among different teams and departments. During the data migration process, standardized data can be accepted and processed by the new system more quickly, and is easier to expand and adapt to changing business needs; providing standardized and high-quality data can enhance user trust in data and simplify the data backup and recovery process; improving data transparency, making it easier for users to track data sources and changes. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 is a flow chart of a method for improving a data mart based on a data lake according to an embodiment of the present invention;
[0043] Figure 2 is a schematic diagram of a device for improving a data mart based on a data lake according to an embodiment of the present invention. DETAILED DESCRIPTION
[0044] The present invention is further explained below in conjunction with the accompanying drawings and specific embodiments. The embodiments are implemented based on the technical solution of the present invention. It should be understood that these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention.
[0045] like Figure 1 As shown, an embodiment of the present invention provides a method for improving a data mart based on a data lake, including:
[0046] Regularly scan the tasks running online in the big data platform, read the configuration information of the big data platform, and judge whether the task meets the market reference specification based on the configuration information and the pre-built data mart reference data lake standard. The above configuration information includes task name, task content and scheduling information. The above data mart reference data lake standard standardizes the standardized management of data sources during the construction of the data mart, such as whether to reference non-data lake tables, achieve fault-free goals, including data reference analysis, etc. The above tasks are programs running on the big data platform.
[0047] Extract tasks that do not conform to the market reference specification, modify the tasks that do not conform to the market reference specification, and then deploy the modified tasks to the big data platform, and obtain result data based on running the modified tasks. Specifically, the method of program modification for tasks that do not conform to the market reference specification is as follows:
[0048] Read the data lake dictionary, and convert the data lake metadata information and mapping information based on the modification in the data lake dictionary into a standard format. Configure modification rules, and read the tasks that do not meet the market reference specifications through automated scripts, connect the context, and replace the tasks that have been standardized based on the modification rules.
[0049] Read the result data obtained by running the modified task and the result data obtained by running the task before the modification, and perform data consistency analysis and time consistency analysis on the result data obtained by running the modified task and the result data obtained by running the task before the modification. If both the data consistency analysis and the time consistency analysis pass, it means that the modified task has been standardized and the result data are consistent, and it is allowed to be applied to production. Otherwise, generate a verification result table, compare the differences based on the verification result table, then locate the specific cause, and optimize the task based on the specific cause.
[0050] Specifically, the above data consistency analysis includes:
[0051] The result data obtained by running the modified task is compared with the result data obtained by running the task before the modification for field-level consistency and order-of-magnitude consistency.
[0052] Convert the result data obtained by running the task before the modification to the same format as the result data obtained by running the task after the modification. Ensure that the data is in a unified format, remove unnecessary spaces, special characters, etc., and convert the data into a unified format for easy comparison.
[0053] Determine the correspondence between the fields in the result data after the modification and the fields in the result data before the modification.
[0054] According to the field mapping, the result data is aligned with the original result data, and the data is compared field by field to check the consistency of the data.
[0055] Use cross-check verification and md5 algorithm for consistency comparison. Specifically, cross-check verification determines whether the data is consistent by comparing the number of non-NULL data in the two tables. The md5 method calculates the md5 value of each row of data and then compares them to determine whether the data is consistent.
[0056] Use SQL statements to compare, for example, use FULL JOIN to find the same records and different records in two tables to determine the consistency of the data.
[0057] Inconsistent fields and data can also be marked. Then the causes of the differences are analyzed, such as data entry errors, data processing logic errors, etc. This can be achieved through a one-by-one comparison method, that is, by comparing the records with unique IDs in the two tables to find the difference data. Then a detailed comparison report is generated to show the consistency and inconsistency results. The comparison results can be sent daily, and the code optimization is automatically performed for inconsistent tasks.
[0058] The above time consistency analysis includes:
[0059] Read the execution logs and scheduling information of the tasks before and after the modification on the big data platform.
[0060] Comparison content is generated based on the correspondence between the task before modification and the task after modification. The comparison content includes the new (modified) task name, the corresponding old (pre-modification) task name, the new task start time, the old task start time, the new task end time, the old task end time, the new task execution time, the old task execution time and the difference between the new and old task completion times.
[0061] A time consistency analysis is performed based on the difference in completion time between the new and old tasks, the start time of the new task, and the start time of the old task. Specifically, if the difference in completion time between the new and old tasks is more than 30 minutes or the new task starts 30 minutes later, the time consistency analysis is considered to have failed. During this period, the progress of the tasks can be monitored in real time to ensure that the tasks are carried out as planned, and time tracking tools can be used to record the actual time spent on the tasks. An automated reminder system can be set up to remind relevant personnel when the tasks are approaching the deadline or are expected to be delayed.
[0062] See also Figure 2 Based on the above embodiments, those skilled in the art can easily understand that the present invention also provides a device for improving a data mart based on a data lake, including a task scanning module 1, a task improvement module 2 and an analysis module 3.
[0063] Among them, the task scanning module 1 is used to regularly scan the tasks running online in the big data platform, and read the configuration information of the big data platform, and judge whether the task meets the market reference specification according to the configuration information and the pre-built data mart reference data lake standard. The above configuration information includes task name, task content and scheduling information. The above data mart reference data lake standard standardizes the standardized management of data sources during the construction of the data mart, and the consumer finance, risk, and micro-business data models are connected to the data lake to achieve the fault-breaking goal, including data reference analysis, etc. The above tasks are programs running on the big data platform.
[0064] The task improvement module 2 is used to extract tasks that do not meet the market reference specifications, and modify the tasks that do not meet the market reference specifications, and then deploy the modified tasks to the big data platform, and obtain result data based on running the modified tasks. Specifically, the method of program modification for tasks that do not meet the market reference specifications is as follows:
[0065] Read the data lake dictionary, and convert the data lake metadata information and mapping information based on the modification in the data lake dictionary into a standard format. Configure modification rules, and read the tasks that do not meet the market reference specifications through automated scripts, connect the context, and replace the tasks that have been standardized based on the modification rules.
[0066] Analysis module 3 is used to read the result data obtained by running the modified task and the result data obtained by running the task before the modification, and perform data consistency analysis and time consistency analysis on the result data obtained by running the modified task and the result data obtained by running the task before the modification. If both the data consistency analysis and the time consistency analysis are passed, it means that the modified task has been standardized and the result data are consistent, and it is allowed to be applied to production. Otherwise, a verification result table is generated, and the differences are compared according to the verification result table, and then the specific reasons are located, and the tasks are optimized according to the specific reasons.
[0067] Specifically, the above data consistency analysis includes:
[0068] The result data obtained by running the modified task is compared with the result data obtained by running the task before the modification for field-level consistency and order-of-magnitude consistency.
[0069] Convert the result data obtained by running the task before the modification to the same format as the result data obtained by running the task after the modification. Ensure that the data is in a unified format, remove unnecessary spaces, special characters, etc., and convert the data into a unified format for easy comparison.
[0070] Determine the correspondence between the fields in the result data after the modification and the fields in the result data before the modification.
[0071] According to the field mapping, the result data is aligned with the original result data, and the data is compared field by field to check the consistency of the data.
[0072] Use cross-check verification and md5 algorithm for consistency comparison. Specifically, cross-check verification determines whether the data is consistent by comparing the number of non-NULL data in the two tables. The md5 method calculates the md5 value of each row of data and then compares them to determine whether the data is consistent.
[0073] Use SQL statements to compare, for example, use FULL JOIN to find the same records and different records in two tables to determine the consistency of the data.
[0074] Inconsistent fields and data can also be marked. Then the causes of the differences are analyzed, such as data entry errors, data processing logic errors, etc. This can be achieved through a one-by-one comparison method, that is, by comparing the records with unique IDs in the two tables to find the difference data. Then a detailed comparison report is generated to show the consistency and inconsistency results. The comparison results can be sent daily, and the code optimization is automatically performed for inconsistent tasks.
[0075] The above time consistency analysis includes:
[0076] Read the execution logs and scheduling information of the tasks before and after the modification on the big data platform.
[0077] Comparison content is generated based on the correspondence between the task before modification and the task after modification. The comparison content includes the new (modified) task name, the corresponding old (pre-modification) task name, the new task start time, the old task start time, the new task end time, the old task end time, the new task execution time, the old task execution time and the difference between the new and old task completion times.
[0078] Perform time consistency analysis based on the difference in completion time between the new and old tasks, the start time of the new task, and the start time of the old task. Specifically, if the difference in completion time between the new and old tasks is more than 30 minutes or the new task starts 30 minutes later, the time consistency analysis will be considered as failed. During this period, you can monitor the progress of the tasks in real time to ensure that the tasks are carried out as planned, use time tracking tools to record the actual time spent on the tasks, and set up an automated reminder system to remind relevant personnel when the tasks are approaching the deadline or are expected to be delayed.
[0079] For example:
[0080] For example, the IOU table in the basic layer of the consumer finance data mart directly references the table in the odata layer. The following non-compliant codes in the task are identified:
[0081]
[0082] After identifying the corresponding non-standard code, the corresponding table is automatically replaced with the data lake table by reading the data lake mapping document. Then the data lake mapping dictionary is read to automatically compare and replace the corresponding fields, as follows:
[0083]
[0084] After the data consistency analysis is performed, the comparison results are generated and the relevant data contents are recorded, as follows:
[0085]
[0086] The comparison results are sent automatically every day, including information such as field content consistency and data volume consistency.
[0087] When performing time consistency analysis, the generated comparison content is as follows:
[0088]
[0089] The above is only a preferred embodiment of the present invention. It should be noted that for ordinary technicians in this technical field, other parts not specifically described belong to the prior art or common knowledge. Several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered as the protection scope of the present invention.
Claims
1. A method for improving a data mart based on a data lake, characterized in that: include: Regularly scan the tasks running online in the big data platform, read the configuration information of the big data platform, and determine whether the tasks comply with the mart reference specification based on the configuration information and the pre-built data mart reference data lake standard; Extract tasks that do not conform to the market reference specifications, modify the tasks that do not conform to the market reference specifications, then deploy the modified tasks to the big data platform, and obtain result data based on running the modified tasks; Read the result data obtained by running the modified task and the result data obtained by running the task before the modification, and perform data consistency analysis and time consistency analysis on the result data obtained by running the modified task and the result data obtained by running the task before the modification. If both the data consistency analysis and the time consistency analysis pass, it means that the modified task has been standardized and the result data are consistent, and it is allowed to be applied to production. Otherwise, generate a verification result table, compare the differences based on the verification result table, then locate the specific cause, and optimize the task based on the specific cause.
2. The method for improving a data mart based on a data lake according to claim 1, characterized in that: The specific method of modifying the program for tasks that do not conform to the market reference specification is as follows: Read the data lake dictionary, and convert the data lake metadata information and the mapping information based on the modification in the data lake dictionary into a standard format; Configure modification rules, and use automated scripts to read tasks that do not conform to the marketplace reference specifications, connect the context, and replace the tasks that have formed the specifications based on the modification rules.
3. The method for improving a data mart based on a data lake according to claim 1, characterized in that: The data consistency analysis includes: Perform field-level consistency and order-of-magnitude consistency comparison on the result data obtained by running the modified task and the result data obtained by running the task before the modification. Convert the result data obtained by running the task before the modification into a format that is consistent with the result data obtained by running the task after the modification; Determine the correspondence between the fields in the result data after modification and the fields in the result data before modification; According to the field mapping, the result data is aligned with the original result data, and the data is compared field by field to check the consistency of the data; Use cross-check verification and md5 algorithm for consistency comparison; Use SQL statements for comparison.
4. The method for improving a data mart based on a data lake according to claim 1, characterized in that: The time consistency analysis includes: Read the execution logs and scheduling information of the tasks before and after the modification on the big data platform; Generate comparison content according to the correspondence between the task before modification and the task after modification, the comparison content including the new task name, the corresponding old task name, the new task start time, the old task start time, the new task end time, the old task end time, the new task execution time, the old task execution time and the difference between the new and old task completion times; A time consistency analysis is performed based on the difference in completion time between the new and old tasks, the start time of the new task, and the start time of the old task.
5. A device for improving a data mart based on a data lake, characterized in that: include: A task scanning module is used to regularly scan the tasks running online in the big data platform, read the configuration information of the big data platform, and determine whether the tasks comply with the mart reference specification based on the configuration information and the pre-built data mart reference data lake standard; The task improvement module is used to extract tasks that do not meet the market reference specifications, modify the tasks that do not meet the market reference specifications, and then deploy the modified tasks to the big data platform, and obtain result data based on running the modified tasks; The analysis module is used to read the result data obtained by running the modified task and the result data obtained by running the task before the modification, and perform data consistency analysis and time consistency analysis on the result data obtained by running the modified task and the result data obtained by running the task before the modification. If both the data consistency analysis and the time consistency analysis are passed, it means that the modified task has been standardized and the result data are consistent, and it is allowed to be applied to production. Otherwise, a verification result table is generated, and the differences are compared according to the verification result table, and then the specific reasons are located, and the tasks are optimized according to the specific reasons.
6. The device for improving a data mart based on a data lake according to claim 5, characterized in that: The specific method of modifying the program for tasks that do not conform to the market reference specification is as follows: Read the data lake dictionary, and convert the data lake metadata information and the mapping information based on the modification in the data lake dictionary into a standard format; Configure modification rules, and use automated scripts to read tasks that do not conform to the marketplace reference specifications, connect the context, and replace the tasks that have formed the specifications based on the modification rules.
7. The device for improving a data mart based on a data lake according to claim 5, characterized in that: The data consistency analysis includes: Perform field-level consistency and order-of-magnitude consistency comparison on the result data obtained by running the modified task and the result data obtained by running the task before the modification. Convert the result data obtained by running the task before the modification into a format that is consistent with the result data obtained by running the task after the modification; Determine the correspondence between the fields in the result data after modification and the fields in the result data before modification; According to the field mapping, the result data is aligned with the original result data, and the data is compared field by field to check the consistency of the data; Use cross-check verification and md5 algorithm for consistency comparison; Use SQL statements for comparison.
8. The device for improving a data mart based on a data lake according to claim 5, characterized in that: The time consistency analysis includes: Read the execution logs and scheduling information of the tasks before and after the modification on the big data platform; Generate comparison content according to the correspondence between the task before modification and the task after modification, the comparison content including the new task name, the corresponding old task name, the new task start time, the old task start time, the new task end time, the old task end time, the new task execution time, the old task execution time and the difference between the new and old task completion times; A time consistency analysis is performed based on the difference in completion time between the new and old tasks, the start time of the new task, and the start time of the old task.
Citation Information
Patent Citations
Data processing method and system based on data lake
CN114880405A
Cross-cluster version ETL processing demand migration and data verification method and system
CN116795815A
Method for updating and reading data on data lake and related equipment
CN117033497A
Order synchronization method of business management platform
CN117725122A
Trip Unit of Molded Case Circuit Breaker
KR1020220131076A
