Data flow graph construction method, apparatus, device, and medium

CN115033215BActive Publication Date: 2026-06-12INDUSTRIAL AND COMMERCIAL BANK OF CHINA

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INDUSTRIAL AND COMMERCIAL BANK OF CHINA
Filing Date
2022-07-19
Publication Date
2026-06-12

Smart Images

  • Figure CN115033215B_ABST
    Figure CN115033215B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method for constructing a data flow graph, which can be applied in the field of artificial intelligence. The method comprises: obtaining monitoring information of a database related to a target application, the monitoring information comprising definition information of the database, code text for implementing a function of the database, and operation information, the database being used to implement an interaction function between the target application and a user; dividing the code text into M groups according to the operation information, each group comprising code text related to a database connection process, wherein M≥1; screening the M groups to obtain N groups related to an interaction processing logic of the target application, wherein M≥N≥1; and constructing a data flow graph of the target application accessing the database according to the definition information and the N groups. The present disclosure also provides a device for constructing a data flow graph, an apparatus, a storage medium, and a program product.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of artificial intelligence, and more specifically to a method, apparatus, electronic device, medium, and program product for constructing a data flow graph. Background Technology

[0002] Data flow diagrams are a tool for structured system analysis and design, graphically illustrating the logical flow and transformation of data within a system. By understanding the data change process, operations personnel can quickly grasp the core logic of business operations and comprehend the functions implemented in each business processing step. Currently, data flow... Figure 1 Typically, before building the system, developers design the software based on functional requirements and output it as a software project design document, which is then used by other personnel in the subsequent operation and maintenance phase.

[0003] However, in related technologies, after the system architects complete the system design, the maintenance and testing of the system are generally carried out by the system's operations and maintenance personnel. These personnel need to spend a significant amount of time searching for relevant design documents, resulting in wasted time and reduced efficiency. Furthermore, after obtaining the design documents, they need to spend considerable time studying and verifying them before proceeding with subsequent operation, maintenance, and testing, leading to low system maintenance efficiency and high labor costs. Summary of the Invention

[0004] In view of the above problems, this disclosure provides a method, apparatus, device, medium and program product for constructing data flow graphs.

[0005] According to a first aspect of this disclosure, a method for constructing a data flow graph is provided, comprising: acquiring monitoring information of a database related to a target application, the monitoring information including database definition information, code text implementing database functions, and operation information, the database being used to implement interaction functions between the target application and the user; dividing the code text into M groups based on the operation information, each group including code text related to a database connection process, wherein M≥1; filtering the M groups to obtain N groups related to the interaction processing logic of the target application, wherein M≥N≥1; and constructing a data flow graph of the target application accessing the database based on the definition information and the N groups.

[0006] According to embodiments of this disclosure, constructing a data flow diagram for a target application accessing a database based on definition information and N groups includes: dividing the code text within each of the N groups into multiple transactions based on the transaction identifier corresponding to the code text within each group, resulting in N first ordered transaction sets corresponding one-to-one with the N groups, wherein each transaction includes at least one line of code text used to access or update data items in the database, and each first ordered transaction set includes multiple transaction sequences, each transaction sequence including at least two interrelated transactions with logical relationships; filtering the N first ordered transaction sets using preset rules to obtain P second ordered transaction sets, wherein the preset rules are used to delete duplicate transaction sequences, where N≥P≥1; determining P processes corresponding to the P second ordered transaction sets; and generating a data flow diagram for the target application accessing the database based on the P processes and definition information.

[0007] According to an embodiment of this disclosure, filtering N first ordered transaction sets using preset rules to obtain P second ordered transaction sets includes: when it is determined that there are identical transaction sequences in the nth first ordered transaction set, randomly selecting one transaction sequence from the identical transaction sequences and deleting other identical transaction sequences to obtain the nth second ordered transaction set.

[0008] According to embodiments of this disclosure, the process of filtering N first ordered transaction sets using preset rules to obtain P second ordered transaction sets further includes:

[0009] Given that there is an inclusion relationship between the NP first ordered transaction sets and the i-th first ordered transaction set, and that all NP first ordered transaction sets are subsets of the i-th first ordered transaction set, delete the NP first ordered transaction sets to obtain P second ordered transaction sets, where N≥i≥1.

[0010] According to an embodiment of this disclosure, generating a data flow diagram of a target application accessing a database based on P processes and definition information includes: merging processes corresponding to the same starting transaction sequence to obtain Q processes when it is determined that there are identical starting transaction sequences among the P processes, wherein the starting transaction sequence includes at least two transactions starting from the starting transaction of each process, where P ≥ Q ≥ 1; and constructing a data flow diagram according to a generation strategy based on the Q processes and definition information.

[0011] According to an embodiment of this disclosure, the operation information includes database roles of the database, which are used to represent user permissions. Database roles include one of operation and maintenance users, management users, and application users. The process involves filtering M groups to obtain N groups related to the interaction processing logic of the target application, including: determining the database roles corresponding to the M groups; and deleting groups with database roles of operation and maintenance users or management users from the M groups to obtain N groups.

[0012] According to an embodiment of this disclosure, the operation information includes a database connection identifier and time information of the operation code text. Based on the operation information, the code text is divided into M groups, including: selecting code texts with the same database connection identifier to obtain M original groups; and sorting the code texts in the M initial groups according to the time information to obtain M groups.

[0013] According to embodiments of this disclosure, the method further includes: responding to an operation command from a target user, displaying a data flow diagram within a preset area of ​​the display interface according to a display strategy, wherein the display strategy includes at least one of the following: database definition display conditions, code text display conditions, transaction display conditions, process display conditions, and data flow diagram display conditions.

