Method, device and equipment for generating inter-script blood relationship graph and storage medium

By generating a lineage graph between scripts and updating the dependencies of closed-loop paths using time information, the problems of high complexity and low efficiency in existing technologies are solved, and a clearer display of data lineage is achieved.

CN116861040BActive Publication Date: 2026-01-02CHINA CONSTRUCTION BANK +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310955260.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-31
Publication Date
2026-01-02
Estimated Expiration
2043-07-31

AI Technical Summary

Technical Problem

Existing methods for establishing data lineage rely on deep analysis and expert rules, resulting in high development complexity and low operational efficiency.

Method used

By determining the lineage dataset of the script dataset, a reference lineage graph is generated, and in the case of closed-loop paths, edges are updated according to the time information of dependencies to avoid self-loops, thereby generating the target lineage graph.

Benefits of technology

It reduces the complexity of bloodline relationship rules, improves operational efficiency, and provides a clear and intuitive display of global script bloodline relationships.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116861040B_ABST
    Figure CN116861040B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method and device for generating an inter-script blood relationship graph, an equipment and a storage medium, relating to the technical fields of data management and processing, big data, etc. The method comprises the following steps: first, determining a blood data set corresponding to a script data set, determining a reference blood relationship graph between each script in the script data set according to the blood data set, in the case that the reference blood relationship graph contains at least one closed loop path, determining the time information corresponding to each dependency relationship in the at least one closed loop path, and then updating part of the edges in the reference blood relationship graph according to the total number of dependency relationships corresponding to different time information to obtain a target blood relationship graph corresponding to the script data set. Thus, based on the time information of the dependency relationship in the closed loop path, part of the edges in the blood relationship graph is updated, and finally the target blood relationship graph is generated, thereby avoiding the self-loop of the dependency relationship in the blood relationship graph and intuitively displaying the global script blood relationship.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of data management, data processing, big data, and the like, and particularly relates to a method and device for generating a blood relationship graph between scripts, equipment and a storage medium. BACKGROUND

[0002] With the development of computer technology and data processing technology, the application range of judging the upstream and downstream script relationship on the system based on data blood relationship is becoming more and more extensive. However, the existing data blood relationship analysis method is based on regular matching script sentence paragraphs to analyze script blood relationship. This method needs to deeply analyze the script sentences, introduces a large number of expert rules, is easy to make mistakes, and at the same time increases the development complexity and reduces the running efficiency. SUMMARY

[0003] The present disclosure provides a method, device, equipment and storage medium for generating a blood relationship graph between scripts, to solve the problem of how to reduce the complexity of rules in data blood analysis and improve the running efficiency.

[0004] According to an aspect of the present disclosure, a method for generating a blood relationship graph between scripts is provided, comprising:

[0005] determining a blood data set corresponding to a script data set, wherein each blood data contains a target table and at least one source table dependent on the target table;

[0006] determining a reference blood relationship graph between scripts in the script data set according to the blood data set, wherein the nodes in the blood relationship graph represent data tables, and the edges between the nodes represent the dependent relationship between the nodes;

[0007] in the case that the reference blood relationship graph contains at least one closed loop path, determining the time information corresponding to each dependent relationship in the at least one closed loop path;

[0008] updating part of the edges in the reference blood relationship graph according to the total number of dependent relationships corresponding to different time information, to obtain a target blood relationship graph corresponding to the script data set.

[0009] According to another aspect of the present disclosure, a device for generating a blood relationship graph between scripts is provided, comprising:

[0010] a first determining module configured to determine a blood data set corresponding to a script data set, wherein each blood data contains a target table and at least one source table dependent on the target table;

[0011] The second determining module is configured to determine a reference blood relationship graph among scripts in the script data set according to the blood data set, wherein a node in the blood relationship graph represents a data table, and an edge between nodes represents a dependency relationship between the nodes.

[0012] The third determining module is configured to determine time information corresponding to each dependency relationship in at least one closed loop path in the reference blood relationship graph.

[0013] The updating module is configured to update part of edges in the reference blood relationship graph according to a total number of dependency relationships corresponding to different time information, to obtain a target blood relationship graph corresponding to the script data set.

[0014] According to another aspect of the present disclosure, an electronic device is provided, comprising:

[0015] at least one processor;

[0016] and a memory connected to the at least one processor in communication;

[0017] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of the above-mentioned embodiments.

