A method for visualizing data blood relationship

By using recursive querying and view data object construction methods, the problem of the inability to fully display data lineage in existing technologies has been solved, enabling unlimited-level lineage display and highlighting, and supporting multi-directional tracing.

CN114780631BActive Publication Date: 2025-02-28CHENGDU FENGSHUN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210457176.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-27
Publication Date
2025-02-28
Estimated Expiration
2042-04-27

AI Technical Summary

Technical Problem

In existing data platforms, data lineage visualization can only view the direct upstream and downstream of the current field, and cannot display lineage relationships at more levels. Furthermore, it cannot view the lineage relationships of all fields in the entire table, and fields in the same target table are scattered, making it impossible to trace the source at a cascading level.

Method used

The client recursively queries the server for all source fields involved in the target field of the target table, constructs a transformation table-level lineage relationship table, and recursively constructs all tables and field relationships involved in the lineage using view data objects. Combined with the system's visual configuration information, a lineage relationship diagram is drawn, supporting focused highlighting of the lineage path.

Benefits of technology

It enables viewing the lineage of all source and target fields in the current table, with unlimited levels of display and support for cascading upstream or downstream, clearly showing the data lineage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114780631B_ABST
    Figure CN114780631B_ABST
Patent Text Reader

Abstract

The present invention discloses a data lineage visualization method, comprising: a client transmits parameters to a server to recursively query all source fields involved in a target field of a target table from a database, and obtain a conversion table-level lineage table; create a view data object; use the conversion table-level lineage table and a set A to recursively construct a lineage-related field relationship set B, and assign it to the attributes of the view data object; obtain system visualization configuration information, and assign the configuration information to the attributes of the view data object; use the set A and the configuration information to calculate a view drawing object set C, and assign it to the attributes of the view data object; use the set B and the configuration information to calculate a view drawing line set D, and assign it to the attributes of the view data object; format the finally obtained view data object into text and transmit it to the client; the client constructs a coordinate system, and uses the view drawing object set C to draw a view. The present invention can comprehensively and intuitively display data lineage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of data processing, and in particular relates to a data kinship visualization method. Background Art

[0002] ETL is the abbreviation of Extract-Transform-Load, which is used to describe the process of extracting, transforming, and loading data from the source to the destination. The term ETL is more commonly used in data warehouses, but its objects are not limited to data warehouses. ETL is the process of extracting, cleaning, and transforming the data of the business system and loading it into the data warehouse. The purpose is to integrate the scattered, messy, and non-standard data in the enterprise to provide an analytical basis for the enterprise's decision-making. ETL is an important part of the BI (Business Intelligence) project.

[0003] A term often mentioned in data governance is lineage analysis. Lineage analysis is a means to ensure data fusion and to achieve traceability of data fusion processing. Big data lineage refers to the link in which data is generated. To put it bluntly, it is how our data comes from and what processes and stages it has gone through.

[0004] Data lineage is also called data origin or data genealogy. Any data, from generation, ETL processing, processing, fusion, circulation, to final extinction, will naturally form a relationship between the data. Just like interpersonal relationships in human society, a similar relationship is used to express this relationship between data, which is called the blood relationship of data. From a technical point of view, data A generates data B through ETL processing, so we would say that data A and data B have a blood relationship. However, it is slightly different from the blood relationship of humans. The blood relationship of data also has some personalized characteristics.

[0005] In some existing data platforms, the visualization of data lineage relationships can only show the direct upstream and downstream of the current field, and cannot directly display and view lineage relationships at more levels; and it is for single field viewing, and cannot view the lineage relationships of all fields in the entire table. In some existing data platforms, although data lineage relationship visualization can be viewed at multiple levels, the fields in the same target table are scattered, and can only be traced upstream through the target table. Summary of the invention

[0006] In order to solve the above problems, the present invention proposes a data lineage visualization method, which can comprehensively and intuitively display data lineage.

[0007] To achieve the above object, the technical solution adopted by the present invention is: a data kinship visualization method, comprising the steps of:

[0008] S10, the client transmits parameters to the server to recursively query all source fields involved in the target field of the target table from the database to obtain a conversion table-level blood relationship table;

