A method and system for automatically generating association paths between tables

By automatically obtaining and evaluating the correlation paths between tables, the problem of time-consuming and possible errors in manual research is solved, concise and accurate acquisition of correlation information is achieved and development efficiency is improved.

CN113760895BActive Publication Date: 2024-10-18BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110037178.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-12
Publication Date
2024-10-18
Estimated Expiration
2041-01-12

Smart Images

  • Figure CN113760895B_ABST
    Figure CN113760895B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for automatically generating association paths between tables, and relates to the field of computer technology. A specific implementation of the method includes: obtaining all fields included in a plurality of tables to be associated; using paired similar fields between tables as association fields, associating any two tables with at least one pair of association fields to obtain a first-degree association path, and then obtaining all first-degree association paths; using the same table between the first-degree association paths as a connection table, and connecting multiple first-degree association paths one by one in series without including duplicate tables, to generate an association path between tables. This implementation reduces the time cost and error rate of obtaining table association paths, and improves development efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and system for automatically generating effective association paths between tables. Background Art

[0002] In market or technology development, the first thing to do is to find and analyze the problems to be solved so that development can be carried out in a targeted manner. Therefore, developers need to investigate the existing operation data to find the connection between things or matters to find problems. However, currently, developers need to spend a lot of time manually investigating the data in the latest operation logs of all tables in the data warehouse to obtain the effective connection between the concepts of the tables, that is, to obtain the effective dimension association path to help subsequent development. In addition, the association path obtained by manual investigation may contain errors, which in turn affects data quality and reduces development efficiency. Summary of the invention

[0003] In view of this, an embodiment of the present invention provides a method and system for automatically generating effective association paths between tables, which can automatically generate effective association paths between a large number of tables without manual investigation, thereby eliminating interference caused by human factors.

[0004] To achieve the above object, according to one aspect of an embodiment of the present invention, a method for automatically generating an association path between tables is provided, comprising:

[0005] Get all the fields included in the multiple tables to be associated;

[0006] Using pairs of similar fields between the tables as association fields, any two tables having at least one pair of the association fields are associated to obtain a first-degree association path, and then all the first-degree association paths are obtained;

[0007] The same table between the paths of the first degree of association is used as a connection table, and a plurality of the paths of the first degree of association are connected in series one by one without including duplicate tables, so as to generate the inter-table association paths.

[0008] According to one aspect of an embodiment of the present invention, a method for automatically generating an association path between tables is provided, wherein:

[0009] Connecting the plurality of first-degree association paths in series one by one without including the repeated tables specifically comprises:

[0010] When the current path is to be connected to the new 1-degree associated path, among the neighbor tables associated with all the 1-degree associated paths in the connection table to be connected, the neighbor tables that have appeared in the current path are eliminated, and the remaining neighbor tables are respectively associated with the connection table to be connected to respectively connect the new 1-degree associated paths, thereby obtaining more than one new extended path.

[0011] According to one aspect of an embodiment of the present invention, a method for automatically generating an association path between tables is provided, wherein:

[0012] If there is a containment relationship between the associated fields of the two adjacent one-degree associated paths of the last two of any one of the inter-table associated paths, the inter-table associated path is deleted.

[0013] According to one aspect of an embodiment of the present invention, a method for automatically generating an association path between tables is provided, wherein:

[0014] For the penultimate table of any one of the inter-table association paths, if there is an inclusion relationship between the fields of the penultimate table that are respectively used to form the association fields of the two penultimate adjacent 1-degree association paths, the inter-table association path is deleted.

[0015] According to one aspect of an embodiment of the present invention, a method for automatically generating an association path between tables is provided, wherein:

[0016] For any inter-table association path generated according to the starting point target field and the ending point target field, when the ending point target field is included in the association field of the penultimate 1-degree association path of the inter-table association path, the inter-table association path is deleted.

[0017] According to one aspect of an embodiment of the present invention, a method for automatically generating an association path between tables is provided, wherein:

[0018] After all the 1-degree association paths are obtained, for each 1-degree association path, the table similarity between the two tables is determined, and it is determined whether to remove the 1-degree association path formed by the two tables according to the table similarity.

[0019] According to one aspect of an embodiment of the present invention, a method for automatically generating an association path between tables is provided, wherein:

[0020] The table similarity between the two tables is determined as follows:

[0021] The text similarity between each two fields is evaluated by the TF-IDF statistical method, and the semantic similarity between the two fields is calculated by the BERT algorithm, and the number of similar fields in the two tables is determined based on the text similarity and the semantic similarity, and

[0022] When the number of similar fields is higher than a predetermined value, it is determined that the table similarity between the two tables is high, and then the one-degree association path formed by the two tables is eliminated.

[0023] According to another aspect of an embodiment of the present invention, a system for automatically generating an association path between tables is provided, comprising:

[0024] An extraction module obtains all fields included in the multiple tables to be associated;

[0025] A pre-association module, using the paired similar fields between the tables as association fields, associating any two tables having at least one pair of the association fields to obtain a first-degree association path, and further obtaining all the first-degree association paths;

[0026] The association module uses the same table between the one-degree association paths as a connection table, and serially connects a plurality of the one-degree association paths one by one without including duplicate tables, so as to generate the inter-table association paths.

[0027] According to another aspect of an embodiment of the present invention, there is provided an electronic device for automatically generating an association path between tables, comprising:

[0028] one or more processors; and

[0029] a storage device for storing one or more programs,

[0030] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for automatically generating an association path between tables as described in any one aspect of an embodiment of the present invention.

[0031] According to another aspect of the embodiments of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method for automatically generating an association path between tables as described in any one aspect of the embodiments of the present invention is implemented.

[0032] An embodiment of the above invention has the following advantages or beneficial effects: because the association path between tables is automatically generated by calculation and the duplicate associated tables and fields are excluded, the technical problem that manual investigation of the table association path takes a lot of time and may have errors is overcome, thereby achieving the technical effect of obtaining concise and accurate association information and improving development efficiency.

[0033] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0035] Figure 1 is a schematic diagram of the main process of the method for automatically generating association paths between tables according to an embodiment of the present invention;

[0036] Figure 2 An example of SQL statements in the run log of the extracted and cleaned table is shown;

[0037] Figure 3 An example of multiple 1st degree association paths obtained by pre-association is shown;

[0038] Figure 4 Show examples for illustrating similarities between tables;

[0039] Figure 5 An example of a valid association path obtained by the method for automatically generating an association path between tables according to an embodiment of the present invention is shown;

[0040] Figure 6 is a schematic diagram of main modules of a system for automatically generating association paths between tables according to an embodiment of the present invention;

[0041] Figure 7 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0042] Figure 8 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0043] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0044] Figure 1 FIG. 1 is a schematic diagram of the main process of the method for automatically generating an association path between tables according to an embodiment of the present invention. Figure 1As shown, the method for automatically generating inter-table association paths according to an embodiment of the present invention mainly includes the following steps: S101 obtaining all fields included in the tables of the multiple tables to be associated; S102 using the paired similar fields between the tables as the association fields, associating any two tables with at least one pair of the association fields to obtain a 1-degree association path, and then obtaining all the 1-degree association paths; and S103 using the same tables between the 1-degree association paths as the linking tables, and serially connecting the multiple 1-degree association paths one by one without including the repeated tables, to generate the inter-table association paths. Figures 2 to 5 Each step of the method according to the embodiment of the present invention is described in detail.

[0045] Step S101:

[0046] First, retrieve the latest operation logs of all tables in the data warehouse, extract the SQL statements in the logs, and clean the statements to remove interfering characters such as comments. The results are as follows: Figure 2 As shown. Figure 2 In the table, "task_id" is the id of the table task, "log_id" is the logical address id of the table, "task_status" indicates the status of the table, "join_keyword" is the connection keyword, and "sql" is the cleaned SQL statement. Then extract the fields in the table based on the cleaned SQL statement.