[0018] According to another aspect of the present disclosure, a non-transitory computer readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to perform the method according to the above-mentioned embodiments.

[0019] The present disclosure provides a method, device, equipment and storage medium for generating a blood relationship graph among scripts. First, a blood data set corresponding to a script data set is determined, and a reference blood relationship graph among scripts in the script data set is determined according to the blood data set. In the case that the reference blood relationship graph contains at least one closed loop path, time information corresponding to each dependency relationship in the at least one closed loop path is determined. Then, part of edges in the reference blood relationship graph are updated according to a total number of dependency relationships corresponding to different time information, to obtain a target blood relationship graph corresponding to the script data set. Thus, based on the time information of the dependency relationships in the closed loop path, part of edges in the blood relationship graph are updated, and finally the target blood relationship graph is generated, thereby avoiding the self-loop of the dependency relationships in the blood relationship graph and intuitively displaying the global script blood relationship. BRIEF DESCRIPTION OF DRAWINGS

[0020] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0021] Figure 1 A flowchart of a method for generating an inter-script blood relationship graph according to an embodiment of the present disclosure is shown in FIG. 1.

[0022] Figure 2 A blood relationship diagram with a closed loop path according to the present disclosure is shown in FIG. 2.

[0023] Figure 3 An updated blood relationship diagram according to the present disclosure is shown in FIG. 3.

[0024] Figure 4 A flowchart of a method for generating an inter-script blood relationship graph according to an embodiment of the present disclosure is shown in FIG. 1.

[0025] Figure 5 A structural diagram of a device for generating an inter-script blood relationship graph according to an embodiment of the present disclosure is shown in FIG. 4.

[0026] Figure 6 A structural diagram of an electronic device according to an embodiment of the present disclosure is shown in FIG. 5.

[0027] The above-described figures have shown specific embodiments of the present application, which will be described in more detail hereinafter. These figures and written description are not intended to limit the scope of the present application in any way, but to illustrate the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION

[0028] The exemplary embodiments will be described in detail herein with reference to the attached drawings. The following description is made with reference to the accompanying drawings in which like reference numerals represent like elements, unless the context of use indicates otherwise. The following exemplary embodiments described are not meant to represent all embodiments in accordance with the present application. Rather, they are merely examples of apparatus and methods in accordance with some aspects of the present application as detailed in the appended claims.

[0029] The method for generating an inter-script blood relationship graph according to an embodiment of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0030] It should be noted that the method for generating an inter-script blood relationship graph according to the present disclosure can be performed by any electronic device.

[0031] The electronic device can be any device with computing capability, such as a personal computer (PC), a mobile terminal, and the like. The mobile terminal can be a mobile phone, a tablet computer, a personal digital assistant, a wearable device, and the like, which has various operating systems, touch screens, and / or display screens.

[0032] Figure 1A flowchart of a method for generating an inter-script blood relation graph is provided for the embodiments of the present disclosure. As shown in Figure 1 The method comprises the following steps.

[0033] In step 101, blood relation data corresponding to the script data set is determined, wherein each blood relation data contains a target table and at least one source table relied on by the target table.

[0034] In some possible implementation forms, the blood relation data corresponding to each script data in the script data set can be obtained by parsing the name of each script data in the script data set.

[0035] In the present disclosure, the script naming rules can be first specified and standardized, and then the blood relation data corresponding to each script can be obtained by parsing the name of each script data. For example, the names of each script data in the script data set are scanned in a suffix matching manner, and the scripts meeting the suffix rules are found out in combination with the actual situation, for example, the script names are *.py files when developed using Python. Then the scanned files are parsed, the blood relation data in the scripts are matched through regular statements, a target table and at least one source table relied on by the target table corresponding to each blood relation data are obtained, a source table list and a target table list are formed, and the blood relation data in the key-value pair format of <source table, target table> is processed. In this way, the name of each scanned script data is parsed, and the blood relation data corresponding to the script data set is determined.

[0036] In step 102, a reference blood relation graph between scripts in the script data set is determined according to the blood relation data set, wherein the nodes in the blood relation graph are used to represent the data tables, and the edges between the nodes represent the dependent relationship between the nodes.

[0037] The reference blood relation graph is a graph generated based on the blood relation data set and used to represent the blood relation between scripts in the script data set.

[0038] The edges between the nodes can be undirected lines or directed lines, which are used to represent the dependent relationship between the data tables, for example, the node corresponding to the source table points to the node corresponding to the target table, which is not limited in the present disclosure.