[0014] A second aspect of this disclosure provides an apparatus for constructing a data flow graph, comprising: an acquisition module for acquiring monitoring information of a database related to a target application, the monitoring information including database definition information, code text implementing database functions, and operation information, the database being used to implement interaction functions between the target application and the user; a first filtering module for dividing the code text into M groups based on the operation information, each group including code text related to a database connection process, wherein M≥1; a second filtering module for filtering the M groups to obtain N groups related to the interaction processing logic of the target application, wherein M≥N≥1; and a construction module for constructing a data flow graph of the target application accessing the database based on the definition information and the N groups.

[0015] A third aspect of this disclosure provides an electronic device comprising: one or more processors; and a memory for storing one or more programs, wherein, when the one or more programs are executed by the one or more processors, the one or more processors perform the above-described data flow graph construction method.

[0016] A fourth aspect of this disclosure also provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the above-described method for constructing the data flow graph.

[0017] The fifth aspect of this disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method for constructing the data flow graph. Attached Figure Description

[0018] The foregoing contents, as well as other objects, features, and advantages of this disclosure, will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:

[0019] Figure 1 This diagram illustrates an application scenario of a method for constructing a data flow graph according to an embodiment of the present disclosure.

[0020] Figure 2 A flowchart illustrating a method for constructing a data flow graph according to an embodiment of the present disclosure is shown schematically.

[0021] Figure 3 A flowchart illustrating the screening process and data flow graph construction method according to an embodiment of the present disclosure is shown schematically.

[0022] Figure 4 A flowchart illustrating a merging process method according to an embodiment of the present disclosure is shown schematically;

[0023] Figure 5 A flowchart illustrating a method for constructing a data flow graph according to a specific embodiment of the present disclosure is shown schematically.

[0024] Figure 6 The illustration schematically shows a data flow diagram constructed according to an embodiment of the present disclosure;

[0025] Figure 7 This illustration schematically depicts an interactive diagram of the process of constructing a data flow graph according to an embodiment of the present disclosure;

[0026] Figure 8 A schematic block diagram illustrating a data flow graph construction apparatus according to embodiments of the present disclosure is shown; and

[0027] Figure 9 A block diagram of an electronic device suitable for a data flow graph construction method according to an embodiment of the present disclosure is shown schematically. Detailed Implementation

[0028] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.

[0029] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0030] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.

[0031] When using expressions such as "at least one of A, B, and C", they should generally be interpreted in accordance with the meaning that is commonly understood by a person skilled in the art (e.g., "a system having at least one of A, B, and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B, and C, etc.).

[0032] In the technical solution disclosed herein, the collection, storage, use, processing, transmission, provision, disclosure, and application of user personal information comply with the provisions of relevant laws and regulations, necessary confidentiality measures have been taken, and there is no violation of public order and good morals.

[0033] In the technical solution disclosed herein, the user's authorization or consent is obtained before acquiring or collecting the user's personal information.

[0034] Embodiments of this disclosure provide a method for constructing a data flow graph, comprising: acquiring monitoring information of a database related to a target application, the monitoring information including database definition information, code text implementing database functions, and operation information, the database being used to implement the interaction functions between the target application and the user; dividing the code text into M groups according to the operation information, each group including code text related to a database connection process, wherein M≥1; filtering the M groups to obtain N groups related to the interaction processing logic of the target application, wherein M≥N≥1; and constructing a data flow graph of the target application accessing the database according to the definition information and the N groups.

[0035] Figure 1 The diagram illustrates an application scenario of a method for constructing a data flow graph according to an embodiment of the present disclosure.

[0036] like Figure 1As shown, application scenario 100 according to this embodiment may include terminal devices 101, 102, and 103, network 104, and servers 105 and 106. Network 104 is used as a medium to provide a communication link between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.

[0037] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various interactive applications can be installed on terminal devices 101, 102, and 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).

[0038] Terminal devices 101, 102, and 103 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0039] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using terminal devices 101, 102, and 103 (for example only). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices. Server 105 can store the runtime data of application software installed on the terminal devices.

[0040] Server 106 can obtain the application software's runtime data stored on server 105, and then construct a data flow graph based on the obtained runtime data. Server 105 and server 106 can be directly connected via physical devices or via a network, such as a wireless communication link. It should be noted that server 105 can also directly construct a data flow graph based on the stored runtime data.

[0041] It should be noted that the data flow graph construction method provided in this embodiment can generally be executed by server 106. Correspondingly, the data flow graph construction apparatus provided in this embodiment can generally be located in server 106. The data flow graph construction method provided in this embodiment can also be executed by a server or server cluster that is different from server 106 and capable of communicating with terminal devices 101, 102, 103, server 105, and / or server 106. Correspondingly, the data flow graph construction apparatus provided in this embodiment can also be located in a server or server cluster that is different from server 106 and capable of communicating with terminal devices 101, 102, 103, server 105, and / or server 105.

[0042] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0043] The following will be based on Figure 1 The described scene, through Figures 2-7 The method for constructing the data flow graph according to the disclosed embodiments is described in detail.

[0044] Figure 2 A flowchart illustrating a method for constructing a data flow graph according to an embodiment of the present disclosure is shown schematically.

[0045] like Figure 2 As shown, the method includes operations S210 to S240.

[0046] In operation S210, monitoring information of the database related to the target application is obtained. The monitoring information includes the database definition information, the code text that implements the database function, and the operation information. The database is used to implement the interaction function between the target application and the user.

[0047] According to embodiments of this disclosure, before constructing the data flow diagram of the target application, it is necessary to obtain monitoring information of the databases related to the target application. The databases related to the target application include databases used to implement the interaction functions between the target application and the user. For example, for a bank app, this includes login, query, and transfer functions involved in the user's operation of the bank app.