[0047] Step S102:

[0048] Find similar and identical fields between all tables. For any two tables with at least one pair of similar or identical fields, pre-associate the two tables with the similar or identical fields as the association fields to form the shortest table association path, called the 1-degree association path, and in this way obtain all 1-degree association paths existing in all tables. Note that this step involves a huge amount of calculation, so it can be completed by training a machine learning model.

[0049] Figure 3 An example of multiple 1st degree association paths obtained by pre-association is shown. Figure 3 In , "left_table" and "right_table" represent two tables that form a 1-degree association path, which are conveniently called "left table" and "right table", or "left node" and "right node" of the 1-degree association path; "left_column" and "right_column" are a pair of association fields that associate the left table with the right table; "left_column_size" and "right_column_size" are the sizes of the tables. For example, in Figure 3In the table gdm_m03_glb_item_sku_da is associated with the table gdm_m01_glb_vender_da to obtain the "vender_id" dimension.

[0050] In addition, for the convenience of description, a 1st degree association path is called the 1st degree association path of its left table. Figure 3 In FIG. 1 , the association path between the table gdm_m03_glb_item_sku_da and the table gdm_m01_glb_vender_da is described as a 1st degree association path of the table gdm_m03_glb_item_sku_da and is expressed as gdm_m03_glb_item_sku_da→gdm_m01_glb_vender_da.

[0051] Step S103:

[0052] After all the first-degree association paths are obtained, multiple first-degree association paths are connected in series one by one to finally generate the inter-table association paths while ensuring that no duplicate tables are included. In addition, by deleting the paths that are not the finest granularity of the main association fields between tables (the association primary keys between tables), a valid inter-table association path is obtained. The specific process is described in detail below.

[0053] <Remove the first-degree association paths with high table similarity>

[0054] In step S102, as long as there are similar or identical fields between the two tables, the two tables are associated to form a 1st degree association path. However, such a simple association will lead to a large number of repeated or invalid associations. For example, through an "order number" field, the "order", "completion" and "delivery" tables may be associated with each other. However, these tables only describe different states of the same order and have a high degree of similarity. Even if they are associated, they cannot bring out new valid information, so they are invalid over-associations. Therefore, in order to ensure the effectiveness of the association between tables, it is necessary to eliminate the 1st degree association paths formed by these tables that are over-associated due to high similarity.

[0055] In order to eliminate the 1st-degree association paths with high similarity, first obtain all the field names, field descriptions, field types and field data volumes in each table, and use the well-known TF-IDF statistical method to calculate the field names, field types and field data volumes. During the calculation, the field names, types and other words are split into individual letters, and then concatenated into vector form for calculation. An n*m row of calculation results can be calculated, and a text similarity evaluation value is obtained based on the calculation result to evaluate the text similarity between the two fields. Then, the well-known BERT algorithm is used to calculate the field descriptions containing meaning to obtain a semantic similarity evaluation value to evaluate the semantic similarity between the two fields. The average of the text similarity evaluation value and the semantic similarity evaluation value of each pair of fields is then calculated, and the results of the obtained text similarity evaluation value, semantic similarity evaluation value and their average values ​​are as follows, for example. Figure 4 shown.

[0056] exist Figure 4 In the table, "test_data" and "standard_data" are the names of the two tables, "t fidf_similarity" and "bert_similarity" represent the text similarity evaluation value and the semantic similarity evaluation value, respectively, and "average" is the average of the two evaluation values. The threshold for evaluating the similarity between two fields can be selected in an appropriate manner according to actual needs, and then the similarity between all fields can be determined based on the threshold. For example, a value can be appropriately selected from the average value as the threshold, and if it is equal to or higher than the threshold, the two fields are determined to be similar, and if it is lower than the threshold, the two fields are determined to be dissimilar. Of course, the threshold can also be selected based on the text similarity evaluation value and / or the semantic similarity evaluation value and various combinations of them with the average value, and can also be calculated using various empirical formulas.