[0009] S20, create a view data object: determine whether the conversion table-level kinship table is empty. If it is empty, set the view data object attribute code to an error code, and set the attribute information to the kinship information of the table that has not been queried, and proceed to step S70; if it is not empty, set the view data object attribute code to a correct code, and proceed to the next step, recursively construct all tables and view data object sets A involving kinship through the conversion table-level kinship table, and assign values ​​to the attributes of the view data object;

[0010] S30, recursively construct the lineage-related field relationship set B using the conversion table-level lineage relationship table and set A, and assign the values ​​to the attributes of the view data object;

[0011] S40, obtaining system visualization configuration information, and assigning the configuration information to the attributes of the view data object;

[0012] S50, using the set A and the configuration information, calculating the view drawing object set C, and assigning it to the attributes of the view data object;

[0013] S60, using the set B and the configuration information, calculating the view drawing line set D, and assigning it to the attributes of the view data object;

[0014] S70, formatting the finally obtained view data object into text and transmitting it to the client;

[0015] S80, the client receives the text and converts it into a view data object, determines whether the view data object attribute code is a correct code, and if not, prompts that the lineage information of the table has not been queried; if so, the client constructs a coordinate system and uses the view drawing object set C to draw the view; the client draws the line and the anchor point at the target field according to the set D, and traverses the single object table of the set D;

[0016] S90, add focus entry and exit time to the field element to control the highlighting of lineage data; when the screen focus enters the field, the entire lineage path is highlighted.

[0017] Furthermore, in step S10, the client transmits the parameter target library ID, target table schema and target table to the server. After receiving the parameter target library ID, target table schema and target table, the server recursively queries all source fields involved in the target field of the target table from the database to obtain a conversion table-level blood relationship table.

[0018] Furthermore, in step S10, the client transmits parameters to the server to recursively query all source fields involved in the target field of the target table from the database to obtain a conversion table-level blood relationship table, including the steps of:

[0019] S101, the client transmits the parameters target library ID, target table mode and target table to the server;

[0020] S102, after receiving the parameters target library ID, target table mode and target table, the server queries the database table and obtains the following data:

[0021] S103, traverse the single object table of the conversion table-level kinship table, obtain the id in the single object table as the conversion table-level kinship table ID, query the corresponding field kinship set from the database table for the conversion table-level kinship table ID and assign it to the conversion table-level kinship table; obtain the source library ID, source table mode and source table in the single object table as the parameter target library ID, target table mode and target table;

[0022] S104, recursively execute S101 to S103 to obtain the upstream or downstream conversion table-level kinship table and assign it to the current object table-level kinship table, until it returns empty to end the recursion and obtain the final table-level kinship table.

[0023] Furthermore, the acquisition of system visualization configuration information includes: starting x offset, starting y offset, horizontal spacing, vertical spacing, field font size and field top and bottom margins and field left and right margins, data source name font size and top and bottom margins and left and right margins, table model name font size and top and bottom margins and left and right margins, conversion step object theme color, database table object theme color and line type.

[0024] Furthermore, in step S80, the client receives the text and converts it into a view data object, and determines whether the attribute code of the view data object is a correct code. If not, it prompts that the lineage information of the table is not found; if yes, the client constructs a coordinate system and uses the view drawing object set C to draw the view, including the steps of:

[0025] Use absolute layout to obtain the x coordinate, y coordinate, width, height, conversion step object theme color and database table object theme color of the view drawing object set C to draw the div tag of the client browser. The element id in the div tag is the id of each object in the view drawing object set C.

[0026] Get the label, theme, data source name font size and top and bottom margins and left and right margins, table mode name font size and top and bottom margins and left and right margins, conversion step object theme color and database table object theme color of the view drawing object set C to draw the div tag of the client browser. The text in the div tag comes from the label and theme of each object in the view drawing object set C.

[0027] The view draws the columns view in the object collection C, traverses the single object table, establishes the x coordinate, y coordinate, width, height, field font size, top and bottom margins, and left and right margins of the columns view to draw the div tag of the client browser. The text in the div tag comes from the columns tag, and the div element id is the columns view id.

[0028] Furthermore, in step S80, the client draws the line and the anchor point at the target field according to the set D, and traverses the single object table of the set D, including the steps of:

[0029] Get the target ID and source ID according to the view drawing line set D, and get the field position information in the view data object set A through the target ID and source ID;

[0030] Calculate the starting position of the line;