[0048] According to embodiments of this disclosure, the acquired database monitoring information includes: database definition information, code text implementing database functions, and operation information. Specifically, the database definition information includes: the structure definition of database tables related to the target application, field definitions, and comments in the Data Definition Language (DDL).

[0049] The code text that implements database functionality includes: code text consisting of Structured Query Language (SQL) statements, including one or more SQL statements.

[0050] Operation information includes database operation records of the target application collected periodically. The collection of operation records can be done in real time or at certain time intervals, such as one hour, one day, one week, or one month.

[0051] In operation S220, based on the operation information, the code text is divided into M groups, each group including code text related to a database connection process, where M≥1.

[0052] According to embodiments of this disclosure, after obtaining monitoring information from the database, the code text in the monitoring information can be divided into M groups. Specifically, based on a single database connection process, the code text related to that single database connection process is grouped into the same group.

[0053] In operation S230, the M groups are filtered to obtain N groups related to the interactive processing logic of the target application, where M≥N≥1.

[0054] According to embodiments of this disclosure, each of the M groups is code text associated with a single database connection process. Since the data access methods and data flows of a program module in the target application are relatively fixed, many similar operations exist in multiple business processes, differing only in specific business parameters. In a microservice architecture, multiple instances executing in parallel generally have identical program functions, differing only in the specific data values ​​they process. Therefore, multiple groups within the M groups may have identical business processing flows, resulting in duplicated operation flows.

[0055] According to embodiments of this disclosure, although the acquired monitoring information is a database related to the target application, the monitoring information recorded in the database also includes records of routine maintenance and debugging performed by testers or operations and maintenance personnel. Since operations and maintenance personnel or testers have different permissions and may have different operating procedures than users, only groups related to user operations are retained during the construction of the data flow diagram.

[0056] According to embodiments of this disclosure, M groups are filtered to obtain N groups related to the interaction processing logic of the target application, where M ≥ N ≥ 1. Specifically, in the process of reducing the number of groups from M to N, duplicate groups and groups that are not related to the interaction processing logic and are not related to application user operations are removed.

[0057] In operation S240, based on the defined information and N groups, a data flow diagram for the target application to access the database is constructed.

[0058] According to embodiments of this disclosure, after filtering M groups, N groups are obtained. These N groups can be further filtered and merged to obtain the core processing logic related to the target application, forming a corresponding processing flow. Then, the database definition information and the obtained processing flow are integrated to construct a data flow diagram based on the database information.

[0059] According to embodiments of this disclosure, although the data flow diagram is constructed based on database information, the interactive functions of the target application all rely on the server for implementation, and the server stores the corresponding data during the implementation of specific interactive functions. By filtering and merging the database information, a data flow diagram related only to the interactive processing logic of the target application is obtained, thus obtaining the data flow diagram of the execution logic of the target application during actual operation.

[0060] Data flow diagrams can help operations and maintenance personnel quickly grasp the core logic of business operations and understand the functions implemented in each business processing step. This is especially important for some data-intensive applications, where the main business processing flow involves processing table data stored in the database; therefore, data flow diagrams can help operations and maintenance personnel quickly understand the application system's design.

[0061] However, during the software's runtime lifecycle, data flow Figure 1 Static design diagrams, typically created during the system construction phase, do not reflect the actual operational state of the system. These two can differ due to system maintenance and improvements, preventing operations personnel from understanding the actual state of the system. Furthermore, for application systems where the actual state differs from the static design diagram, operations personnel spend a significant amount of time unnecessarily studying the static design diagram. Actual maintenance operations still require implementation based on the actual system state, leading to low efficiency and high labor and time costs in the maintenance process.

[0062] Furthermore, for existing, legacy systems or third-party systems, the actual maintenance team needs to spend a significant amount of time searching for design documents from the system's development phase, and may even be unable to find design documents related to data flow diagrams. However, system maintenance work can only be carried out after understanding the system's functional design and processing flow, further increasing the system's operational costs.

[0063] This disclosure obtains database monitoring information related to the interactive functions of the target application, and performs operations such as sorting, filtering, and merging the obtained database monitoring information to filter out information about the interactive processing logic of the target user from multiple database access data. Based on the processed interactive processing logic information and the database definition information, a data flow diagram related to the target application and representing the actual running state can be constructed. This diagram truly reflects the data processing flow of the application system on the database table-level data structure in the running state, ensuring the accuracy of information display and helping maintenance personnel to perform maintenance operations.

[0064] This disclosure utilizes the database operational information of the target application to construct a data flow diagram based on its actual operational status. This reduces the difficulty for operations and maintenance personnel to understand the application system, facilitating their operations and maintenance based on the actual operational status of the application system. This improves the efficiency of system operations and maintenance, and reduces the labor and time costs of the maintenance process. Furthermore, since the data flow diagram of the target application is reconstructed based on database monitoring information, there is no need to spend a significant amount of time obtaining the original data flow diagram. Therefore, while ensuring that operations and maintenance personnel understand the functional design of the target application to be maintained, the efficiency of operations and maintenance operations is further improved. The system does not need to store a large amount of original design documents, thereby freeing up storage resources.

[0065] Based on the database information during application system runtime, this disclosure outlines the processing flow of the application system for querying, modifying, adding, and deleting data objects in the database, and provides a method for constructing runtime data flow diagrams, filling a technical gap in relevant application scenarios.

[0066] According to an embodiment of this disclosure, for operation S220, dividing the code text into M groups includes: selecting code texts with the same database connection identifier to obtain M original groups; and sorting the code texts within the M initial groups according to time information to obtain M groups. The operation information includes the database connection identifier and the time information of the operation code text.

[0067] Figure 3 A flowchart illustrating the screening process and data flow graph construction method according to an embodiment of the present disclosure is shown.