[0057] For any two tables, if there are fields that are judged to be similar, the number of similar fields between the two tables is calculated. A threshold is also selected here. When the number of similar fields is greater than or equal to the threshold, the two tables are judged to be similar, that is, the 1-degree association path formed by the two tables is an over-associated path, so the 1-degree association path is eliminated; when the number of similar fields is less than the threshold, the two tables are judged to be dissimilar, so the 1-degree association path formed by the two tables is retained. The setting of the two thresholds mentioned above can be determined based on the judgment experience of a large number of samples.

[0058] <Building N-degree effective association paths between tables>

[0059] Before constructing the N-degree association path, first remove the right table that cannot participate in the path construction due to business rule restrictions in all the 1-degree association paths obtained in step S102. Therefore, such a table restricted by the business rules can be used as the starting table to associate with other tables without being associated through other tables.

[0060] Then, based on the remaining 1-degree association paths, an adjacency table is constructed. For example, the 1-degree association paths of table A include A→B, A→C, and A→D, so the constructed adjacency table is:

[0061] A:[B,C,D],

[0062] When table A is referred to as node A in the path, tables B, C, and D are referred to as neighbor nodes in the adjacency list of table A.

[0063] After all adjacency lists are constructed, a table O is randomly selected as the starting node, and its i (i is an integer and 2≤i≤N) degree associated path is calculated based on the adjacency table as the extended path, and the current degree and extended path are stored in the hash table. The specific calculation process includes the following steps:

[0064] (1) Based on all the remaining 1-degree associated paths, obtain the neighbor nodes in the adjacency list of the rightmost node of the current i-1 degree extended path. For example, the rightmost node of the current extended path O→…X→A is A, so obtain the neighbor nodes B, C, and D of node A.

[0065] (2) Traverse the neighbor nodes obtained in step (1) and remove the nodes that have appeared in the current path. For example, if node D has appeared in the current path O→…D→…→X→A, remove node D from the adjacency list of table A to obtain A:[B,C].

[0066] (3) After removing duplicate nodes in step (2), the remaining neighbor nodes are added to the end of the current extended path in step (1) to form an i-degree extended path. For example, the remaining neighbor nodes B and C are added to the rightmost position of the extended path O→…X→A to obtain two new i-degree extended paths O→…X→A→B and O→…X→A→C.

[0067] (4) Whenever a new node is connected, calculate in real time whether the newly constructed extended path is a valid path. The criterion for determining a valid path here is that the inter-table association primary key (hereinafter referred to as the "-1 association primary key" for convenience) between the newly connected node (hereinafter referred to as the "-1 node" for convenience) and the rightmost node before the connection (hereinafter referred to as the "-2 node" for convenience) is the finest granularity. When the -1 association primary key is determined to be the finest granularity, the newly constructed extended path is considered to be a valid path and the path is retained and stored in the hash table; when the -1 association primary key is determined not to be the finest granularity, the newly constructed extended path is considered invalid and is deleted.

[0068] The concept of the finest granularity and the method for determining a valid path based on the finest granularity are described in detail below.

[0069] Assume that table A can be associated with table B, and table B can be associated with table C. Since some fields may appear multiple times in multiple tables according to actual operations, the associated fields of A→B may be repeated with the associated fields of B→C. At this time, although the path A→B→C does not include repeated tables, it is not associated with new fields through the association between the three tables, which leads to data duplication. Therefore, A→B→C is a repeated invalid path and should be deleted. At this time, it is considered that the associated fields of A→B and B→C are not the finest granularity.

[0070] It can be seen that the finest granularity refers to the most detailed field between tables that does not cause duplication of associated fields. Taking online shopping orders as an example, the order table contains two fields, "order number" and "order detail number". Orders have multiple states such as order placement, completion, outbound and receipt, so there will be multiple records for the order number of the same order. If the order number is used as an associated field to associate with other tables, a many-to-many situation will occur. The order detail number is unique to an order, that is, each state of an order shares a unique order detail number. At this time, if the order detail number is used as an associated field to associate with other tables, the data will not be repeated, so it is considered that the order detail number is the finest granularity when it is used as an associated field.

