Distributed multi-source heterogeneous data resource processing method, system and equipment
Through the combination of Trie tree keyword matching algorithm, Hash Join algorithm and L-C incremental extraction method, the problem of low update efficiency of multi-source heterogeneous data in traditional technology is solved, efficient data cleaning, fusion and cataloging processing are achieved, improving the Efficiency and real-time performance of data updates.
Patent Information
- Application Number
- CN202410848168.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2024-08-23
AI Technical Summary
Traditional distributed resource update technology has low update efficiency when faced with multi-source heterogeneous data. It is difficult to effectively handle data redundancy and inconsistency issues under complex and real-time conditions, affecting data quality and subsequent operation efficiency.
The Trie tree keyword matching algorithm is used for data cleaning, the Hash Join algorithm is used for data fusion, and the L-C incremental extraction method is used to implement incremental extraction based on the database transaction log. These steps are executed through task middleware to improve data update efficiency.
It improves the efficiency and real-time performance of distributed multi-source heterogeneous data updates under complex and real-time conditions, ensuring data quality and update efficiency.
Smart Images

Figure CN118535581A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of resource updating, and relates to a distributed multi-source heterogeneous data resource processing method, system and device. Background Art
[0002] According to the characteristics of distributed resources, data is often redundant, incomplete, erroneous and inconsistent, and these data are collectively referred to as "dirty data". The generation of "dirty data" is caused by a variety of reasons, including technical factors and human factors. Human factors include factors such as incorrect data information input and inconsistent data formats, and technical factors include data redundancy problems caused by the integration of multiple data sources. Among them, human-generated data quality problems are the most difficult to find and correct. The existence of "dirty data" will reduce data quality, seriously affect the results of data processing, cause data redundancy in the specification library, and low update efficiency, which in turn affects subsequent cataloging operations.
[0003] Data distributed in various places are often multi-source and heterogeneous. Data from different sources may have different descriptions of the same thing. If you need to have an accurate and comprehensive understanding of the thing, you need to merge these distributed data resources. However, the structure of the data table is often different. It is necessary to study how to merge these heterogeneous data tables and store them in the standard library to update data resources. The standard data formed after cleaning and fusion contains considerable value. Therefore, it is also necessary to study the value of mining these data, so that they can be cataloged and displayed in the form of lists and graphs, and can be used for subsequent retrieval, recommendation and traceability. However, when facing the above-mentioned real-world application needs, traditional distributed resource update technology still has the technical problem of low efficiency in updating multi-source heterogeneous data. Summary of the invention
[0004] In response to the problems existing in the above-mentioned traditional methods, the present invention proposes a distributed multi-source heterogeneous data resource processing method, a distributed multi-source heterogeneous data resource processing system and a computer device, which can effectively improve the efficiency of distributed multi-source heterogeneous data updating under complex and real-time conditions.
[0005] In order to achieve the above objectives, the embodiments of the present invention adopt the following technical solutions: On the one hand, a distributed multi-source heterogeneous data resource processing method is provided, comprising the steps of: Connect distributed heterogeneous data sources and obtain source data from each heterogeneous data source into a multi-source heterogeneous database; The task middleware uses the Trie tree keyword matching algorithm to clean the source data in the multi-source heterogeneous database; The task middleware uses the Hash Join algorithm to fuse the cleaned source data to form fused standard data and store it in the standard table. The task middleware uses the LC incremental extraction method to incrementally extract the specification data in the specification table and complete the data cataloging, and then update the data instances generated by the cataloging into the target database.
[0006] On the other hand, a distributed multi-source heterogeneous data resource processing system is also provided, comprising: The data acquisition module is used to connect to various distributed heterogeneous data sources and acquire the source data of each heterogeneous data source into a multi-source heterogeneous library; The data cleaning module is used to clean the source data in the multi-source heterogeneous database by using the Trie tree keyword matching algorithm through the task middleware; The data fusion module is used to fuse the cleaned source data using the Hash Join algorithm through the task middleware to form fused standard data and store it in the standard table; The data cataloging module is used to incrementally extract the specification data in the specification table and complete data cataloging through the task middleware using the LC incremental extraction method, and update the data instances generated by the cataloging into the target database.
[0007] On the other hand, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned distributed multi-source heterogeneous data resource processing method when executing the computer program.
[0008] One of the above technical solutions has the following advantages and beneficial effects: The above-mentioned distributed multi-source heterogeneous data resource processing method, system and device, through in-depth research and analysis of distributed resources, divides the resource update processing into three parts: data cleaning, data fusion and data cataloging. First, the Tire tree keyword matching algorithm is used to quickly and accurately realize data deduplication, and then the Hash Join fusion algorithm is used to improve the efficiency of multi-table fusion in combination with actual application scenarios and various fusion requirements. Finally, the LC incremental extraction method is used to realize incremental extraction based on the database transaction log, thereby completing the overall distributed resource update processing. These tasks are all executed in the resource configuration subsystem through the task middleware. Compared with traditional technologies, the efficiency and real-time performance of distributed multi-source heterogeneous data updates under complex and real-time conditions are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the conventional technology, the drawings required for use in the embodiments or the conventional technology descriptions are 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 creative work.
[0010] Figure 1 It is a flowchart of a distributed multi-source heterogeneous data resource processing method in one embodiment; Figure 2 An example diagram of implementing data deduplication using a Trie tree keyword matching algorithm in one embodiment; Figure 3 A schematic diagram of a process of data cleaning and fusion in one embodiment; Figure 4 A schematic diagram of an application of a Hash Join algorithm in multi-table fusion in one embodiment; Figure 5 A schematic diagram of a data extraction structure model of an LC incremental extraction method in one embodiment; Figure 6 A schematic diagram of a process of data cataloging in one embodiment; Figure 7 The figure is a schematic diagram of the module structure of a distributed multi-source heterogeneous data resource processing system in one embodiment. DETAILED DESCRIPTION
[0011] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with the accompanying drawings and Examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Unless otherwise defined, all technical and scientific terms used in the present invention have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0012] It should be noted that the reference to "embodiment" in the present invention means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present invention. The presentation of this phrase at various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It will be understood by those skilled in the art that the embodiments described in the present invention may be combined with other embodiments. The term "and / or" used in the present specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.
[0013] The following will describe the implementation of the present invention in detail with reference to the accompanying drawings in the embodiment diagram of the present invention.
[0014] Firstly, the present invention adopts a keyword matching algorithm to match the data from multi-source heterogeneous tables with the standard table row by row, and covers the duplicate data; secondly, a fusion algorithm is used to connect the cleaned tables, which can realize the fusion processing of distributed table data under various conditions such as table continuation, main table + attribute table, table structures with different matching fields, and table structures with different matching fields; finally, a data extraction method is adopted, based on the transaction log file, to complete the full and incremental extraction of the cleaned and fused data through an improved full-table comparison method to form catalog data.
[0015] Before cleaning or merging distributed resources, you must first create a data source in the resource configuration subsystem. The data source is a heterogeneous database of this system or other systems, which is used for distributed storage resources. After configuring the data source information, the task middleware is used to handshake with the data source. After the connection test is successful, it can be used for synchronization.
[0016] To clean and fuse the data in the data source, you need to create a cleaning and fusion metamodel in the resource configuration subsystem, select the metamodel type (single table or multiple tables), and enter the metamodel parameters, such as the metamodel name, metamodel number, and category. Select the data source and the specification library and specification table. Initialize the cleaning and fusion task through the initialization task, start the cleaning and fusion task through the start task, and hand it over to the task middleware for execution. The data in the multi-source heterogeneous library is stored in the specification table after cleaning and fusion. Among them, the specification information model that defines the attributes and relationships of metadata and manages them is called a metamodel. Each type of metadata belongs to a metamodel, and metadata is data that describes objects such as information resources or data; the metamodel is a tool for data collection, data fusion processing, data storage, data display, and data permission control.
[0017] The standardized data formed after cleaning and fusion can be used for cataloging operations. It is necessary to create a cataloging model in the resource configuration subsystem and enter metamodel parameters, such as metamodel name and metamodel number. After creation, you can also add relationships to the metamodel. Initialize the cataloging task through the initialization task, start the cataloging task through the start task, and hand it over to the task middleware for execution. The data instances generated by the cataloging task are stored in the retrieval database. It can be used for subsequent full-text retrieval, image retrieval, and recommendation operations.
[0018] In one embodiment, Figure 1 As shown, a distributed multi-source heterogeneous data resource processing method is provided, which may include the following processing steps S12 to S18: S12, connecting distributed heterogeneous data sources and acquiring source data of each heterogeneous data source into a multi-source heterogeneous library; S14, using the task middleware to use the Trie tree keyword matching algorithm to clean the source data in the multi-source heterogeneous database; S16, using the task middleware to fuse the cleaned source data using a Hash Join algorithm to form fused standard data and store it in a standard table; S18, incrementally extract the specification data in the specification table and complete data cataloging by using the LC incremental extraction method through the task middleware, and update the data instance generated by the cataloging into the target database.
[0019] It can be understood that the above-mentioned heterogeneous data sources refer to various databases / systems that provide source data relative to the database that currently needs to update data resources. These distributed heterogeneous data sources can be configured and selected in the resource configuration subsystem.
[0020] The above-mentioned distributed multi-source heterogeneous data resource processing method, through in-depth research and analysis of distributed resources, divides the resource update processing into three parts: data cleaning, data fusion and data cataloging. First, the Tire tree keyword matching algorithm is used to quickly and accurately realize data deduplication, and then the Hash Join fusion algorithm is used to improve the efficiency of multi-table fusion in combination with actual application scenarios and various fusion requirements. Finally, the LC incremental extraction method is used to realize incremental extraction based on the database transaction log, thereby completing the overall distributed resource update processing. These tasks are all executed in the resource configuration subsystem through the task middleware. Compared with traditional technologies, the efficiency and real-time performance of distributed multi-source heterogeneous data updates under complex and real-time conditions are improved.
[0021] Specifically, the first step in updating distributed resources is data cleaning, also known as data scrubbing or data cleansing. The main object of its application is resource data that does not meet the requirements. Due to the dispersion of distributed resources at the physical level, data that does not meet the requirements can generally be divided into three categories: Incomplete data: Due to some reasons, the data information is missing or damaged, and the original appearance of the data cannot be fully recorded.
[0022] Wrong data: Wrong data is data entered due to an imperfect business system or unexpected situations that are beyond the control of the operator, such as data that has not been input and judged, or wrong data generated by system crashes.
[0023] Duplicate data: refers to duplicate data caused by improper database design, or duplicate data appearing in multidimensional tables.
[0024] In the resource configuration subsystem, the most frequently occurring problem data is distributed resource data redundancy, that is, a large amount of duplicate resource data. When multi-source heterogeneous tables are merged into the specification table to update data, there may be duplicate data between the multi-source heterogeneous tables, that is, data with the same information in all fields. Or, if the data in the multi-source heterogeneous table already exists in the specification table, if data cleaning is not performed, it will cause data redundancy in the specification table, which is not conducive to subsequent cataloging operations. Therefore, it is necessary to perform data deduplication operations, remove duplicate data or use new data to overwrite the original data to update the data in the specification table.
[0025] This embodiment uses the Trie tree (prefix tree) keyword matching algorithm to achieve data deduplication. The Trie tree is constructed using the Trie class, with root as the root node of the Trie tree and the TireNode (tree node) class as the node class of the Trie tree. The TireNode class contains a Map (using a dictionary in Python) child node for storing the current node. The Trie class contains a member method (insert) to insert a keyword into the Trie tree. During the insertion process, the characters are traversed one by one. If there is no corresponding child node for the current character, a new node is created and inserted; if there is a corresponding child node for the current character, the child node is directly obtained to continue traversing. Finally, the current node is marked as the end of the keyword, and the keyword is added to the Set set of the node. The keyword information is obtained by constructing the failure pointer of the Trie tree. The Trie tree is traversed and a failure pointer is set for each node so that the failed node can be quickly backtracked during the search process. At the same time, the matched keyword set is also merged into the Set set of the current node (the set is used to store non-repeated elements). The text to be matched is obtained, and finally the combined keyword is searched through parallel computing to obtain the matching result.
[0026] For example Figure 2 As shown in the figure, if the information under the update field in the specification table is airplane, airship, kite, 12 and 13, Root represents the root node. When a new data is written into the specification table and the update field needs to be matched, the update field of the new data is first converted into a string type, and the matching keyword is quickly queried in the collection through the failure pointer.
[0027] In the data cleaning process, the specific cleaning rules supported by this embodiment include: the rules about rows in the cleaning rules include deleting rows, retaining rows, and deduplicating rows. Deleting rows means deleting a row of data in the table. Retaining rows means retaining a row of data in the table. Deduplicating rows means traversing the entire table and deduplicating rows with duplicate data.
[0028] Take row deduplication as an example to illustrate the data cleaning process of the system: when building the cleaning fusion metamodel, select the table in the data source as the original data, select the standard table in the standard library as the data to be updated, and select the fields that need to be updated in the standard table. Start the cleaning fusion model task, and the task middleware (Tapdata) will synchronously update the original data to the standard table; for the data under the field that needs to be updated, each row is matched with the standard table row by row, and the two rows of data compare the field information field by field. If all the field information of the two rows of data is the same, the new data will overwrite the original data. If the information under one or more fields in the two rows of data is inconsistent, the row of data will be compared with the next row of data in the standard table. If a row of data from the data source table does not match any row of data in the standard table after matching the entire table row by row, it will be stored in the standard table as a new row of data to update the standard table. The specific process is as follows. Figure 3 shown.
[0029] The second step of distributed resource update is data fusion: merging several heterogeneous data tables into a standardized table. This embodiment can support the rapid definition and fusion processing of data sources, data fusion processing algorithms, storage structures after data standardization, and cataloging algorithms for data fusion processing by constructing a set of resource data fusion processing mechanisms for different structures and sources. It can effectively cope with the complexity and real-time nature of distributed resource data. The HashJoin algorithm used is an algorithm for database query optimization, which is mainly used to process equi-join operations. The basic idea of the Hash Join algorithm is to put one of the two tables of the join operation into memory and create a hash table, then scan the other table and use the hash function to find matching items in the hash table. The working process of the Hash Join algorithm can be divided into two stages: the construction stage and the detection stage.
[0030] Build phase: In this phase, the algorithm first selects one of the two tables to be joined (usually the smaller one) as the build input. The algorithm then scans the build input and applies the hash function to each row, storing the results in an in-memory hash table. The choice of hash function has a great impact on the efficiency of the algorithm because it determines the distribution of the hash table.
[0031] Probe Phase: In this phase, the algorithm scans another table (Probe Input) and applies the same hash function to each row. The algorithm then looks for an entry in the hash table that matches the hash value of the probe input. If a match is found, then the two rows meet the join condition and the algorithm outputs them as the result.
[0032] The following example explains the basic processing ideas of the Hash join algorithm. The following example join operation: There are two data sets R and S, where R={11, 11, 11, 35, 35, 46, 46, 46, 46, 51, 89, 89, 89, 100}, S={0, 0, 11, 11, 11, 11, 2, 2, 2, 2, 2, 2, 35, 89, 89, 100, 100, 111}. The first step of the Hash join algorithm is to determine whether the smaller of the two relational tables can be completely stored in the memory. If the memory is large enough and the smaller relational table can be completely placed in the memory, a hash table is directly created for the relational table. This is the simplest Hash join algorithm. Otherwise, partitioning must be used. The second step is to set an internal Hash function on the common attributes of the connection key in the database, and use this function to split the relational data table R and the relational data table S into multiple partitions. There are many ways to calculate the Hash function. Here, the modulus function can be set to the Hash function, that is, Mod10. In this way, ten partitions are generated.
[0033] The hash join algorithm first scans the relation table R and the relation table S to find their common attribute values. Then, the tuples in the two tables are divided according to the hash function on the connection attribute to generate the corresponding hash files, which are represented by HR and HS respectively. Next, for each hash bucket in HR and HS, check the values of the tuples of R and S on the connection attribute. Finally, output the connection result of relation R and relation S.
[0034] In one embodiment, when data fusion is performed on the cleaned source data, the fusion rules used include left join and right join.
[0035] It is understandable that in the resource configuration subsystem, there are multiple tables describing the same thing, but the relationships between these multiple tables are of the following types: (1) When the structures of multiple tables selected in the fusion model are the same, the multiple tables are directly appended and merged in the standard table during fusion.
[0036] (2) For the case where there are main tables and attribute tables in the fusion model, two fusion rules are defined. The connection between the main table and the attribute table is defined by the fusion rules, and supplementation or filtering is performed based on the rules. They are left join (LEFT JOIN) and right join (RIGHT JOIN). When the fusion rule is selected as left join, the leftmost table among the selected multiple tables is the main table, and the other tables are attribute tables. The main table and the attribute table are connected in sequence, and the matching results are returned. If there is no row in the attribute table that matches the left table, a NULL value is returned. Left join is often used to obtain all data in the left table and the related right table data. When the fusion rule is selected as right join, the rightmost table among the selected multiple tables is the main table, and the other tables are attribute tables. Right join is often used to obtain all data in the right table and the related left table data. The above rules are all that the main table performs a full table match search in the attribute table by selecting the field. If the corresponding field can be matched, the other fields of the two tables are fused and stored in the standard table. If no match is found, the field information is stored in the cache middleware of the resource configuration subsystem. If no match is found multiple times, it is regarded as dirty data and cleared.
[0037] (3) For multiple tables with different table structures but describing the same entity, define the connection between different tables by integrating matching rules, filter and query the database based on the rules, and recommend the candidate data for integration. The matching rules between tables in the model are defined by a matching rule group, and a rule group contains multiple matching rules. Matching rules can be divided into single-field matching and multi-field matching according to their types.
[0038] You can use the Hash Join algorithm to merge multiple tables. In multi-table fusion, multiple tables participate in the join operation. This situation usually occurs in multi-table join operations. In this case, you can use the HashJoin algorithm, use one of the tables as the construction input, and then use the other tables as the detection input for the join operation. In the multi-table Hash Join fusion update technology, a query plan is executed by building a multi-table tree Bushy-tree, and then a Hash filter is added to the tree to improve the execution efficiency of the Hash join algorithm, and finally the updated data is obtained. The process is as follows: Figure 4 shown.
[0039] It is necessary to first build a query tree based on the given query statement. Then classify the nodes in the tree to determine whether they are internal nodes or leaf nodes, because in the query tree, the query methods for leaf nodes and internal nodes are different. When the queried node is a leaf node, continue to recursively execute the Join(T) subfunction; if it is an internal node, query the left and right child nodes at the same time, and if data that meets the connection conditions is found, output the connection result. In this way, the Hash Join connection algorithm for multiple relationship tables is completed.
[0040] The third step of distributed resource update is data cataloging. Data cataloging, as the name implies, is to mount data in the selected directory. In the resource configuration subsystem, one of the attributes configured when building the catalog model is the category to which it belongs. This not only mounts the catalog model in the category, but also mounts the instance generated by the catalog task in the category and updates it to the target database. Data instances are generated by extracting the table data in the catalog model from the data source (such as the above-mentioned specification table) one by one.
[0041] For data extraction, this embodiment adopts a multi-data source incremental data extraction method based on a full table comparison method of database transaction logs, which can be referred to as the LC incremental extraction (Log-Contract) method. The LC incremental extraction method is based on transaction log files and completes incremental data extraction through an improved full table comparison method. The LC incremental extraction method analyzes the content of the transaction log and uses the idea of full table comparison to classify and summarize the operations in the source database and then perform batch processing, thereby achieving the purpose of improving extraction efficiency and reducing extraction time.
[0042] The transaction log file of the database is a file used to record the change process of the table in the database. Each operation of the database (such as adding, modifying and deleting) is placed in a transaction T for execution. These operations are first written to the log buffer, that is, the current operation document of the log. When the transaction executing such an operation is committed, or when the database transaction log buffer is full, it is written to the file on the disk. At this time, the transaction log file of the database is formed. When the system fails or the database is damaged for some reason, after restarting the database, the latest transaction log can be used to make corresponding processing according to the completion status of the transaction. If the transaction has been completed before the failure occurs, the transaction can be re-executed according to the log. If the transaction has not been completed before the failure occurs, the undo operation can be performed according to the log to ensure that the database is efficiently and accurately restored to the most recent state before the failure. Therefore, the transaction log of the database system ensures the consistency of the database and the security of the data, which is very important for the maintenance of the database.
[0043] The database transaction log file records the changes in the database, including the start, cancellation, and completion of transactions, as well as various operations of adding, deleting, and modifying data. The data log recording method is represented by the following data:
[0044] in, LSN It is the unique identifier of each record in the transaction log file; TID Represents a single transaction record. E The data object representing the operation, O For database objects, T Record the time of data operation, V is the value after data operation, W The value before the data operation.
[0045] In one embodiment, in the process of incrementally extracting the specification data in the specification table using the LC incremental extraction method, the content in the operation type field of the temporary table established in the target database includes no operation, only delete operation, only update operation and insert first and then update operation.
[0046] It can be understood that the LC incremental extraction (Log-Contract) model is based on the database transaction log and combines the full table comparison method to complete the incremental data extraction method. The following discusses the data extraction process of the LC incremental extraction model in detail.
[0047] like Figure 5 As shown, when data extraction is required, first extract the transaction log file generated by source table A after the most recent data extraction from the source database, parse the transaction log file to obtain the entire operation process from the last time to the present, and then establish a temporary table C in the target database, in which three fields (ID identifier, primary key of table A, operation type) are established. According to the time sequence of the parsed transaction log file, all addition, modification and deletion operations on table A are extracted. At this time, the addition operation is defined as Ad, the modification operation is defined as M, and the deletion operation is defined as D. If an insert operation is performed on table A, the primary key of the newly added data is inserted into temporary table C and Ad is inserted into the operation type; if a certain data in table A is modified, the primary key of the data is found in temporary table C and M is appended after the operation type; if a certain data in table A is deleted, the primary key of the data is found in temporary table C and D is appended after the operation type. In this way, the reading of the parsed transaction log file and the writing process of the temporary table are completed in the order of the transaction log file.
[0048] After completing this step, the contents of the operation type field in temporary table C can be classified into four categories according to the structure: (1) no operation; (2) no matter which operation starts, it ends with D, and there is only one D operation. This operation is called a delete-only operation; (3) only M operations. This operation is called an update-only operation; (4) starts with Ad, ends with M, and there is only one Ad operation. This operation is called an insert-first-update-later operation.
[0049] In the first case, no operation is performed and no description is given. In the second case, no matter whether the data is the original data in source table A or the new data added to source table A after the last extraction, the data is deleted in the end, which means that the data no longer exists in source table A. Therefore, for the data in this case, you only need to delete it in target table B of the target database.
[0050] The third type of situation indicates that the data has been updated multiple times in source table A since the last extraction. The primary key of this type of data exists in both source table A and target table B, but the content is different. Therefore, for this type of data, the data in target table B can be directly updated to the data in source table A based on the primary key. In order to improve the efficiency of the update, the data that meets the conditions in target table B can be deleted first, and then inserted from source table A. This part is similar to the full table deletion and insertion, but it only targets part of the data in the source table, so it will not have much impact on the overall efficiency.
[0051] The data in the fourth case indicates that this type of data is completely new data, and this type of data can be inserted from the source table A to the target table B.
[0052] After the above operations, the incremental extraction process of the database is completed, and finally the temporary table C can be deleted.
[0053] In the resource configuration subsystem, the overall process of data cataloging is as follows: Figure 6 As shown. Create a new catalog model in the resource configuration subsystem, configure the information of the catalog model, select the data source and the category to which it belongs, etc.; the resource configuration subsystem uses the task middleware Tapdata to monitor the logs of each source database and extract the incremental data therein. The source database can include relational databases (such as MySQL), non-relational databases (such as mongoDB), time series databases (such as TDengine), etc.; the data extracted from the database table of the data source are mounted as data instances under the category selected when creating the catalog model, which is convenient for subsequent rapid retrieval and traceability operations. At the same time, the data instance is stored in the database Es (Elasticsearch, a distributed search and analysis engine) and the graph database neo4j, which is convenient for subsequent full-text retrieval and graph retrieval operations.
[0054] It should be understood that although the above process Figure 1 The steps in the process are shown in sequence according to the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in the present invention, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequentially, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0055] In one embodiment, Figure 7 As shown, a distributed multi-source heterogeneous data resource processing system 100 is also provided, including a data acquisition module 11, a data cleaning module 13, a data fusion module 15 and a data cataloging module 17. Among them, the data acquisition module 11 is used to connect the distributed heterogeneous data sources and obtain the source data of each heterogeneous data source into the multi-source heterogeneous library. The data cleaning module 13 is used to clean the source data in the multi-source heterogeneous library by using the Trie tree keyword matching algorithm through the task middleware. The data fusion module 15 is used to fuse the cleaned source data by using the Hash Join algorithm through the task middleware, form the fused standard data and store it in the standard table. The data cataloging module 17 is used to incrementally extract the standard data in the standard table by using the LC incremental extraction method through the task middleware and complete the data cataloging, and update the data instance generated by the cataloging to the target database.
[0056] The above-mentioned distributed multi-source heterogeneous data resource processing system 100, through in-depth research and analysis of distributed resources, divides the resource update processing into three parts: data cleaning, data fusion and data cataloging. First, the Tire tree keyword matching algorithm is adopted to quickly and accurately realize data deduplication, and then the Hash Join fusion algorithm is adopted to improve the efficiency of multi-table fusion in combination with actual application scenarios and various fusion requirements. Finally, the LC incremental extraction method is adopted to realize incremental extraction based on the database transaction log, thereby completing the overall distributed resource update processing. These tasks are all executed in the resource configuration subsystem through the task middleware. Compared with traditional technologies, the efficiency and real-time performance of distributed multi-source heterogeneous data updates under complex and real-time conditions are improved.
[0057] In one embodiment, when data fusion is performed on the cleaned source data, the fusion rules used include left join and right join.
[0058] In one embodiment, in the process of incrementally extracting the specification data in the specification table using the LC incremental extraction method, the content in the operation type field of the temporary table established in the target database includes no operation, only delete operation, only update operation and insert first and then update operation.
[0059] It can be understood that the explanation of each feature in each embodiment of the above-mentioned distributed multi-source heterogeneous data resource processing system 100 can be understood in the same way as the explanation of the corresponding features of each embodiment of the above-mentioned distributed multi-source heterogeneous data resource processing method, and will not be repeated here. Each module in the above-mentioned distributed multi-source heterogeneous data resource processing system 100 can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of a device with data processing functions in the form of hardware, or can be stored in the memory of the aforementioned device in the form of software, so that the processor can call and execute the operations corresponding to the above modules. The aforementioned device can be but not limited to various types of data computing and processing devices already available in the art.
[0060] In one embodiment, a computer device is also provided, including a memory and a processor, the memory stores a computer program, and the processor implements the following processing steps when executing the computer program: connecting distributed heterogeneous data sources and acquiring source data of each heterogeneous data source into a multi-source heterogeneous library; using a Trie tree keyword matching algorithm through a task middleware to clean the source data in the multi-source heterogeneous library; using a Hash Join algorithm through the task middleware to fuse the cleaned source data to form fused standard data and store it in a standard table; using an LC incremental extraction method through the task middleware to incrementally extract the standard data in the standard table and complete data cataloging, and update the data instances generated by the cataloging into the target database.
[0061] It can be understood that the above-mentioned computer device, in addition to the memory and processor mentioned above, may also include other software and hardware components not listed in this specification, which can be determined according to the model of the specific data processing device in different application scenarios, and this specification will not list them one by one in detail.
[0062] In one embodiment, when the processor executes the computer program, it can also implement the steps or sub-steps added in each embodiment of the above-mentioned distributed multi-source heterogeneous data resource processing method.
[0063] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus dynamic random access memory (RambusDRAM, referred to as RDRAM) and interface dynamic random access memory (DRDRAM).
[0064] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification. The above embodiments only express several implementation methods of the present invention, and their descriptions are relatively specific and detailed, but they cannot be understood as limiting the scope of protection of the invention. It should be pointed out that for ordinary technicians in this field, without departing from the concept of the present invention, several variations and improvements can be made, all of which belong to the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be based on the attached claims.
Claims
1. A distributed multi-source heterogeneous data resource processing method, characterized in that: Includes steps: Connecting distributed heterogeneous data sources and acquiring source data of each of the heterogeneous data sources into a multi-source heterogeneous library; Using the task middleware to use the Trie tree keyword matching algorithm to clean the source data in the multi-source heterogeneous library; The task middleware uses a Hash Join algorithm to fuse the cleaned source data to form fused standard data and store it in a standard table; The task middleware uses the LC incremental extraction method to incrementally extract the specification data in the specification table and complete the data cataloging, and updates the data instances generated by the cataloging into the target database.
2. The distributed multi-source heterogeneous data resource processing method according to claim 1, characterized in that: When performing data fusion on the cleaned source data, the fusion rules used include left join and right join.
3. The distributed multi-source heterogeneous data resource processing method according to claim 1 or 2, characterized in that: In the process of incrementally extracting the specification data in the specification table using the LC incremental extraction method, the content of the operation type field of the temporary table established in the target database includes no operation, only delete operation, only update operation and insert first and then update operation.
4. A distributed multi-source heterogeneous data resource processing system, characterized in that: include: A data acquisition module, used to connect distributed heterogeneous data sources and acquire source data of each heterogeneous data source into a multi-source heterogeneous library; A data cleaning module is used to clean the source data in the multi-source heterogeneous library by using a Trie tree keyword matching algorithm through a task middleware; A data fusion module, used to fuse the cleaned source data using a Hash Join algorithm through the task middleware to form fused standard data and store it in a standard table; The data cataloging module is used to incrementally extract the specification data in the specification table and complete data cataloging by using the LC incremental extraction method through the task middleware, and update the data instances generated by the cataloging into the target database.
5. The distributed multi-source heterogeneous data resource processing system according to claim 4, characterized in that: When performing data fusion on the cleaned source data, the fusion rules used include left join and right join.
6. The distributed multi-source heterogeneous data resource processing system according to claim 4 or 5, characterized in that: In the process of incrementally extracting the specification data in the specification table using the LC incremental extraction method, the content of the operation type field of the temporary table established in the target database includes no operation, only delete operation, only update operation and insert first and then update operation.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the distributed multi-source heterogeneous data resource processing method described in any one of claims 1 to 3 are implemented.