[0068] like Figure 3 As shown, this embodiment includes operations S341 to S344, which can be considered as a specific embodiment of operation S240.

[0069] In operation S341, based on the transaction identifier corresponding to the code text in each group, the code text in each of the N groups is divided into multiple transactions, resulting in a set of N first ordered transactions that correspond one-to-one with the N groups.

[0070] According to embodiments of this disclosure, a transaction includes at least one line of code text for accessing or updating data items in a database, and a first ordered set of transactions includes multiple transaction sequences, each of which includes at least two transactions that are related to each other and have a logical relationship.

[0071] According to embodiments of this disclosure, the code text within each group includes multiple SQL statements, and a transaction includes at least one SQL statement for accessing or updating data items in the database. Specifically, for SQL statements, a transaction includes starting a transaction, committing a transaction, rolling back a transaction, etc. Accordingly, the SQL statement implementing the corresponding transaction includes a corresponding transaction identifier. For example, the transaction identifier for starting a transaction includes BEGIN and START, the transaction identifier for committing a transaction includes COMMIT, and the transaction identifier for rolling back a transaction includes ROLLBACK.

[0072] According to the embodiments of this disclosure, the code text within each group is sorted according to time information. Therefore, after dividing the code text within each of the N groups into multiple transactions based on the transaction identifier corresponding to the code text within each group, a set of N first ordered transactions corresponding one-to-one with the N groups is obtained.

[0073] According to embodiments of this disclosure, after dividing the code text within each of the N groups into multiple transactions to obtain a first ordered transaction set corresponding one-to-one with the N groups, the multiple transactions can be filtered to delete transactions unrelated to the interaction processing logic of the target application, thereby updating the first ordered transaction set. Specifically, filtering can be performed based on transaction identifiers.

[0074] For example, if a transaction is detected as a committed transaction, the transaction and the SQL statements under that transaction are retained; if a transaction is detected as a rollback transaction, it is determined that the transaction does not meet the core logic, and the transaction and the SQL statements under that transaction are deleted.

[0075] In operation S342, N first ordered transaction sets are filtered using preset rules to obtain P second ordered transaction sets. The preset rules are used to delete duplicate transaction sequences, where N≥P≥1.

[0076] According to embodiments of this disclosure, after filtering M groups to obtain N groups and then dividing the N groups into transactions, the resulting N first ordered transaction sets are filtered again. Specifically, duplicate transaction sequences are deleted using preset rules to filter the N first ordered transaction sequences, resulting in P second ordered transaction sets.

[0077] According to embodiments of this disclosure, the second ordered transaction set obtained after filtering corresponds one-to-one with the first ordered transaction set obtained before filtering.

[0078] According to embodiments of this disclosure, the second ordered transaction set and the first ordered transaction set may be the same or different. Deleting duplicate transaction sequences using preset rules includes deleting duplicate transaction sequences within the first ordered transaction set to obtain the second ordered transaction sequence, meaning the second ordered transaction sequence differs from the first ordered transaction sequence; it also includes deleting first ordered transaction sets containing identical transaction sequences to obtain the second ordered transaction sequence, in which case the second ordered transaction set is the same as the first ordered transaction set.

[0079] In operation S343, determine the P processes corresponding to the P second ordered transaction sets.

[0080] According to embodiments of this disclosure, after filtering N first ordered transaction sets to obtain P second ordered transaction sets, P corresponding processes are generated based on the transactions in the P second ordered transaction sets.

[0081] Specifically, for multiple SQL statements within the same transaction, since these statements have strong logical relationships and belong to the same logical unit, they can be connected and represented as strong joins. Furthermore, multiple transactions may or may not have logical relationships, but they always have temporal connections. Therefore, multiple transactions can be connected to form a corresponding flow. For example, this can be represented as a weak join. Specifically, in a data flow diagram, strong joins can be represented by solid lines, and weak joins by dashed lines.

[0082] In operation S344, based on P processes and definition information, a data flow diagram for the target application to access the database is generated.

[0083] According to embodiments of this disclosure, after obtaining P processes, the obtained P processes can be merged and then fused with the obtained definition information to generate a data flow diagram of the target application accessing the database.

[0084] For example, in the generated data flow diagram, the specific process and definition information are integrated and reflected as: the representation of relationships and the representation of information. The representation of relationships includes connecting multiple SQL statements with strong joins using solid lines. For transactions with weak joins, the last SQL statement of the preceding transaction is connected to the first SQL statement of the following transaction using dashed lines. The representation of information includes showing the input, output, data type, and timing information of each SQL statement in the data flow diagram.

[0085] According to an embodiment of this disclosure, for operation S342, filtering N first ordered transaction sets into P second ordered transaction sets using preset rules includes: if it is determined that there are identical transaction sequences in the nth first ordered transaction set, randomly selecting one transaction sequence from the identical transaction sequences and deleting other identical transaction sequences to obtain the nth second ordered transaction set.

[0086] For example, taking the first ordered transaction set as N1, where N1 = [T3, T4, T5, T3, T4], where T3, T4, and T5 represent different transactions. Within the first ordered transaction set, there exist two transaction sequences, T3-T4-T5 and T3-T4. The existence of identical transaction sequences indicates that this transaction sequence was executed multiple times within the same database connection. Therefore, by removing duplicate transaction sequences, only one transaction sequence needs to be retained to represent the processing logic of that transaction sequence.

[0087] Specifically, the T3-T4-T5 sequence includes the T3-T4 transaction sequence and the T4-T5 transaction sequence. Therefore, after randomly deleting a T3-T4 transaction sequence, the unique T3-T4 transaction sequence is concatenated with the T4-T5 transaction sequence to form a complete T3-T4-T5 sequence.