[0071] The method for determining the effective path based on the finest granularity is as follows.

[0072] 1) Taking the above path A→B→C as an example, for example, extract the associated field a1=b1 of the path A→B, and the associated fields b2=c1 and b3=c2 of the path B→C.

[0073] 2) Select node -2 from the current path as the target node for the finest granularity and validity judgment, that is, use node B as the target node for judgment.

[0074] 3) Determine whether the b2 and b3 fields are both included in the b1 field. If the judgment result is "no", the b2 and b3 fields are not repeated with the b1 field, and the path is determined to be valid; if b2 and b3 are both included in b1, the associated fields of B→C appear in the associated fields of A→B. At this time, the data is repeated, and this path is determined to be an invalid path and is deleted.

[0075] In step 3), SQL is constructed to determine whether the associated primary key is the finest granularity. The constructed SQL is: SELECTCOUNT(distinct b1)AS nums_1,COUNT(distinct b1,b2,b3)AS nums_2FROM(SELECT*FROMB WHERE b1 IS NOT NULL AND b2 IS NOT NULL AND b3 IS NOT NULL ORDERBY rand()LIMIT 10000)a. Calculate the SQL to determine whether the fields "nums_1" and "nums_2" are non-zero and equal. If they are equal, it means that the b2 and b3 fields are not repeated with the b1 field, proving that the associated fields used by the path A→B→C are all the finest granularity, so the i-degree path is retained and used for the subsequent i+1-degree path construction; if they are not equal, it proves that the b2 and b3 fields are repeated with the b1 field, so the associated fields are not the finest granularity, so the path is deleted.

[0076] Through the above steps (1) to (4), an i-degree associable path is obtained. Steps (1) to (4) are repeated to obtain an i+1-degree associative path, and the steps are iterated until the required N-degree valid associative path is obtained. Figure 5 An example of a valid association path obtained is shown in Figure 5 As shown, the "graph_key" column shows the table names of the first and last nodes of the obtained valid association path, the "graph_value" column shows the table name of each node in the path, the "degree" shows the degree of the path, and the "all_connect_key" shows the association field between every two tables.

[0077] <Real-time calculation of whether the dimension selected by the user is the most fine-grained field associated with the valid path>

[0078] When the user needs to associate two dimensions, with the table where one dimension is located as the starting node and the table where the other dimension is located as the ending node, a batch of association paths with the pair of starting nodes and ending nodes can be obtained through the above association method. However, for the dimension selected by the user, these paths may not all be valid association paths. For example, if the dimension field selected by the user is repeated with the primary key associated with -1, it means that the association between the -1 node as the ending node and the -2 node is repeated and invalid; only when the dimension field selected by the user is not repeated with the primary key associated with -1, it means that the -2 node is associated with the -1 node through valid new information to obtain the current path, and therefore the current path is valid.

[0079] This real-time calculation process is similar to the above-mentioned finest-grained judgment. Take the path A→B→C as an example. Assuming that the dimensions selected by the user are a1 and c3, the associated field a1 of the path A→B is b1, and the associated fields b2=c1 and b3=c2 of the path B→C are not repeated with the b1 field. The path A→B→C is valid. However, when the c1 and c2 fields are repeated with the c3 field, since the b2 and b3 fields are associated with the c1 and c2 fields and then with the c3 field (b2+b3=c1+c2=c3), it means that the b2 and b3 fields of table B can be associated with the dimension c3. Therefore, it is not necessary to associate the B table with the C table. That is, the final B→C is still duplicated and invalid, and the path should be deleted. On the contrary, if the c1 and c2 fields are not repeated with the c3 field, then starting from the field a1 of table A, through different fields b1, b2 and b3, it is finally associated with the dimension field c3. The path is not repeated, that is, it is valid.