[0039] It should be noted that in the blood relation graph, each node can correspond to two types of connection edges, one edge is used to connect the node and the node corresponding to the source table associated with the node (which can be referred to as an input edge), and the other edge is used to connect the node corresponding to the target table of which the node is a source table (which can be referred to as an output edge).

[0040] In some possible implementations, this disclosure can also use different connection edge widths to more intuitively represent the number of times each table is used as a source table or a target table. For example, if the first data table is used as a source table a first time more than the second data table is used as a source table a second time, then the width of the edge output by the first data table is greater than the width of the edge output by the second data table.

[0041] For example, if there are ten nodes, where the fourth node is the source table of all nodes (meaning it has a dependency relationship with all nodes), and the fifth node is only the source table of the first node (meaning it only has a dependency relationship with the first node), then the width of the output edge of the fourth node is greater than the width of the output edge of the fifth node.

[0042] Step 103: If the reference lineage graph contains at least one closed-loop path, determine the time information corresponding to each dependency in the at least one closed-loop path.

[0043] It should be noted that if the reference kinship graph contains at least one closed path, it can be assumed that there is at least one cyclic relationship between the nodes in the closed path. In this case, in order to more clearly show the dependencies between the nodes, the closed path can be unlooped.

[0044] In some possible implementations, the lineage data corresponding to each dependency in at least one closed-loop path can be determined first, and then the time information corresponding to the dependency can be determined based on the time tags corresponding to the target table and the source table in the lineage data.

[0045] For example, such as Figure 2 As shown, Figure 2 This is a schematic diagram illustrating a blood relationship with a closed-loop path as proposed in this disclosure. Figure 2 As we can see, table A depends on table B, table B depends on table C, and table C depends on table A. There is a closed-loop path between tables A, B, and C. Therefore, we need to determine the time information of the dependency relationship based on the time tags corresponding to tables A, B, and C respectively. For example, table A of the current day depends on table B of the current day, table B of the current day depends on table C of the current day, and table C of the current day depends on table A of yesterday.

[0046] Step 104: Based on the total number of dependencies corresponding to different time information, update some edges in the reference kinship graph to obtain the target kinship graph corresponding to the script dataset.

[0047] In some possible implementation forms, in the case that the number of different time information corresponding to the at least one closed loop path is 2, the number of dependency relationships corresponding to the time information can be determined, and then the update mode of the edge can be determined. For example, in the case that the first number of first dependency relationships corresponding to first time information is less than the second number of second dependency relationships corresponding to second time information, the first dependency relationship is disconnected, and the source table identifier of the target table dependency and the first time information indicated by the first dependency relationship are added to the target table to obtain a target blood relationship graph corresponding to the script data set.

[0048] Taking the above example as an example, the first time information is yesterday (denoted by L), and the second time information is today (denoted by N). The dependency relationship among tables A, B and C can be represented as table AN depending on table BN, table BN depending on table CN, and table CN depending on table AL. Figure 2 In the closed loop path shown in the figure, the first dependency relationship corresponding to the first time information is table CN depending on table AL, the first number is 1, the second dependency relationship corresponding to the second time information is table AN depending on table BN and table BN depending on table CN, and the second number is 2. The first number is less than the second number, so the first dependency relationship is disconnected, and the source table identifier of the first dependency of the target table table C and the first time information L are added. The updated blood relationship graph is as shown in Figure 3 Figure 3 The updated blood relationship diagram provided by the present disclosure.

[0049] In some possible implementation forms, in the case that the number of different time information corresponding to the at least one closed loop path is greater than 2, the third time information corresponding to the dependency relationship other than the at least one closed loop path in the reference blood relationship graph is obtained first, the edges corresponding to different time information in the reference blood relationship graph are displayed in different display modes, and the display modes of the edges corresponding to the same time information are the same.

[0050] The display mode of the edge can include at least one of the line thickness of the edge, the line type of the edge, the line color of the edge, and the like, which are not limited by the present disclosure.