[0088] According to an embodiment of this disclosure, filtering N first ordered transaction sets into P second ordered transaction sets further includes: if it is determined that there is an inclusion relationship between the NP first ordered transaction sets and the i-th first ordered transaction set, and the NP first ordered transaction sets are all subsets of the i-th first ordered transaction set, then the NP first ordered transaction sets are deleted to obtain P second ordered transaction sets, where N≥i≥1.

[0089] For example, taking the first ordered set of transactions N2, N3, and N4 as an example, where N2 = [T1, T2, T3, T4, T5, T6], N3 = [T1, T2], and N4 = [T3, T4, T5]. This is understandable. At this point, deleting the first ordered transaction sets N3 and N4 yields the second ordered transaction set N2 = [T1, T2, T3, T4, T5, T6]. Thus, the original three first transaction sets are now combined into one second ordered transaction set. The selection process between the first ordered transaction sets does not affect the transaction sequence within each set; that is, the second ordered transaction set differs from the first ordered transaction set only in quantity.

[0090] It should be noted that when filtering among multiple first-order transaction sets, only subsets with an inclusion relationship are deleted. If two first-order transaction sets both contain the same transaction sequence, and both first-order transaction sets also contain at least one different transaction in addition to the same transaction sequence, then there is no need to filter between the two first-order transaction sets.

[0091] For example, for the first ordered transaction set N5 = [T1,T2,T3,T4,T5] and process N6 = [T1,T2,T6,T7], although there is the same transaction sequence T1-T2 between N5 and N6, there is no inclusion relationship between N5 and N6. Therefore, the second ordered transaction set obtained after filtering N5 and N6 is still N5 = [T1,T2,T3,T4,T5] and N6 = [T1,T2,T6,T7].

[0092] According to embodiments of this disclosure, in the process of filtering N first ordered transaction sets into P second ordered transaction sequences, multiple first ordered transaction sets may contain duplicate transaction sequences, and there may also be inclusion relationships between these multiple first ordered transaction sets. Depending on actual needs, the duplicate transaction sequences within the first ordered transaction sets can be processed first, followed by processing the duplicate transaction sequences between the first ordered transaction sets, to obtain the P second ordered transaction sequences.

[0093] According to embodiments of this disclosure, for operation S344, after obtaining P processes, the P processes can be merged to obtain Q processes. Specifically, if it is determined that there is an identical starting transaction sequence among the P processes, the processes corresponding to the identical starting transaction sequences are merged to obtain Q processes. The starting transaction sequence includes at least two transactions starting from the starting transaction of each process, where P ≥ Q ≥ 1. Based on the Q processes and the definition information, a data flow graph is constructed according to a generation strategy. The specific generation strategy can be to construct various forms of data flow graphs according to the specific needs of the generated data flow graph.

[0094] For example, taking processes P1 = [T1,T2,T3,T4,T5] and P2 = [T1,T2,T6,T7] as examples, it is clear that processes P1 and P2 both contain the same transaction sequence T1-T2, and this transaction sequence T1-T2 is located at the beginning of both processes; that is, the transaction sequence T1-T2 is the starting transaction sequence. In this case, merging processes P1 and P2 results in two sub-processes under the same processing flow.

[0095] Figure 4 A flowchart illustrating a merging process method according to an embodiment of the present disclosure is shown schematically.

[0096] like Figure 4 As shown, for processes P1 = [T1,T2,T3,T4,T5] and P2 = [T1,T2,T6,T7], the merged data processing flow includes two sub-processes [T3,T4,T5] and [T6,T7]. Because of the weak connections between transactions, they are connected by dashed lines, which are also represented as dashed lines in the final data flow diagram.

[0097] According to an embodiment of this disclosure, for operation S230, filtering M groups into N groups includes: determining the database roles corresponding to the M groups; and deleting groups from the M groups whose database roles are operation and maintenance users or management users, resulting in N groups. The operation information in the data monitoring information includes the database roles of the databases. Database roles are used to represent user permissions, and database roles include one of operation and maintenance users, management users, or application users.

[0098] According to embodiments of this disclosure, the usernames corresponding to M groups can be obtained from the username field of the SQL statement in the operation information. Then, the database roles of the usernames corresponding to the M groups can be determined from the permission groups. Specifically, different database roles have different permissions, that is, there is a one-to-one correspondence between database roles and permission groups. When the group to which the username belongs is determined, the database role corresponding to that user is also known.

[0099] After determining the database roles corresponding to the M groups, remove the groups whose database roles are operation and maintenance users or management users from the M groups to obtain N groups.

[0100] Figure 5 A flowchart illustrating a method for constructing a data flow graph according to a specific embodiment of the present disclosure is shown schematically.

[0101] like Figure 5 As shown, in operation S501, monitoring information of the database related to the target application is obtained. This monitoring information includes the database definition information, the code text implementing the database functions, and operation information. After obtaining the database monitoring information, operation S502 proceeds to divide the code text according to the operation information, resulting in M ​​groups. Then, operation S503 proceeds to determine whether the database role corresponding to each of the M groups is an application user. If the database role is not an application user, operation S504 proceeds to delete groups whose database roles are operation and maintenance users or management users, resulting in N groups in operation S505. If the database role is an application user, no filtering is needed; operation S505 proceeds directly to obtain N groups, where M = N.

[0102] In operation S506, the obtained N groups are divided into transaction groups. Then, operation S507 is performed to determine whether the N groups include rollback transactions. If rollback transactions are included, they are deleted, and an updated set of N first-ordered transactions is obtained. If rollback transactions are not included, a set of N first-ordered transactions is obtained. Operation S507 can also be used to judge other transactions that do not meet the conditions.