[0080] The specific calculation process is as follows. Similarly, the SQL is constructed as follows: SELECT count(distinct c3)AS nums_1, count(distinct c1, c2, c3)AS nums_2FROM(SELECT*FRO MC WHERE c1 IS NOT NULL ANDc2 IS NOT NULL AND c3IS NOT NULL ORDER BY rand()LIMIT 10000)a. The SQL is calculated in real time to determine whether the fields "nums_1" and "nums_2" are non-zero and equal. If they are equal, it means that c3 and c1+c2 are not repeated, proving that the path A→B→C corresponding to the dimension c3 selected by the user is a valid dimension association path, so the valid association path is retained for analysis; if they are not equal, it proves that there is a duplication between c3 and c1+c2, and data duplication occurs in the path, so the path is considered invalid and deleted.

[0081] Through the above steps, a valid association path between tables can be automatically generated.

[0082] The above describes a method for automatically generating an association path between tables according to an embodiment of the present invention. Figure 6 A system 200 for automatically generating association paths between tables according to an embodiment of the present invention is described.

[0083] like Figure 6 As shown, the system 200 for automatically generating association paths between tables according to an embodiment of the present invention includes:

[0084] Extraction module 201, obtaining all fields included in the multiple tables to be associated;

[0085] A pre-association module 202 uses the paired similar fields between the tables as association fields, associates any two tables having at least one pair of the association fields to obtain a first-degree association path, and obtains all the first-degree association paths; and

[0086] The association module 203 uses the same table between the 1-degree association paths as a connection point, and connects a plurality of the 1-degree association paths in series one by one without including duplicate tables, so as to generate the inter-table association paths.

[0087] According to the method and system for automatically generating association paths between tables in the embodiments of the present invention, since the association paths between tables are automatically generated by calculation and duplicate associated tables and fields are excluded, the technical problem that manual investigation of association paths between tables takes a lot of time and may result in errors is overcome, thereby achieving the technical effect of obtaining concise and accurate association information and improving development efficiency.

[0088] Figure 7 An exemplary system architecture 700 is shown to which the method for automatically generating a correlation path between tables or the system for automatically generating a correlation path between tables according to an embodiment of the present invention can be applied.

[0089] like Figure 7 As shown, system architecture 700 may include terminal devices 701, 702, 703, network 704 and server 705. Network 704 is used to provide a medium for communication links between terminal devices 701, 702, 703 and server 705. Network 704 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0090] Users can use terminal devices 701, 702, and 703 to interact with server 705 through network 704 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 701, 702, and 703, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).

[0091] The terminal devices 701 , 702 , and 703 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0092] The server 705 may be a server that provides various services, such as a backend management server (only for example) that supports shopping websites browsed by users using the terminal devices 701, 702, and 703. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only for example) to the terminal device.

[0093] It should be noted that the method for automatically generating an inter-table association path provided in the embodiment of the present invention is generally executed by the server 705 , and accordingly, the system for automatically generating an inter-table association path is generally disposed in the server 705 .

[0094] It should be understood that Figure 7 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0095] Reference below Figure 8 , which shows a schematic diagram of the structure of a computer system 800 of a terminal device suitable for implementing an embodiment of the present invention. Figure 8 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0096] like Figure 8 As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage part 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the system 800 are also stored. The CPU 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0097] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that a computer program read therefrom is installed into the storage section 808 as needed.

[0098] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the central processing unit (CPU) 801, the above-mentioned functions defined in the system of the present invention are executed.

[0099] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0100] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0101] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be set in a processor. For example, they may be described as: a processor includes a sending module, an acquisition module, a determination module, and a first processing module. The names of these modules do not, in some cases, constitute limitations on the modules themselves. For example, the sending module may also be described as a "module for sending a picture acquisition request to the connected server."

[0102] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes:

[0103] Get all the fields included in the multiple tables to be associated;

[0104] Using pairs of similar fields between the tables as association fields, any two tables having at least one pair of the association fields are associated to obtain a first-degree association path, and then all the first-degree association paths are obtained;