[0031] Draw lines according to line type, starting point and ending point;

[0032] Draw anchor points near the end point;

[0033] The id in the view drawing line collection D is used as the browser page drawing view element id.

[0034] Furthermore, in the step S90, the focus entry and exit time is added to the field element to control the highlighting of the lineage data; when the screen focus enters the field, the entire lineage path is highlighted, including the steps of:

[0035] First determine whether the current field is highlighted. If it is highlighted, do not process it. If the current field is not highlighted, set the field to be highlighted and get the corresponding id of the field.

[0036] Use the field corresponding id as the source ID to find all the lower-level target fields from the view drawing line set D and set them to be highlighted, and obtain the lines connecting the target fields and set them to be highlighted; recursively until there are no downstream target fields; or, use the field corresponding id as the source ID to find all the upper-level source fields from the view drawing line set D and set them to be highlighted, and obtain the lines connecting the source fields and set them to be highlighted. Recursively until there are no upstream source fields;

[0037] Clears all highlights when screen focus moves out of the field.

[0038] The beneficial effects of adopting this technical solution are:

[0039] The present invention uses tables as units to view the source fields involved in all fields in the target table when the current table is the target table, or the current table is the target table of all fields in the source table, regardless of the hierarchy; when the focus is moved to a field, the blood relationship diagram involved is highlighted; all target libraries, target tables, and target fields can be viewed downstream, and all source libraries, source tables, and source fields can be viewed upstream, so as to clearly observe the relationship between tables and fields, and the relationship between fields; and data blood relationships can be displayed comprehensively and intuitively. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 This is a schematic diagram of the principle of a data blood relationship visualization method of the present invention. DETAILED DESCRIPTION

[0041] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is further described below with reference to the accompanying drawings.

[0042] In this embodiment, see Figure 1 As shown, the present invention proposes a data kinship visualization method, comprising the steps of:

[0043] S10, the client transmits parameters to the server to recursively query all source fields involved in the target field of the target table from the database to obtain a conversion table-level blood relationship table;

[0044] S20, create a view data object: determine whether the conversion table-level kinship table is empty. If it is empty, set the view data object attribute code to an error code, and set the attribute information to the kinship information of the table that has not been queried, and proceed to step S70; if it is not empty, set the view data object attribute code to a correct code, and proceed to the next step, recursively construct all tables and view data object sets A involving kinship through the conversion table-level kinship table, and assign values ​​to the attributes of the view data object;

[0045] S30, recursively construct the lineage-related field relationship set B using the conversion table-level lineage relationship table and set A, and assign the values ​​to the attributes of the view data object;

[0046] S40, obtaining system visualization configuration information, and assigning the configuration information to the attributes of the view data object;

[0047] S50, using the set A and the configuration information, calculating the view drawing object set C, and assigning it to the attributes of the view data object;

[0048] S60, using the set B and the configuration information, calculating the view drawing line set D, and assigning it to the attributes of the view data object;

[0049] S70, formatting the finally obtained view data object into text and transmitting it to the client;

[0050] S80, the client receives the text and converts it into a view data object, determines whether the view data object attribute code is a correct code, and if not, prompts that the lineage information of the table has not been queried; if so, the client constructs a coordinate system and uses the view drawing object set C to draw the view; the client draws the line and the anchor point at the target field according to the set D, and traverses the single object table of the set D;

[0051] S90, add focus entry and exit time to the field element to control the highlighting of lineage data; when the screen focus enters the field, the entire lineage path is highlighted.

[0052] Examples include:

[0053] Convert table-level lineage table (tableLineage)

[0054] Field Chinese name Field Name type illustrate Primary Key id bigint Snowflake algorithm to generate ID Conversion ID trans_id bigint Convert Name trans_name varchar(255) Redundant fields Source library ID source_ds_id bigint Source library name source_ds_name varchar(255) Redundant fields Source table schema source_schema varchar(255) Source table source_table varchar(255) Target library ID target_ds_id bigint Target library name target_ds_name varchar(255) Redundant fields Target table schema target_schema varchar(255) Target table target_table varchar(255)

[0055] Convert field-level lineage table (table_field_lineage)

[0056]