[0103] In operation S510, N first ordered transaction sets are filtered to obtain P second ordered transaction sets. Specifically, the filtering of the N first ordered transaction sets includes filtering for duplicate transaction sequences within the ordered transaction sets, and also filtering for sets with inclusion relationships between ordered transaction sets. After obtaining the P second ordered transaction sets, operation S511 is performed to fit the P second ordered transaction sets to obtain P processes. Then, operation S512 is performed to merge the P processes to obtain Q processes. Specifically, merging the P processes includes merging processes with the same initial transaction sequence into a single process, and treating the different parts as sub-processes under that process.

[0104] In operation S513, the database definition information from the merged Q processes and monitoring information is used to generate a data flow diagram in a preset format. Then, operation S514 is performed to complete the construction operation.

[0105] This disclosure takes into account that databases, at the SQL level, record all SQL statements accessing the database within a reporting period in their logs or reports. This includes a large number of identical data processing operations on the same data object, resulting in a massive amount of data. Furthermore, the recorded full data mixes various database access information together, making specific analysis difficult. For core systems carrying high-concurrency critical business processes, the amount of data recorded by the database is even larger, and the complexity of the information is even more pronounced, leading to the overwhelming of useful information and posing challenges to further analysis.

[0106] This disclosure addresses the issue of numerous SQL statements in database logs and reports by identifying duplicate transactions executed multiple times on the same connection or the same transactions executed on multiple connections, thus eliminating duplicate information and clarifying the SQL execution flow. This effectively reduces the complexity of manually clarifying the SQL execution flow, improves the efficiency of system analysis and maintenance, and generates a data flow diagram that more accurately reflects the current operating status of the system compared to data flow diagrams generated during the project design phase.

[0107] The data flow diagram construction method proposed in this disclosure can construct a data flow diagram based on the program runtime state even in the absence of a data flow diagram design document. This facilitates system analysis by operation and maintenance personnel or comparison with the data flow diagram generated during the project design phase to carry out system acceptance verification.

[0108] According to embodiments of this disclosure, after the data flow diagram is constructed, it can also be displayed in a preset area of ​​the display interface according to a display strategy in response to the target user's operation command. The display strategy includes at least one of the following: database definition display conditions, code text display conditions, transaction display conditions, process display conditions, data flow diagram display conditions, etc.

[0109] According to embodiments of this disclosure, the display interface includes at least a data flow navigation area, a data object area, and a display area. After generating the data flow diagram, display elements can be initialized according to a display strategy, and then the corresponding data flow diagram can be displayed in response to the target user's operation instructions.

[0110] According to embodiments of this disclosure, element initialization includes initializing a data flow navigation area and initializing a data object area. The data flow navigation area initializes multiple levels of the data flow diagram, listing the data processing flow. For example, if the generated data flow diagram, from top to bottom, is data flow diagram, sub-process 1, sub-process 2, transaction, and SQL, then the organizational elements are listed and displayed at four levels: data flow diagram, process, transaction, and SQL. The data flow navigation area also includes listing various tables in the user schema, with each table including information about the user, such as the user's input and output data formats.

[0111] According to embodiments of this disclosure, displaying a corresponding data flow diagram in response to an operation command from a target user includes displaying the selected data in response to a selection operation by the user.

[0112] For example, database definition display conditions can be reflected as follows: when a user selects a table in the data object area, detailed information such as the table's DDL definition is displayed in the display area.

[0113] The code text display conditions can be reflected as follows: when a user selects a SQL statement in the data flow navigation area, the display area will show the execution of that SQL statement using arrows on the relevant tables.

[0114] The transaction display conditions can be reflected as follows: when a user selects a transaction in the data flow navigation area, the display area will show all SQL execution processes under that transaction using arrows on the relevant tables.

[0115] The process display conditions can be reflected as follows: when only sub-processes exist, when the user selects a sub-process in the data flow navigation area, the display area will show the execution process of all transactions under that sub-process using arrows on the relevant tables.

[0116] The data flow diagram display conditions can be reflected as follows: when the user selects the root node of the data flow diagram in the data flow navigation area, the execution flow of all sub-processes is displayed on the relevant tables in the right display area with arrows superimposed.

[0117] According to embodiments of this disclosure, different display strategies can be set under different display conditions. For example, for code text display conditions, the display strategy includes: if the SQL is a SELECT statement, then the SQL is marked on the outgoing arrow of the table, with the arrow pointing to the table accessed by the next SQL statement. If the SQL is a multi-table join query, then the SQL is marked on the outgoing arrows of the related tables, with the arrows converging to point to the table accessed by the next SQL statement. If the SQL is an INSERT, UPDATE, or DELETE statement, then the SQL is marked on the incoming arrow of the related tables, with the arrow starting from the table accessed by the previous SQL statement.

[0118] Figure 6 The illustration shows a schematic diagram of an interface for a data flow graph constructed according to an embodiment of the present disclosure.

[0119] like Figure 6 As shown, the display interface includes a data flow navigation area 610, a data object area 620, and a display area 630. The data flow navigation area 610 displays the data flow diagrams, sub-processes, transactions, and SQL statements at four levels. The data object area 620 displays the three user tables involved in the data flow diagram. The display area 630 displays the execution flow of all SQL statements under transaction 3.

[0120] Transaction 3 includes SQL1 and SQL2. SQL2 is an INSERT statement. Therefore, SQL2 is marked on the ingress arrow of table 3 (table3) related to SQL2. The arrow starts from the tables accessed by the previous SQL, namely table1 (table1) and table2 (table2) from which SQL1 started.

[0121] This disclosure takes into account that database reports focus on displaying various data metrics for each monitored object, and do not provide a clear view of the relationships between data objects. Experienced and highly skilled operations and maintenance personnel can infer the application's data processing flow based on information such as SQL statements and table definitions recorded in the database. However, this relies on personal experience, cannot be replicated or promoted, and has high implementation costs and barriers to entry. In addition, inexperienced operations and maintenance personnel need to spend a lot of time inferring the data processing flow, resulting in low processing efficiency.