[0051] ​Taking the above example as an example, in addition to the tables A, B, and C in the closed loop path, there are tables D and E in the blood relationship graph, and the table D of the day depends on the table E of the previous day, and the third time information is the previous day (denoted by P), that is, the table DN depends on the table EP, and the table EN depends on the table CN. According to different display modes of the dependency relationship corresponding to different time information, the edges corresponding to the first time information in the blood relationship graph are displayed using a red line, the edges corresponding to the second time information are displayed using a green line, and the edges corresponding to the third time information are displayed using a blue line, that is, the edge of the table CN depending on the table AL is displayed in red, the edges corresponding to the table AN depending on the table BN, the table BN depending on the table CN, and the table EN depending on the table CN are displayed using a green line, and the edge of the table DN depending on the table EP is displayed using a blue line.

[0052] In the embodiments of the present disclosure, first, the blood data set corresponding to the script data set is determined, the reference blood relationship graph between each script in the script data set is determined according to the blood data set, in the case that the reference blood relationship graph contains at least one closed loop path, the time information corresponding to each dependency relationship in the at least one closed loop path is determined, and then part of the edges in the reference blood relationship graph is updated according to the total number of dependency relationships corresponding to different time information, to obtain the target blood relationship graph corresponding to the script data set. Therefore, based on the time information of the dependency relationship in the closed loop path, part of the edges in the blood relationship graph is updated, and finally the target blood relationship graph is generated, thereby avoiding the self-loop of the dependency relationship in the blood relationship graph and intuitively displaying the global script blood relationship.

[0053] Figure 4 A method for generating a blood relationship graph between scripts provided by the embodiments of the present disclosure

[0054] As shown in Figure 4 , the method comprises:

[0055] Step 401, determining a blood data set corresponding to a script data set, wherein each blood data contains a target table and at least one source table depended by the target table.

[0056] Step 402, determining a reference blood relationship graph between each script in the script data set according to the blood data set, wherein the nodes in the blood relationship graph are used to represent the data tables, and the edges between the nodes represent the dependency relationship between the nodes.

[0057] Step 403, in the case that the reference blood relationship graph contains at least one closed loop path, determining the time information corresponding to each dependency relationship in the at least one closed loop path.

[0058] Wherein, the specific implementation form of steps 401 to 403 can refer to the detailed description in other embodiments of the present disclosure, which will not be described in detail here.

[0059] In step 404, it is determined that the first quantity of the first dependency relationship corresponding to the first time information is less than a first threshold value.

[0060] The first threshold value is a critical value of the quantity of the first dependency relationship for selecting different processing manners for the first dependency relationship, and is related to the quantity of nodes in the blood relationship graph, which is not limited in the present disclosure.

[0061] For example, there are 100 edges in the blood relationship graph, and the first threshold value is 10. If the first quantity is 3, which is less than 10, 3 edges corresponding to the first dependency relationship can be disconnected, and the nodes indicated by the first dependency relationship can be specially marked. If the first quantity is 50, which is greater than 10, different lines can be used to mark the dependency relationship corresponding to different time information.

[0062] In step 405, in the case that the first quantity of the first dependency relationship corresponding to the first time information is less than the second quantity of the second dependency relationship corresponding to the second time information, the first dependency relationship is disconnected, and the source table identifier and the first time information of the target table dependency are added at the target table indicated by the first dependency relationship to obtain the target blood relationship graph corresponding to the script data set.

[0063] In the present disclosure, when the first quantity of the first dependency relationship corresponding to the first time information is less than the second quantity of the second dependency relationship corresponding to the second time information, it can be considered that the second dependency relationship is in the majority in the closed loop path, and the first dependency relationship can be disconnected, and the source table identifier and the first time information of the target table dependency are added at the target table indicated by the first dependency relationship, so that the blood relationship graph is more clear and explicit.

[0064] In some possible implementation forms, in the case that the difference between the first quantity and the second quantity is less than a second threshold value, the third time information corresponding to the dependency relationship other than the at least one closed loop path in the reference blood relationship graph is obtained, and then in the case that the third time information is the same as one of the first time information and the second time information, the display mode of the edge of the dependency relationship corresponding to the other is updated to obtain the target blood relationship graph corresponding to the script data set.

[0065] The second threshold value is a critical value of the difference between the first quantity and the second quantity, which can be set in advance as needed, or can also be set according to historical data, which is not limited in the present disclosure.