[0105] The same table between the paths of the first degree of association is used as a connection table, and a plurality of the paths of the first degree of association are serially connected one by one without including duplicate tables, so as to generate the inter-table association paths.

[0106] According to the technical solution of the embodiment of the present invention, since the association path between tables is automatically generated by calculation and the tables and fields with repeated associations are excluded, the technical problem that manual investigation of the association path between tables takes a lot of time and may have errors is overcome, thereby achieving the technical effect of obtaining concise and accurate association information and improving development efficiency.

[0107] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for automatically generating association paths between tables, It is characterized in that include: Get all the fields included in the multiple tables to be associated; Using pairs of similar fields between the tables as association fields, any two tables having at least one pair of the association fields are associated to obtain a first-degree association path, and then all the first-degree association paths are obtained; Using the same table between the first-degree association paths as a connection table, and serially connecting a plurality of the first-degree association paths one by one without including duplicate tables, to generate an inter-table association path; The method for determining the table similarity between the two tables is as follows: The text similarity between each two fields is evaluated by the TF-IDF statistical method, and the semantic similarity between the two fields is calculated by the BERT algorithm, and the number of similar fields in the two tables is determined based on the text similarity and the semantic similarity, and When the number of similar fields is higher than a predetermined value, it is determined that the table similarity between the two tables is high, and then the one-degree association path formed by the two tables is eliminated.

2. The method according to claim 1, It is characterized in that in, Connecting the plurality of first-degree association paths in series one by one without including the repeated tables specifically comprises: When the current path is to be connected to the new 1-degree associated path, among the neighbor tables associated with all the 1-degree associated paths in the connection table to be connected, the neighbor tables that have appeared in the current path are eliminated, and the remaining neighbor tables are respectively associated with the connection table to be connected to respectively connect the new 1-degree associated paths, thereby obtaining more than one new extended path.

3. The method according to claim 1 or 2, It is characterized in that in, If there is a containment relationship between the associated fields of the two adjacent one-degree associated paths of the last two of any one of the inter-table associated paths, the inter-table associated path is deleted.

4. The method according to claim 3, It is characterized in that in, For the penultimate table of any one of the inter-table association paths, if there is an inclusion relationship between the fields of the penultimate table that are respectively used to form the association fields of the two penultimate adjacent 1-degree association paths, the inter-table association path is deleted.

5. The method according to claim 1 or 2, It is characterized in that in, For any inter-table association path generated according to the starting point target field and the ending point target field, when the ending point target field is included in the association field of the penultimate 1-degree association path of the inter-table association path, the inter-table association path is deleted.

6. The method according to claim 1 or 2, It is characterized in that in, After all the 1-degree association paths are obtained, for each 1-degree association path, the table similarity between the two tables is determined, and it is determined whether to remove the 1-degree association path formed by the two tables according to the table similarity.

7. A system for automatically generating association paths between tables, It is characterized in that include: An extraction module obtains all fields included in the multiple tables to be associated; A pre-association module, using the paired similar fields between the tables as association fields, associating any two tables having at least one pair of the association fields to obtain a first-degree association path, and further obtaining all the first-degree association paths; an association module, using the same table between the first-degree association paths as a connection table, and serially connecting a plurality of the first-degree association paths one by one without including duplicate tables, so as to generate an inter-table association path; The method for determining the table similarity between the two tables is as follows: The text similarity between each two fields is evaluated by the TF-IDF statistical method, and the semantic similarity between the two fields is calculated by the BERT algorithm, and the number of similar fields in the two tables is determined based on the text similarity and the semantic similarity, and When the number of similar fields is higher than a predetermined value, it is determined that the table similarity between the two tables is high, and then the one-degree association path formed by the two tables is eliminated.

8. An electronic device for automatically generating an association path between tables, It is characterized in that include: one or more processors; as well as a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.

9. A computer readable medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Semantic association mining method for defect report and mail list

    CN106649557A