[0122] Therefore, this disclosure, based on the database information of the target application in its actual operating state, constructs a data flow diagram and then graphically displays the constructed data flow diagram, thereby reducing the complexity of manually sorting out the SQL execution process and improving the efficiency of system analysis and system maintenance.

[0123] Figure 7 The illustration shows an interactive diagram of the process of constructing a data flow graph according to an embodiment of the present disclosure.

[0124] like Figure 7 As shown, the data flow graph construction device 700 includes an acquisition module 710, an analysis module 720, a display module 730, a configuration module 740, a construction platform database 750, and a user control module 760. During the interaction process, it also includes a system database 770 that stores database data of the target application.

[0125] The acquisition module 710 can obtain monitoring information related to the target application from the system database 770, then transmit the acquired monitoring information to the construction platform database 750 for storage, and finally transmit the monitoring information to the analysis module 720. The acquisition module 710 can also obtain monitoring information or other information from the construction platform database 750.

[0126] The analysis module 720 includes a first filtering unit 721, a second filtering unit 722, and a construction unit 723. The analysis module 720 can obtain monitoring information from the acquisition module 710 and configuration information for monitoring information or data flow diagrams from the construction platform database 750. Then, it uses the first filtering unit 721 and the second filtering unit 722 to group, organize, filter, and merge the code text, finally reaching the construction unit 723 to construct the data flow diagram. After constructing the data flow diagram, the analysis module 720 can transmit the constructed data flow diagram to the construction platform database 750 for storage or to the display module 730 for display.

[0127] The display module 730 can obtain data flow diagrams from the analysis module 720 for display, and can also directly obtain the content to be displayed from the construction platform database 750 for display.

[0128] The configuration module 740 is connected to the platform database 750 and is used to configure the data flow diagram. The user control module is also connected to the platform database 750 and is used to implement user control of the display function.

[0129] Figure 8 A schematic block diagram of a data flow graph construction apparatus according to an embodiment of the present disclosure is shown.

[0130] like Figure 8 As shown, the data flow graph construction apparatus 800 of this embodiment includes an acquisition module 810, a first filtering module 820, a second filtering module 830, and a construction module 840.

[0131] The acquisition module 810 is used to acquire monitoring information of a database related to the target application. This monitoring information includes the database's definition information, the code text implementing the database's functions, and operation information. The database is used to implement the interaction functions between the target application and the user. In one embodiment, the acquisition module 810 can be used to execute the operation S210 described above, which will not be repeated here.

[0132] The first filtering module 820 is used to divide the code text into M groups according to the operation information. Each group includes code text related to a database connection process, where M ≥ 1. In one embodiment, the first filtering module 820 can be used to perform the operation S220 described above, which will not be repeated here.

[0133] The second filtering module 830 is used to filter M groups to obtain N groups related to the interaction processing logic of the target application, where M≥N≥1. In one embodiment, the second filtering module 830 can be used to perform the operation S230 described above, which will not be repeated here.

[0134] The construction module 840 is used to construct a data flow diagram of the target application accessing the database based on the defined information and N groups. In one embodiment, the construction module 840 can be used to perform the operation S240 described above, which will not be repeated here.

[0135] According to embodiments of this disclosure, the construction module 840 includes a first determining unit, a second determining unit, a third determining unit, and a fourth determining unit.

[0136] The first determining unit is used to divide the code text within each of the N groups into multiple transactions based on the transaction identifier corresponding to the code text within each group, thereby obtaining a set of N first ordered transactions that correspond one-to-one with the N groups. In one embodiment, the first determining unit can be used to perform the operation S341 described above, which will not be repeated here.

[0137] The second determining unit is used to filter N first ordered transaction sets using preset rules to obtain P second ordered transaction sets. The preset rules are used to delete duplicate transaction sequences, where N ≥ P ≥ 1. In one embodiment, the second determining unit can be used to perform the operation S342 described above, which will not be repeated here.

[0138] The third determining unit is used to determine the P processes corresponding to the P second ordered transaction sets. In one embodiment, the third determining unit can be used to execute the operation S343 described above, which will not be repeated here.

[0139] The fourth determining unit is used to generate a data flow diagram of the target application accessing the database based on P processes and definition information. In one embodiment, the fourth determining unit can be used to perform the operation S344 described above, which will not be repeated here.

[0140] It should be noted that in the embodiments disclosed herein, the implementation methods of the apparatus and the method are the same or similar, and will not be described again here.

[0141] Any one or more of the modules according to embodiments of this disclosure, or at least some of the functions of any one or more of them, can be implemented in one module. Any one or more of the modules according to embodiments of this disclosure can be broken down into multiple modules for implementation.

[0142] Figure 9 A block diagram of an electronic device suitable for a data flow graph construction method according to an embodiment of the present disclosure is shown schematically.

[0143] like Figure 9 As shown, an electronic device 900 according to an embodiment of the present disclosure includes a processor 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage portion 908 into a random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0144] RAM 903 stores various programs and data required for the operation of electronic device 900. Processor 901, ROM 902, and RAM 903 are interconnected via bus 904. Processor 901 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 902 and / or RAM 903. It should be noted that the programs may also be stored in one or more memories other than ROM 902 and RAM 903. Processor 901 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in said one or more memories.

[0145] According to embodiments of this disclosure, the electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to a bus 904. The electronic device 900 may also include one or more of the following components connected to the I / O interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 910 as needed so that computer programs read from it can be installed into the storage section 908 as needed.

[0146] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.