[0066] It should be noted that when the difference between the first quantity and the second quantity is less than the second threshold value, it can be considered that the number of the first dependency relationship corresponding to the first time information in the closed loop path is close to the number of the second dependency relationship corresponding to the second time information, and the third time information corresponding to the dependency relationship other than the closed loop path in the blood relationship graph can be obtained. If the third time information is the same as the first time information, the display mode of the edge of the second dependency relationship corresponding to the second time information in the closed loop path is updated, and the second dependency relationship is represented using a line different from the edge of the first dependency relationship. If the third time information is the same as the second time information, the display mode of the edge of the first dependency relationship corresponding to the first time information in the closed loop path is updated, and the second dependency relationship is represented using a line different from the edge of the second dependency relationship.

[0067] In the embodiments of the present disclosure, first, the blood data set corresponding to the script data set is determined, the reference blood relationship graph between each script in the script data set is determined according to the blood data set, in the case that the reference blood relationship graph contains at least one closed loop path, the time information corresponding to each dependency relationship in the at least one closed loop path is determined, then in the case that the first quantity of the first dependency relationship corresponding to the first time information is less than the first threshold value, and the first quantity of the first dependency relationship corresponding to the first time information is less than the second quantity of the second dependency relationship corresponding to the second time information, the first dependency relationship is disconnected, and the source table identifier and the first time information of the target table dependency at the target table indicated by the first dependency relationship are added, to obtain the target blood relationship graph corresponding to the script data set. Therefore, by updating the display mode of the edge of part of the dependency relationship in the closed loop path, the blood relationship graph is obtained, thereby avoiding the occurrence of self-loop in the blood relationship graph, and making the blood relationship graph further intuitively display the data blood relationship.

[0068] In order to realize the above-mentioned embodiments, the embodiments of the present disclosure also provide a device for generating a blood relationship graph between scripts.

[0069] Figure 5 A structural schematic diagram of a device for generating a blood relationship graph between scripts provided by the embodiments of the present disclosure is shown.

[0070] As shown in Figure 5 the device 500 for generating a blood relationship graph between scripts can include:

[0071] A first determination module 501 is configured to determine a blood data set corresponding to a script data set, wherein each blood data contains a target table and at least one source table of the target table dependency;

[0072] The second determining module 502 is configured to determine a reference blood relationship graph among scripts in the script data set according to the blood data set, wherein a node in the blood relationship graph represents a data table, and an edge between nodes represents a dependency relationship between the nodes.

[0073] The third determining module 503 is configured to determine time information corresponding to each dependency relationship in at least one closed loop path in the reference blood relationship graph.

[0074] The updating module 504 is configured to update part of edges in the reference blood relationship graph according to a total number of dependency relationships corresponding to different time information, to obtain a target blood relationship graph corresponding to the script data set.

[0075] Optionally, the first determining module 501 is further configured to:

[0076] The name of each script data in the script data set is parsed to obtain blood data corresponding to each script data.

[0077] Optionally, the third determining module 503 is further configured to:

[0078] The blood data corresponding to each dependency relationship in the at least one closed loop path is determined.

[0079] The time information corresponding to the dependency relationship is determined according to time labels corresponding to a target table and a source table in the blood data.

[0080] Optionally, the updating module 504 is further configured to:

[0081] In a case where a first number of first dependency relationships corresponding to first time information is less than a second number of second dependency relationships corresponding to second time information, the first dependency relationship is disconnected, and a source table identifier and the first time information on which the target table depends are added at the target table indicated by the first dependency relationship, to obtain the target blood relationship graph corresponding to the script data set.

[0082] Optionally, the updating module 504 is further configured to:

[0083] It is determined that the first number is less than a first threshold value.

[0084] Optionally, the updating module 504 is further configured to:

[0085] In a case where a difference between the first number and the second number is less than a second threshold value, third time information corresponding to other dependency relationships except the at least one closed loop path in the reference blood relationship graph is obtained.

[0086] In a case where the third time information is the same as one of the first time information and the second time information, a display mode of an edge of another corresponding dependency relationship is updated to obtain a target blood relationship graph corresponding to the script data set.

[0087] Optionally, the updating module 504 is further configured to:

[0088] In a case where the number of different time information corresponding to the at least one closed loop path is greater than 2, third time information corresponding to other dependency relationships except the at least one closed loop path in the reference blood relationship graph is obtained.

[0089] The edges corresponding to different time information in the reference blood relationship graph are displayed in different display modes, and the display modes of the edges corresponding to the same time information are the same.

[0090] The functions and specific implementation principles of the above modules in the embodiments of the present disclosure can be referred to the above method embodiments, which will not be described here.