[0057] As an optimization solution for the above embodiment, in step S10, the client transmits the parameter target library ID, target table schema and target table to the server. After receiving the parameter target library ID, target table schema and target table, the server recursively queries all source fields involved in the target field of the target table from the database to obtain a conversion table-level blood relationship table.

[0058] In step S10, the client transmits parameters to the server to recursively query all source fields involved in the target field of the target table from the database to obtain a conversion table-level blood relationship table, including the steps of:

[0059] S101, the client transmits parameters to the server: target library ID = 470285336958455816, target table mode = admin, target table = user;

[0060] S102, after receiving the parameters of target library ID, target table mode and target table, the server queries the database table table_lineage to obtain the following data:

[0061] S103, traverse the single object table tableLineage of the conversion table-level lineage table tableLineages, obtain id from the single object table tableLineage as the conversion table-level lineage table ID = 470285336958455814, the conversion table-level lineage table ID = 470285336958455817 queries the corresponding field lineage set tableFieldLineages from the database table table_lineage and assigns it to the conversion table-level lineage table tableLineages; obtain the source library ID, source table mode and source table in the single object table tableLineage as the parameter target library ID, target table mode and target table;

[0062] S104, recursively execute S101 to S103 to obtain the upstream or downstream conversion table-level kinship table and assign it to the current object table-level kinship table, until it returns empty to end the recursion and obtain the final table-level kinship table.

[0063] S20, create a view data object result: determine whether the conversion table-level lineage relationship table tableLineages is null, if it is null, set the view data object attribute code to an error code (i.e., code 404), and set the attribute information message to the lineage information of the table that was not queried, and go to step S70; if it is not null, set the view data object attribute code to a correct code (i.e., code 200), and proceed to the next step, recursively construct all tables and view data object sets A (objs) involved in lineage by converting the table-level lineage relationship table tableLineages, and assign values ​​to the attributes of the view data object;

[0064] After the case data is converted, it is obtained as objs, and the property description is as follows:

[0065] id: has nothing to do with the id in the database, it is directly generated in memory using the snowflake algorithm.

[0066] name: the object name.

[0067] When type=table, it is indicated by table mode+”.”+;

[0068] When type=trans, it is the step name.

[0069] schema: schema name. It is empty when type=trans.

[0070] database: data source name. It is empty when type=trans.

[0071] dbId: data source ID. It is empty when type=trans.

[0072] trans: Transformation name when type=trans.

[0073] showColumnNum: The number of vertical columns when the object is displayed.

[0074] When displaying, the number of column digits is counted from left to right, starting from 1 and increasing by 1 to the next column object. The upstream table is on the left and the downstream table is on the right.

[0075] Example data:

[0076] The most upstream is user and dept in the business database, which is 1;

[0077] Paste user, dept in the source database and convert user information to the central database as 2;

[0078] The most downstream is the user in the central database, which is 3;

[0079] type: can be table or trans. table means the current object is a table, and trans means the current object is a transformation.

[0080] columns: A collection of fields in this object.

[0081] When type=table, these are the fields contained in the table. Fields not used downstream do not need to appear.

[0082] When type=trans, it refers to the steps under the transformation and the fields generated by the steps. Steps that do not generate fields do not need to appear.

[0083] S30, recursively construct the lineage-related field relationship set B (relations) using the conversion table-level lineage relationship table tableLineages and the set A (objs), and assign it to the attributes of the view data object;

[0084] After the case data is converted, the relations attribute description is:

[0085] id: has nothing to do with the id in the database, it is directly generated in memory using the snowflake algorithm.

[0086] target: target field, a single object, id and name come from objs.columns.

[0087] sources: source field collection, multiple objects, representing multiple source fields of a target field. id and name come from objs.columns.

[0088] S40, obtaining system visualization configuration information, and assigning the configuration information to the attributes of the view data object. The obtained system visualization configuration information includes: starting x offset, starting y offset, horizontal spacing, vertical spacing, field font size and field top and bottom margins and field left and right margins, data source name font size and top and bottom margins and left and right margins, table mode name font size and top and bottom margins and left and right margins, conversion step object theme color, database table object theme color and line type.

[0089] S50, using the set A (objs) and configuration information, calculate the view drawing object set C (graphObjs), and assign it to the attributes of the view data object result.

[0090] The coordinate system takes the upper left corner as (0,0), x is positive to the right and positive to the bottom. The case data objs is converted to graphObjs, and the property description is:

[0091] id: Derived from obj.id.

[0092] x: absolute layout upper left corner x-axis, calculation:

[0093] If it is the first obj in the first column: the starting x offset, in this case it is 30;

[0094] If it is not the first obj in the first column: the x value of the upper right corner of all obj in the previous column horizontally (x+width);

[0095] Maximum value + horizontal spacing. In this case, the horizontal spacing is 50.

[0096] y: y-axis of the upper left corner of the absolute layout, calculation:

[0097] If it is the first obj in the first column: the starting y offset is 30 in this case;

[0098] If it is not the first obj in the first column: the y value of the lower left corner of the previous obj (y+height) + the vertical interval. In this case, the vertical interval is 50.

[0099] width: Calculates the maximum width of the title (label and title) and the field. If the calculated maximum width is less than the set minimum width (case 160), the set minimum width is used, otherwise the calculated maximum width is used.

[0100] Title (label and title) or field width calculation:

[0101] (font size / 2)*number of half-width symbols in the text+font size*number of full-width symbols in the text+left and right margins. For example, user_name has 9 half-width symbols, font size 12, left and right margins 4, then width=12 / 2*9+4=58;

[0102] Height: label height + title height + all field heights;

[0103] Label height = label font + top and bottom margins. In this case, the font size is 16 and the top and bottom margins are 4.

[0104] Title height = title font + top and bottom margins. In this case, the font size is 16 and the top and bottom margins are 4.

[0105] The height of all fields = (field font + top and bottom margins) * number of fields. In this case, the font is 12 and the top and bottom margins are 4.

[0106] label:

[0107] When type=table in obj, it is indicated by table mode+”.”+;

[0108] When type=trans in obj, it is the step name.

[0109] title:

[0110] When type=table in obj, it is the data source name;

[0111] When type=trans in obj, it is the conversion name.

[0112] id in columns: comes from id in obj.columns;

[0113] Label in columns: comes from name in obj.columns;

[0114] x in columns: consistent with the overall graphObj.x, indicating that the field displays the x coordinate of the upper left corner.

[0115] In columns, y: consistently indicates that the field displays the y coordinate of the upper left corner.

[0116] Calculate graphObj.y + label height + title height + i * field height. i indicates the number of the field.

[0117] Width in columns: consistent with graphObj.width;

[0118] Height in columns: field font + top and bottom margins. In this case, the font size is 12 and the top and bottom margins are 4.

[0119] S60, using the set B (relations) and configuration information, calculate the view drawing line set D (graphEdges), and assign it to the attributes of the view data object result.

[0120] After the case data relations are converted, graphEdges are obtained. The property description is:

[0121] id: has nothing to do with the id in the database, it is directly generated in memory using the snowflake algorithm.

[0122] targetId: comes from target.id in relations.

[0123] sourceId: The id from sources in relations. If there are multiple source fields in the sources collection, they will be converted into multiple graphEdge objects.

[0124] S70: Format the view data object finally obtained into text and transmit it to the client. The text may be in json or xml format.

[0125] S80, the client receives the text and converts it into a view data object result, determines whether the view data object attribute code is the correct code (determines whether the code is 200), if not, prompts that the lineage information of the table has not been queried; if yes, the client constructs a coordinate system (the coordinate system takes the upper left corner as (0,0), x is positive to the right and positive to the bottom), and uses the view drawing object set C (graphObjs) to draw the view. Including the steps:

[0126] Use absolute layout to obtain the x coordinate (graphObj.x), y coordinate (graphObj.y), width (graphObj.width), height (graphObj.height), conversion step object theme color and database table object theme color of the view drawing object set C to draw the div tag of the client browser. The element id in the div tag is the id of each object in the view drawing object set C (graphObj);

[0127] Get the label (graphObj.label), theme (graphObj.title), data source name font size and top and bottom margins and left and right margins, table mode name font size and top and bottom margins and left and right margins, conversion step object theme color and database table object theme color of the view drawing object set C to draw the div tag of the client browser. The text in the div tag comes from the label (raphObj.label) and theme (graphObj.title) of each object in the view drawing object set C.

[0128] The view draws the columns view in the object collection C, traverses the single object table, establishes the columns view's x coordinate (column.x), y coordinate (column.y), width (column.width), height (column.height), field font size, field top and bottom margins, and field left and right margins to draw the client browser's div tag. The text in the div tag comes from the columns tag (columns.label), and the div element id is the columns view id.