[0147] According to embodiments of this disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this disclosure, the computer-readable storage medium may include ROM 902 and / or RAM 903 and / or one or more memories other than ROM 902 and RAM 903 described above.

[0148] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to enable the computer system to implement the data flow graph construction method provided in the embodiments of this disclosure.

[0149] When the computer program is executed by the processor 901, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0150] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and downloaded and installed via the communication section 909, and / or installed from a removable medium 911. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.

[0151] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 909, and / or installed from the removable medium 911. When the computer program is executed by the processor 901, it performs the functions defined in the system of this disclosure embodiment. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0152] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0153] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0154] Those skilled in the art will understand that the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.

[0155] The specific embodiments described above further illustrate the purpose, technical solutions, and beneficial effects of this disclosure. It should be understood that the above descriptions are merely specific embodiments of this disclosure and are not intended to limit this disclosure. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the protection scope of this disclosure.

Claims

1. A method for constructing a data flow graph, comprising: Acquire monitoring information about a database related to the target application. The monitoring information includes the database definition information, code text implementing the database functions, and operation information. The database is used to implement the interaction functions between the target application and the user. Based on the operation information, the code text is divided into M groups, each group including code text related to a database connection process, where M≥1; The M groups are filtered to obtain N groups related to the interaction processing logic of the target application, where M ≥ N ≥ 1; and Based on the defined information and the N groups, construct a data flow diagram for the target application's access to the database; Specifically, based on the defined information and the N groups, a data flow diagram for the target application's access to the database is constructed, including: Based on the transaction identifier corresponding to the code text in each group, the code text in each of the N groups is divided into multiple transactions to obtain N first ordered transaction sets that correspond one-to-one with the N groups. The transaction includes at least one line of code text for accessing or updating data items in the database. The first ordered transaction set includes multiple transaction sequences, and the transaction sequence includes at least two transactions that are related to each other and have a logical relationship. The N first ordered transaction sets are filtered using preset rules to obtain P second ordered transaction sets. The preset rules are used to delete duplicate transaction sequences, where N≥P≥1. Determine the P processes corresponding to the P second ordered transaction sets; and Based on the P processes and the defined information, a data flow diagram is generated for the target application to access the database.

2. The method according to claim 1, wherein, By filtering the N first ordered transaction sets using preset rules, P second ordered transaction sets are obtained, including: If it is determined that there are identical transaction sequences in the nth first ordered transaction set, one transaction sequence is randomly selected from the identical transaction sequences and other identical transaction sequences are deleted to obtain the nth second ordered transaction set.

3. The method according to claim 1, wherein, The process of filtering the N first ordered transaction sets using preset rules to obtain P second ordered transaction sets further includes: If it is determined that there is an inclusion relationship between the NP first ordered transaction sets and the i-th first ordered transaction set, and the NP first ordered transaction sets are all subsets of the i-th first ordered transaction set, then delete the NP first ordered transaction sets to obtain P second ordered transaction sets, where N≥i≥1.

4. The method according to claim 1, wherein, Based on the P processes and the defined information, a data flow diagram for the target application's access to the database is generated, including: If it is determined that there are identical starting transaction sequences among the P processes, the processes corresponding to the identical starting transaction sequences are merged to obtain Q processes. The starting transaction sequence includes at least two transactions starting from the starting transaction of each process, where P≥Q≥1. Based on the Q processes and the defined information, the data flow graph is constructed according to the generation strategy.

5. The method according to claim 1, wherein, The operation information includes the database roles of the database, which represent user permissions. The database roles include one of the following: operation and maintenance user, management user, and application user. The M groups are filtered to obtain N groups related to the interaction processing logic of the target application, including: Determine the database roles corresponding to the M groups; and The N groups are obtained by deleting the groups whose database roles are operation and maintenance users or management users from the M groups.

6. The method according to claim 1, wherein, The operation information includes a database connection identifier and time information for operating the code text. Based on the operation information, the code text is divided into M groups, including: Selecting the same code text as the database connection identifier yields M original groups; and The code text within the M original groups is sorted according to the time information to obtain the M groups.

7. The method according to claim 1, further comprising: In response to the target user's operation command, the data flow diagram is displayed in a preset area of ​​the display interface according to the display strategy. The display strategy includes at least one of the following: database definition display conditions, code text display conditions, transaction display conditions, process display conditions, and data flow diagram display conditions.

8. A data flow graph construction apparatus, comprising: The acquisition module is used to acquire monitoring information of a database related to the target application. The monitoring information includes the database definition information, code text that implements the database functions, and operation information. The database is used to implement the interaction functions between the target application and the user. The first filtering module is used to divide the code text into M groups according to the operation information, each group including code text related to a database connection process, where M≥1; The second filtering module is used to filter the M groups to obtain N groups related to the interaction processing logic of the target application, where M ≥ N ≥ 1; and The construction module is used to construct a data flow graph of the target application accessing the database based on the defined information and the N groups; The building module is further used for: Based on the transaction identifier corresponding to the code text in each group, the code text in each of the N groups is divided into multiple transactions to obtain N first ordered transaction sets that correspond one-to-one with the N groups. The transaction includes at least one line of code text for accessing or updating data items in the database. The first ordered transaction set includes multiple transaction sequences, and the transaction sequence includes at least two transactions that are related to each other and have a logical relationship. The N first ordered transaction sets are filtered using preset rules to obtain P second ordered transaction sets. The preset rules are used to delete duplicate transaction sequences, where N≥P≥1. Determine the P processes corresponding to the P second ordered transaction sets; and Based on the P processes and the defined information, a data flow diagram is generated for the target application to access the database.

9. An electronic device, comprising: One or more processors; Storage device for storing one or more programs. Wherein, when the one or more programs are executed by the one or more processors, the one or more processors perform the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 7.

11. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 7.