[0091] In the present disclosure, first, a blood data set corresponding to a script data set is determined, and a reference blood relationship graph between scripts in the script data set is determined according to the blood data set. In a case where the reference blood relationship graph contains at least one closed loop path, time information corresponding to each dependency relationship in the at least one closed loop path is determined. Then, according to the total number of dependency relationships corresponding to different time information, part of the edges in the reference blood relationship graph is updated to obtain a target blood relationship graph corresponding to the script data set. Thus, based on the time information of the dependency relationships in the closed loop path, part of the edges in the blood relationship graph is updated, and finally the target blood relationship graph is generated, thereby avoiding the self-loop of the dependency relationships in the blood relationship graph and intuitively displaying the global script blood relationship.

[0092] According to the embodiments of the present disclosure, the present disclosure further provides an electronic device.

[0093] Figure 6 The structure schematic diagram of the electronic device 600 provided by the embodiments of the present disclosure is shown.

[0094] As shown in Figure 6 the electronic device can include: a transceiver 601, a processor 602, a memory 603.

[0095] The transceiver 601 can be used to obtain a to-be-run task and configuration information of the to-be-run task.

[0096] The processor 602 executes computer-executed instructions stored in the memory to cause the processor 602 to perform the solutions in the above embodiments. The processor 602 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; and can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.

[0097] The memory 603 is connected with the processor 602 through the system bus and completes mutual communication, and the memory 603 is used for storing computer program instructions.

[0098] The system bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus. The transceiver is used to realize the communication between the database access device and other computers (for example, a client, a read-write library and a read-only library). The memory can include a random access memory (RAM), and can also include a non-volatile memory.

[0099] The electronic device provided by the embodiment of the application can be the terminal device of the above embodiment.

[0100] The embodiment of the application further provides a chip for running instructions, which is used to execute the technical solutions of the task scheduling method in the above embodiment.

[0101] The embodiment of the application further provides a computer readable storage medium, which stores computer instructions, and when the computer instructions run on a computer, the computer executes the technical solutions of the task scheduling method in the above embodiment.

[0102] The embodiment of the present application further provides a computer program product, which comprises a computer program stored in a computer readable storage medium, at least one processor can read the computer program from the computer readable storage medium, and the at least one processor can implement the technical solution of the task scheduling method in the above embodiment when executing the computer program.

[0103] In the description of the present specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present disclosure. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in any one or more embodiments or examples. In addition, the person skilled in the art can combine and combine the different embodiments or examples described in the present specification and the features of the different embodiments or examples without contradiction.

[0104] In addition, the terms "first", "second" are only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include at least one of the features. In the description of the present disclosure, the meaning of "a plurality of" is at least two, for example, two, three, etc., unless otherwise explicitly specified.

[0105] Any process or method descriptions in flow charts or otherwise described herein can be understood as representing code modules, segments, or portions of code that include one or more executable instructions for implementing the specified logic functions or processes, and the preferred embodiments of the present disclosure include additional implementations in which the order of execution or the functions themselves can be changed, including according to the functionality involved, in an essentially simultaneous manner, or in reverse order, as will be appreciated by those skilled in the art of the embodiments of the present disclosure.

[0106] The logic and / or steps represented in the flowcharts and / or described herein, for example, can be considered as a sequence of executable instructions, and can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor- containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For purposes of this specification, a "computer-readable medium" can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. The computer-readable medium can be, for example, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system (or apparatus) or a propagation medium. More specific examples (a non-exhaustive list) of the computer-readable medium include the following: an electrical connection (electronic) having one or more wires, a portable computer diskette (magnetic), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber (optical), and a portable compact disc read-only memory (CDROM). Note that the computer-readable medium can even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, for example, via optical scanning of the paper or other medium, then compiled, interpreted, or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.

[0107] It is to be understood that the various parts of the disclosure can be implemented in hardware, software, firmware or a combination thereof. In the above embodiment, the various steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. As such, if implemented in hardware, as in another embodiment, any of the following technologies, known in the art, or their equivalents, can be used to implement the logic for implementing the logic functions of the data signals: discrete logic circuitry having logic gates for implementing logic functions on data signals, application specific integrated circuits having appropriate combinational logic gates, programmable gate arrays (PGA), field programmable gate arrays (FPGA), and the like.

[0108] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the application be limited only by the scope of the claims, including any amendments thereof, and can include equivalents. It is intended that the specification and examples be considered exemplary only, with the true scope and spirit of the application being indicated by the following claims.