[0129] In step S80, the client draws the line and the anchor point at the target field according to the set D, and traverses the single object table of the set D, including the steps of:

[0130] Obtain the target ID (targetId) and source ID (sourceId) according to the view drawing line set D (graphEdges), and obtain the field location information in the view data object set A (objs) through the target ID and source ID;

[0131] Example:

[0132] graphEdge="{"id":"657584190769901611","targetId":"657584190769901569","sourceId":"657584190769901577"};

[0133] Get the source field position graphColumnSource:

[0134] {"id":"657584190769901577","label":"id","x":240,"y":74,"width":160,"height":16};

[0135] Get the target field position graphColumnTarget:

[0136] {"id":"657584190769901569","label":"id","x":450,"y":74,"width":160,"height":16}.

[0137] Calculate the starting position of the line;

[0138] Line starting point startPoint:

[0139] x=graphColumnSource.x+graphColumnSource.width;

[0140] y=graphColumnSource.y+graphColumnSource.height / 2;

[0141] End point of the line:

[0142] x = graphColumnTarget.x;

[0143] y=graphColumnTarget.y+graphColumnTarget.height / 2.

[0144] Use svg to draw lines according to the line type, starting point (startPoint) and ending point (endPoint).

[0145] Draw anchor points near the end point;

[0146] svg draws a polyline with endPoint as the starting point;

[0147] The second point position:

[0148] x = endPoint.x-6;

[0149] y = endPoint.y-2;

[0150] The third point position:

[0151] x = endPoint.x-6;

[0152] y = endPoint.y + 2;

[0153] The three points form a triangle and are filled with the same color as the line.

[0154] The id in the view drawing line set D (graphEdge) is used as the browser page svg drawing view element id.

[0155] In the step S90, the focus entry and exit time is added to the field element to control the highlighting of the lineage data; when the screen focus enters the field, the entire lineage path is highlighted, including the steps of:

[0156] First determine whether the current field is highlighted. If it is highlighted, do not process it. If the current field is not highlighted, set the field to be highlighted and get the corresponding id of the field.

[0157] Use the field corresponding id as the source ID to find all the lower-level target fields from the view drawing line set D and set them to be highlighted, and obtain the lines connecting the target fields and set them to be highlighted; recursively until there are no downstream target fields; or, use the field corresponding id as the source ID to find all the upper-level source fields from the view drawing line set D and set them to be highlighted, and obtain the lines connecting the source fields and set them to be highlighted. Recursively until there are no upstream source fields;

[0158] Clears all highlights when screen focus moves out of the field.

[0159] The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. A data kinship visualization method, characterized in that: Includes steps: S10, the client transmits parameters to the server to recursively query all source fields involved in the target field of the target table from the database to obtain a conversion table-level blood relationship table; S20, create a view data object: determine whether the conversion table-level kinship table is empty. If it is empty, set the view data object attribute code to an error code, and set the attribute information to the kinship information of the table that has not been queried, and proceed to step S70; if it is not empty, set the view data object attribute code to a correct code, and proceed to the next step, recursively construct all tables and view data object sets A involving kinship through the conversion table-level kinship table, and assign values ​​to the attributes of the view data object; S30, recursively construct the lineage-related field relationship set B using the conversion table-level lineage relationship table and set A, and assign the values ​​to the attributes of the view data object; S40, obtaining system visualization configuration information, and assigning the configuration information to the attributes of the view data object; S50, using the set A and the configuration information, calculating the view drawing object set C, and assigning it to the attributes of the view data object; S60, using the set B and the configuration information, calculating the view drawing line set D, and assigning it to the attributes of the view data object; S70, formatting the finally obtained view data object into text and transmitting it to the client; S80, the client receives the text and converts it into a view data object, and determines whether the attribute code of the view data object is a correct code. If not, it prompts that the blood relationship information of the table cannot be queried; If yes, the client constructs a coordinate system and uses the view drawing object set C to draw the view; the client draws the line and the anchor point at the target field according to the set D, and traverses the single object table of the set D; S90, add focus entry and exit time to the field element to control the highlighting of lineage data; when the screen focus enters the field, the entire lineage path is highlighted.