[0109] It is to be understood that the application is not limited to the precise construction here described and as shown in the attached drawings, and that various modifications and changes can be made by those skilled in the art without departing from the scope of the application. The scope of the application should be determined by the following claims, and their equivalents.

Claims

1. A method for generating a bloodline relationship diagram between scripts, characterized in that, The method comprises the following steps: determining a blood relationship data set corresponding to a script data set, wherein each blood relationship data comprises a target table and at least one source table dependent on the target table; determining a reference blood relationship graph between scripts in the script data set according to the blood relationship data set, wherein a node in the blood relationship graph represents a data table, and an edge between nodes represents a dependent relationship between nodes; in the case where the reference blood relationship graph comprises at least one closed loop path, determining time information corresponding to each dependent relationship in the at least one closed loop path; in the case where a first number of first dependent relationships corresponding to first time information is less than a second number of second dependent relationships corresponding to second time information, disconnecting the first dependent relationships and adding source table identifiers dependent on the target table and the first time information at the target table indicated by the first dependent relationships to obtain a target blood relationship graph corresponding to the script data set; in the case where a difference between the first number and the second number is less than a second threshold, obtaining third time information corresponding to dependent relationships other than the at least one closed loop path in the reference blood relationship graph; in the case where the third time information is the same as one of the first time information and the second time information, updating a display mode of an edge of a dependent relationship corresponding to the other to obtain the target blood relationship graph corresponding to the script data set; in the case where a number of different time information corresponding to the at least one closed loop path is greater than 2, obtaining third time information corresponding to dependent relationships other than the at least one closed loop path in the reference blood relationship graph; and displaying edges corresponding to different time information in the reference blood relationship graph in different display modes, and displaying edges corresponding to the same time information in the same display mode.

2. The method of claim 1, wherein, The method comprises the following steps: parsing a name of each script data in the script data set to obtain blood relationship data corresponding to each script data.

3. The method of claim 1, wherein, The method comprises the following steps: determining blood relationship data corresponding to each dependent relationship in the at least one closed loop path; determining time information corresponding to the dependent relationship according to time labels corresponding to the target table and the source table in the blood relationship data.

4. The method of claim 1, wherein, Before the first dependent relationships are disconnected, the method further comprises the following steps: determining that the first number is less than a first threshold.

5. An apparatus for generating an inter-script pedigree graph, the apparatus comprising: The method comprises the following steps: a first determining module is configured to determine a blood relationship data set corresponding to a script data set, wherein each blood relationship data comprises a target table and at least one source table dependent on the target table; a second determining module is configured to determine a reference blood relationship graph between scripts in the script data set according to the blood relationship data set, wherein a node in the blood relationship graph represents a data table, and an edge between nodes represents a dependent relationship between nodes; a third determining module is configured to, in the case where the reference blood relationship graph comprises at least one closed loop path, determine time information corresponding to each dependent relationship in the at least one closed loop path; The updating module is configured to: disconnect a first dependency relationship corresponding to first time information, and add a source table identifier and the first time information at a target table indicated by the first dependency relationship to obtain a target blood relationship graph corresponding to the script dataset, when a first number of the first dependency relationship is less than a second number of a second dependency relationship corresponding to second time information; obtain third time information corresponding to other dependency relationships of the reference blood relationship graph except the at least one closed loop path, when a difference between the first number and the second number is less than a second threshold; update a display mode of an edge of a dependency relationship corresponding to one of the first time information and the second time information, when the third time information is the same as the one, to obtain the target blood relationship graph corresponding to the script dataset; obtain third time information corresponding to other dependency relationships of the reference blood relationship graph except the at least one closed loop path, when a number of different time information corresponding to the at least one closed loop path is greater than 2; and display edges corresponding to different time information of the reference blood relationship graph in different display modes, and display edges corresponding to the same time information in the same display mode.

6. An electronic device, comprising: The computer program product comprises a computer program, and the computer program is configured to implement the method according to any one of claims 1-4 when executed by a processor. The computer program product comprises a computer program, and the computer program is configured to implement the method according to any one of claims 1-4 when executed by a processor.

8. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-4. ​ 7. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, ​ ​

Citation Information

Patent Citations

  • Data processing method and device, computer equipment and storage medium

    CN114969194A

  • Data blood relationship tracing method and system

    CN116414891A