2. A data kinship visualization method according to claim 1, characterized in that: In step S10, the client transmits the parameter target library ID, target table schema and target table to the server. After receiving the parameter target library ID, target table schema and target table, the server recursively queries all source fields involved in the target field of the target table from the database to obtain the conversion table-level blood relationship table.

3. A data kinship visualization method according to claim 2, characterized in that: In step S10, the client transmits parameters to the server to recursively query all source fields involved in the target field of the target table from the database to obtain a conversion table-level blood relationship table, including the steps of: S101, the client transmits the parameters target library ID, target table mode and target table to the server; S102, after receiving the parameters target library ID, target table mode and target table, the server queries the database table and obtains the following data: S103, traversing a single object table of the conversion table-level blood relationship table, obtaining an id from the single object table as the conversion table-level blood relationship table ID, querying the corresponding field blood relationship set from the database table for the conversion table-level blood relationship table ID and assigning it to the conversion table-level blood relationship table; Get the source library ID, source table mode and source table in a single object table as the target library ID, target table mode and target table as parameters; S104, recursively execute S101 to S103 to obtain the upstream or downstream conversion table-level kinship table and assign it to the current object table-level kinship table, until it returns empty to end the recursion and obtain the final table-level kinship table.

4. The method for visualizing data kinship relationship according to claim 1, characterized in that: The system visualization configuration information obtained includes: starting x offset, starting y offset, horizontal spacing, vertical spacing, field font size and field top and bottom margins and field left and right margins, data source name font size and top and bottom margins and left and right margins, table mode name font size and top and bottom margins and left and right margins, conversion step object theme color, database table object theme color and line type.

5. A data kinship visualization method according to claim 4, characterized in that: In the step S80, the client receives the text and converts it into a view data object, and determines whether the attribute code of the view data object is a correct code. If not, it prompts that the blood relationship information of the table has not been queried; If yes, the client constructs a coordinate system and uses the view drawing object set C to draw the view, including the following steps: Use absolute layout to obtain the x coordinate, y coordinate, width, height, conversion step object theme color and database table object theme color of the view drawing object set C to draw the div tag of the client browser. The element id in the div tag is the id of each object in the view drawing object set C. Get the label, theme, data source name font size and top and bottom margins and left and right margins, table mode name font size and top and bottom margins and left and right margins, conversion step object theme color and database table object theme color of the view drawing object set C to draw the div tag of the client browser. The text in the div tag comes from the label and theme of each object in the view drawing object set C. The view draws the columns view in the object collection C, traverses the single object table, establishes the x coordinate, y coordinate, width, height, field font size, top and bottom margins, and left and right margins of the columns view to draw the div tag of the client browser. The text in the div tag comes from the columns tag, and the div element id is the columns view id.

6. A data kinship visualization method according to claim 4 or 5, characterized in that: In step S80, the client draws the line and the anchor point at the target field according to the set D, and traverses the single object table of the set D, including the steps of: Get the target ID and source ID according to the view drawing line set D, and get the field position information in the view data object set A through the target ID and source ID; Calculate the starting position of the line; Draw lines according to line type, starting point and ending point; Draw anchor points near the end point; The id in the view drawing line collection D is used as the browser page drawing view element id.

7. The method for visualizing data blood relationship according to claim 1, characterized in that: In the step S90, the focus entry and exit time is added to the field element to control the highlighting of the lineage data; when the screen focus enters the field, the entire lineage path is highlighted, including the steps of: First determine whether the current field is highlighted. If it is highlighted, do not process it. If the current field is not highlighted, set the field to be highlighted and get the corresponding id of the field. Use the field corresponding id as the source ID to find all the subordinate target fields from the view drawing line set D and set them to be highlighted, and obtain the lines connecting the target fields and set them to be highlighted; recursively until there are no downstream target fields; Or, use the field corresponding id as the source ID to find all the upstream source fields from the view drawing line set D and set them to be highlighted, and get the lines connecting the source fields and set them to be highlighted, recursively until there is no upstream source field; Clears all highlights when screen focus moves out of the field.

Citation Information

Patent Citations

  • Data blood relationship construction method and system, electronic equipment and storage medium

    CN114385652A

  • Systems, Devices, and / or Methods for Managing Information

    US20150363481A1