Processing method and device for information data with incidence relation
By transforming the query chain of a relational database into a graph structure and utilizing graph analysis, the problem of complex and low-accuracy information data analysis in existing technologies is solved, achieving the effect of simplifying the analysis process and improving accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-03-13
AI Technical Summary
In existing technologies, when using relational databases to store large amounts of related information, the analysis process is complex and the accuracy is low.
The query chain in the relational database is transformed into a graph structure. The graph analysis results of the target information data are obtained through graph analysis processing, including constructing the graph structure, determining the node attribute values, and establishing connection edges.
It simplifies the information and data analysis process, improves the accuracy of analysis, and can intuitively display and analyze target information and data, making it suitable for various business scenarios.
Smart Images

Figure CN121658685A_ABST
Abstract
Description
Technical Field
[0001] This specification relates to one or more embodiments in the field of computers, and more particularly to methods and apparatus for processing information data with related relationships. Background Technology
[0002] Currently, various business scenarios often involve a large amount of related information and data. For example, in a transaction scenario, the information and data typically include the buyer's user identifier, card number, and balance, as well as the seller's user identifier, risk level, and other transaction information; in a transportation scenario, the information and data typically include transportation information such as station and train schedules.
[0003] In existing technologies, relational databases are used to store large amounts of information data, which makes it difficult to analyze such data, resulting in a complex analysis process and low accuracy.
[0004] Therefore, it is necessary to process information data with correlations in order to simplify the data analysis process and improve accuracy. Summary of the Invention
[0005] This specification describes one or more embodiments of a method and apparatus for processing information data with correlation relationships, which can simplify the information data analysis process and improve accuracy.
[0006] Firstly, a method for processing information data with related relationships is provided, the method including:
[0007] The target information data is queried from multiple tables in a relational database, and the sub-information data are linked together by query dependencies.
[0008] Map a sub-information data in the query link to a node in the graph structure, determine the attribute value of the node based on the sub-information data, and establish a connection edge between the nodes corresponding to two sub-information data with query dependency relationship, thereby constructing the graph structure corresponding to the query link;
[0009] Graph analysis is performed based on the graph structure to obtain the graph analysis results corresponding to the target information data.
[0010] In one possible implementation, the target information data belongs to transaction information data; obtaining the graph analysis results corresponding to the target information data includes:
[0011] Determine whether the transaction behavior corresponding to the target information data is risky.
[0012] In one possible implementation, the target information data belongs to transportation data; obtaining the graph analysis results corresponding to the target information data includes:
[0013] Determine the shortest travel path for the traffic behavior corresponding to the target information data.
[0014] In one possible implementation, the target information data belongs to multiple operation data of the target database operation; obtaining the graph analysis result corresponding to the target information data includes:
[0015] Determine the data lineage among the multiple operational data included in the target information data.
[0016] In one possible implementation, the query dependency is manifested as follows: the first sub-information data is associated with the second sub-information data through a foreign key, and the node corresponding to the first sub-information data in the graph structure is the parent node and the node corresponding to the second sub-information data is the child node.
[0017] In one possible implementation, mapping a sub-information data in the query chain to a node in the graph structure includes:
[0018] Assign a node number to a sub-information data.
[0019] Furthermore, establishing a connection edge between nodes corresponding to two sub-information data with query dependencies includes:
[0020] Find the child nodes of the current node;
[0021] Establish a connection edge between the current node and its child nodes.
[0022] In one possible implementation, determining the attribute value of the node based on the sub-information data includes:
[0023] The sub-information data is standardized to obtain standard data;
[0024] The standard data is hashed to obtain a hash value, which is then used as the attribute value of the node.
[0025] Furthermore, the sub-information data includes field values for multiple fields; the standardization process includes:
[0026] The multiple field values are sorted according to a preset field arrangement order to obtain standard data in a standard order.
[0027] Furthermore, the graph analysis processing based on the graph structure includes:
[0028] Extract the first subgraph from the graph structure;
[0029] The first subgraph is compared with risk subgraphs of known types to verify their consistency in node attributes and topology.
[0030] If the test results show that the two are consistent in node attributes and topology, then it is determined that the transaction behavior corresponding to the target information data has the known type of transaction risk.
[0031] Furthermore, the graph analysis processing based on the graph structure includes:
[0032] A path search is performed on the graph structure to determine the shortest travel path consisting of multiple nodes and connecting edges.
[0033] Furthermore, the graph analysis processing based on the graph structure includes:
[0034] Community discovery is performed on the graph structure to identify communities composed of multiple nodes, and the multiple operational data corresponding to the multiple nodes have a preset type of data lineage relationship.
[0035] Secondly, a processing apparatus for information data with related relationships is provided, the apparatus comprising:
[0036] The query unit is used to query the target information data from multiple data tables in a relational database, and the various sub-information data form a query link based on the query dependency relationship.
[0037] The construction unit is used to map a sub-information data in the query link obtained by the query unit to a node in the graph structure, determine the attribute value of the node based on the sub-information data, and establish a connection edge between the nodes corresponding to two sub-information data with query dependency relationship, thereby constructing the graph structure corresponding to the query link.
[0038] The determining unit is used to perform graph analysis processing based on the graph structure obtained by the constructing unit, and to obtain the graph analysis results corresponding to the target information data.
[0039] Thirdly, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the method of the first aspect.
[0040] Fourthly, a computing device is provided, including a memory and a processor, wherein the memory stores executable code, and the processor executes the executable code to implement the method of the first aspect.
[0041] The method and apparatus provided in the embodiments of this specification first query each sub-information data included in the target information data from multiple data tables in a relational database, forming a query link between the sub-information data based on query dependencies. Then, a sub-information data in the query link is mapped to a node in a graph structure, and the attribute value of the node is determined based on the sub-information data. A connection edge is established between nodes corresponding to two sub-information data with query dependencies, thereby constructing the graph structure corresponding to the query link. Finally, graph analysis processing is performed based on the graph structure to obtain the graph analysis result corresponding to the target information data. As can be seen from the above, the embodiments of this specification transform the query link of the target information data from the storage format of a relational database to the storage format of a graph structure. This facilitates the intuitive display and analysis of the target information data, and the graph analysis result corresponding to the target information data can be determined through graph analysis processing, simplifying the analysis process of the target information data and improving accuracy. Attached Figure Description
[0042] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 This is a schematic diagram illustrating an implementation scenario of one embodiment disclosed in this specification;
[0044] Figure 2 A flowchart illustrating a method for processing information data with relationships, according to one embodiment;
[0045] Figure 3 This diagram illustrates a query chain according to one embodiment.
[0046] Figure 4 A schematic diagram of a graph structure according to one embodiment is shown;
[0047] Figure 5 A schematic block diagram of a processing apparatus for information data with relationships is shown according to one embodiment. Detailed Implementation
[0048] The solution provided in this specification will now be described with reference to the accompanying drawings.
[0049] Figure 1This is a schematic diagram illustrating an implementation scenario of one embodiment disclosed in this specification. This implementation scenario involves the processing of information data with interrelationships. Processing of information data with interrelationships is involved in various business scenarios. Typically, in a business system, a single business transaction often involves multiple subsystems, each generating a large amount of interrelated sub-information data. It can be understood that all the sub-information data together constitute the complete information data for that business transaction. Traditional methods primarily use relational databases to store the sub-information data of each subsystem. Each sub-information data can be represented by multiple fields in a table, with foreign keys indicating the relationship between fields in two tables. The aforementioned information data may include, but is not limited to, various information about the buyer or seller in a transaction, such as the buyer's user ID, card number, and balance; or the seller's user ID and risk level.
[0050] Reference Figure 1 A relational database is a database that uses a relational model to organize data. It stores data in rows and columns for easy user understanding. These rows and columns are called tables, and a group of tables makes up the database. Users retrieve data from the database through queries, which are executable codes used to limit access to specific areas within the database. A foreign key is an attribute column in one table that references the primary key or unique constraint of another table. It is used to establish relationships between tables and ensure data integrity. For example, if the primary key in table 1 is the "User ID" field, and the foreign key in table 1 is the "Card Number" field, and the primary key in table 2 is the "Card Number" field, then the foreign key in table 1 references the primary key in table 2. As is understandable, in Table 1, "User Identifier" is the field name, and A100, A101, and A102 are the field values for different rows under this field; in Table 1, "Card Number" is the field name, and C2010, C2011, and C2012 are the field values for different rows under this field; Table 1 also has field names "Field 1," "Field 2," "Field 3," and "Field 4," but the field values for these fields are omitted. In Table 2, "Card Number" is the field name, and C2010, C2011, and C2012 are the field values for different rows under this field; in Table 2, "Balance" is the field name, and 500, 1600, and 1800 are the field values for different rows under this field; Table 2 also has field names "Field 5" and "Field 6," but the field values for these fields are omitted.
[0051] In the embodiments of this specification, there are query dependencies between the various sub-information data. For example, the value of the "card number" field in Table 1 is first queried based on the value of the "user identifier" field, and then the value of the "balance" field in Table 2 is queried based on the value of the "card number" field. Thus, a query link is formed between the various sub-information data based on the query dependencies.
[0052] Figure 2 This diagram illustrates a method for processing information data with related relationships according to one embodiment. The method can be based on... Figure 1 The implementation scenario is shown. For example... Figure 2 As shown, the processing method for information data with related relationships in this embodiment includes the following steps: Step 21, querying each sub-information data included in the target information data from multiple data tables in a relational database, and forming a query link between the sub-information data according to the query dependency relationship; Step 22, mapping one sub-information data in the query link to a node in a graph structure, determining the attribute value of the node based on the sub-information data, and establishing a connection edge between the nodes corresponding to two sub-information data with query dependency relationship, thereby constructing the graph structure corresponding to the query link; Step 23, performing graph analysis processing based on the graph structure to obtain the graph analysis result corresponding to the target information data. The specific execution method of each of the above steps is described below.
[0053] First, in step 21, the target information data is queried from multiple tables in the relational database, and the various sub-information data are linked together by query dependencies. Understandably, these query dependencies restrict the order in which the sub-information data are queried. For example, the value of the first field in table one must be queried first, and then the value of the second field in table two must be queried based on the value of the first field.
[0054] The embodiments in this specification can be applied to various scenarios. For example, in a transaction scenario, the target information data belongs to transaction information data; in a transportation scenario, the target information data belongs to transportation data; and in a database operation scenario, the target information data belongs to multiple operation data of the target database operation.
[0055] Optionally, multiple data tables can be queried by different subsystems, with each subsystem retrieving a sub-information data.
[0056] In one example, the query dependency is manifested as follows: the first sub-information data is associated with the second sub-information data through a foreign key, and the node corresponding to the first sub-information data in the graph structure is the parent node and the node corresponding to the second sub-information data is the child node.
[0057] In this example, the query chain can describe the data flow relationship between various subsystems. It can form a tree structure, which is a hierarchical data organization form. When a piece of information data is the parent node, it can have multiple child nodes.
[0058] Figure 3 A schematic diagram of a query chain according to one embodiment is shown. (Refer to...) Figure 3Taking a transaction scenario as an example, the information data specifically refers to the transaction data, and the sub-information data specifically refers to the sub-transaction data. Transaction data is stored in multiple tables within a relational database, and these tables are distributed across different data platforms. This means that these tables correspond to multiple information sources, and during a transaction, the system queries different data platforms for the necessary transaction data. Each transaction corresponds to a specific query chain, forming a tree structure. Each node in the tree structure corresponds to a sub-transaction data related to this transaction, obtained from a specific information source. Each box in the diagram represents a node in the tree structure, and the data content within each box includes the table name from which the sub-transaction data originates and the specific field values obtained from the query. Starting from the root node at the top of the tree structure, the arrows represent the entire data flow process. For example, first, the system queries the table named pmt_pay_ord to retrieve the sub-transaction data corresponding to this transaction and stores it in the root node. Then, based on certain field values within this sub-transaction data, it queries the tables named pmt_apply_ord and pmt_ar_network to retrieve the corresponding sub-transaction data and stores it in these two nodes. This process continues, and so on. Then, based on certain field values within the table named pmt_apply_ord, it queries the table named pmt_apply_fd_dtl to retrieve the corresponding sub-transaction data and stores it in another node. After obtaining all the transaction data, the entire query chain is formed. Understandably, `dataMap` represents a list of data; `status` represents a field name, `SU` represents a field value; `merge_type` represents a field name, `SINGLE_MAIN` represents a field value; `fund belong` represents a field name, `PYER` represents a field value; `asset_type` represents a field name, `BANKCARD` represents a field value; `asset_type_code` represents a field name, `EXPRESS_DC` represents a field value.
[0059] In other scenarios, the specific meanings of information data and sub-information data may differ. For example, in the context of public transportation travel, the first piece of sub-information data in a query link is a query of the route table from the origin, such as finding the optional route 1; the second piece of sub-information data corresponds to a query of the station table for route 1, obtaining the stations that route 1 passes through, and so on.
[0060] In the embodiments of this specification, the meaning of information data or sub-information data, including fields, is not limited and can be flexibly set according to the actual needs of the scenario.
[0061] Then, in step 22, a sub-information data in the query link is mapped to a node in the graph structure, and the attribute value of the node is determined based on the sub-information data. A connection edge is established between nodes corresponding to two sub-information data with query dependencies, thereby constructing the graph structure corresponding to the query link. It can be understood that the graph structure covers all information data in the query link, making queries simple, performance-efficient, easy to display the complete link, and convenient for analysis.
[0062] In one example, mapping a sub-information data in the query chain to a node in the graph structure includes:
[0063] Assign a node number to a sub-information data.
[0064] In this example, different node numbers can be assigned to different sub-information data, thereby establishing a correspondence between the sub-information data and the nodes, and obtaining the nodes in the graph structure.
[0065] Furthermore, establishing a connection edge between nodes corresponding to two sub-information data with query dependencies includes:
[0066] Find the child nodes of the current node;
[0067] Establish a connection edge between the current node and its child nodes.
[0068] In this example, the edges in the graph structure are obtained by traversing each node and establishing connecting edges between the current node and its child nodes.
[0069] In one example, determining the attribute value of the node based on the sub-information data includes:
[0070] The sub-information data is standardized to obtain standard data;
[0071] The standard data is hashed to obtain a hash value, which is then used as the attribute value of the node.
[0072] In this example, by mapping sub-information data to hash values, redundant storage space can be reduced, and by performing normalization, substantially identical sub-information data can be mapped to unique hash values.
[0073] Furthermore, the sub-information data includes field values for multiple fields; the standardization process includes:
[0074] The multiple field values are sorted according to a preset field arrangement order to obtain standard data in a standard order.
[0075] In this example, the field order can be preset based on the first letter of the field name, in alphabetical order. It's understood that the preset field order is not unique; a consistent standard is sufficient.
[0076] The embodiments in this specification provide the following pseudocode, which can be used to construct the graph structure corresponding to the query link.
[0077] The pseudocode for the solution:
[0078]
[0079]
[0080] The pseudocode above corresponds to the processing flow of the solution. The input is the query chain. The modeling process of the query chain is as follows: when data A is associated with data B, data B is treated as a child node of data A, and its content is included as a node attribute. Recursive parsing is used, performing a depth-first search. Starting from the root node, it traverses downwards along the child nodes, adding the bottom-level child nodes to the graph structure before returning to the upper level and adding the upper-level parent node to the graph structure. Node processing requires the following sub-steps: extracting node attributes, processing attributes, establishing edge relationships between parent and child nodes, and adding them to the graph structure. The output is graph structure data.
[0081] Figure 4 This diagram illustrates a graph structure according to one embodiment, which is based on Figure 3 The query chain shown is derived from this. (Refer to...) Figure 4 The graph structure includes 4 nodes, numbered 1, 2, 3, and 4 in sequence. The hash value of the child node's properties data (propertyhash) serves as the node's attribute value. Connections are established between parent nodes and their child nodes. Node 1 and node 2 are connected by an edge, as are node 1 and node 3, and node 2 and node 4. The graph structure corresponds to the following point data:
[0082] <ID=1,properties="table:pmt_pay_ord"-> propertyhash = 1>;
[0083] <ID=2,
[0084] properties="fund_belong:PYER,merge_type:SINGLE_MAIN,status:SU,table:pmt_apply_ord"->propertyhash=2>;
[0085] <ID=3,properties="table:pmt_ar_network"->propertyhash = 3>;
[0086] <ID=4,
[0087] properties="asset_type:BANDCARD,asset_type_code:EXPRESS_DC,table:pmt_apply_fd_dtl"->propertyhash=4>;
[0088] The graph structure corresponds to the following edge data:
[0089] <1->2>;
[0090] <1->3>;
[0091] <2->4>.
[0092] The embodiments in this specification can efficiently realize the conversion from query links to graph structures.
[0093] Finally, in step 23, graph analysis is performed based on the graph structure to obtain the graph analysis results corresponding to the target information data. It is understood that there are various methods for graph analysis, and any method can be used.
[0094] In one example, the target information data belongs to transaction information data; obtaining the graph analysis results corresponding to the target information data includes:
[0095] Determine whether the transaction behavior corresponding to the target information data is risky.
[0096] Furthermore, the graph analysis processing based on the graph structure includes:
[0097] Extract the first subgraph from the graph structure;
[0098] The first subgraph is compared with risk subgraphs of known types to verify their consistency in node attributes and topology.
[0099] If the test results show that the two are consistent in node attributes and topology, then it is determined that the transaction behavior corresponding to the target information data has the known type of transaction risk.
[0100] In this example, it can not only determine whether the transaction behavior corresponding to the target information data is risky, but also determine the type of risk, with high efficiency and accuracy.
[0101] In traditional risk control systems, query chains typically record the fund flow relationships along a single path in a tree structure. This structure lacks the topological characteristics necessary for directly running graph algorithms, making it difficult to apply mature graph analysis techniques. However, transforming the system into a graph structure allows for the convenient use of graph analysis techniques in various business scenarios.
[0102] For example, in graph pattern mining scenarios, frequently occurring substructure patterns can be found in large-scale transaction graphs, such as the "star pattern" where funds are concentrated in the same account or multi-level transfer patterns. These patterns can be used to build a risk template library, providing a basis for subsequent risk identification.
[0103] In the context of graph isomorphism determination, a subgraph of the transaction network can be compared with a known high-risk pattern subgraph to examine their consistency in node attributes and topology. If the isomorphism is not found, it can be quickly determined that the transaction network contains a known type of risk structure.
[0104] This structural transformation not only enhances data representation capabilities but also enables information data to be directly integrated into efficient graph analysis algorithm libraries (such as community detection, path search, subgraph matching, similarity calculation, etc.), significantly improving the coverage and accuracy of risk detection.
[0105] In one example, the target information data belongs to transportation data; obtaining the graph analysis results corresponding to the target information data includes:
[0106] Determine the shortest travel path for the traffic behavior corresponding to the target information data.
[0107] Furthermore, the graph analysis processing based on the graph structure includes:
[0108] A path search is performed on the graph structure to determine the shortest travel path consisting of multiple nodes and connecting edges.
[0109] In this example, the shortest travel path in transportation can be determined based on path search. Path search techniques in graph analysis are a set of algorithms used to find paths between specific nodes in a graph. Their core objective is to identify the shortest travel path by analyzing the relationships between entities.
[0110] In one example, the target information data belongs to multiple operation data of the target database operation; obtaining the graph analysis result corresponding to the target information data includes:
[0111] Determine the data lineage among the multiple operational data included in the target information data.
[0112] Furthermore, the graph analysis processing based on the graph structure includes:
[0113] Community discovery is performed on the graph structure to identify communities composed of multiple nodes, and the multiple operational data corresponding to the multiple nodes have a preset type of data lineage relationship.
[0114] In this example, community detection can be used to partition a graph structure into communities, dividing the nodes in the graph into multiple communities. Based on the nodes contained within a community, it can be used to identify whether multiple data operations share a predefined data lineage relationship. Specifically, community detection algorithms (such as the Louvain algorithm and label propagation algorithms) are used to partition the graph structure into communities. A community is a tightly connected group in a network; community detection identifies these groups by analyzing the strength of connections between nodes. For example, the Louvain algorithm is a community detection algorithm based on modularity. It increases the modularity of a community by continuously adding nodes to it, thereby discovering hierarchical community structures.
[0115] The embodiments in this specification can also obtain graph analysis results based on subgraph matching. Specifically, core subgraphs can be extracted from the graph structure for risk control.
[0116] The embodiments in this specification can also obtain graph analysis results based on similarity calculations. Potential risks can be identified by quantifying the characteristics of nodes and paths.
[0117] The method provided in the embodiments of this specification first queries various sub-information data included in the target information data from multiple data tables in a relational database, forming query links between the sub-information data based on query dependencies. Then, a sub-information data in the query link is mapped to a node in a graph structure, and the attribute value of the node is determined based on the sub-information data. A connection edge is established between nodes corresponding to two sub-information data with query dependencies, thereby constructing the graph structure corresponding to the query link. Finally, graph analysis processing is performed based on the graph structure to obtain the graph analysis result corresponding to the target information data. As can be seen from the above, the embodiments of this specification transform the query link of the target information data from the storage format of a relational database to the storage format of a graph structure. This facilitates the intuitive display and analysis of the target information data, and the graph analysis result corresponding to the target information data can be determined through graph analysis processing, simplifying the analysis process of the target information data and improving accuracy.
[0118] According to another embodiment, a processing apparatus for information data with related relationships is also provided, the apparatus being used to perform the methods provided in the embodiments of this specification. Figure 5 A schematic block diagram of a processing apparatus for information data with correlation relationships, according to one embodiment, is shown. Figure 5 As shown, the device 500 includes:
[0119] The query unit 51 is used to query the target information data from multiple data tables in the relational database, and the sub-information data form a query link based on the query dependency relationship between the sub-information data.
[0120] The construction unit 52 is used to map a sub-information data in the query link obtained by the query unit 51 to a node in the graph structure, and determine the attribute value of the node according to the sub-information data, and establish a connection edge between the nodes corresponding to two sub-information data with query dependency relationship, thereby constructing the graph structure corresponding to the query link.
[0121] The determining unit 53 is used to perform graph analysis processing based on the graph structure obtained by the constructing unit 52, and obtain the graph analysis result corresponding to the target information data.
[0122] Optionally, as an embodiment, the target information data belongs to transaction information data; the determining unit 53 is specifically used to determine whether the transaction behavior corresponding to the target information data has risks.
[0123] Optionally, as an embodiment, the target information data belongs to traffic travel data; the determining unit 53 is specifically used to determine the shortest travel path for the traffic travel behavior corresponding to the target information data.
[0124] Optionally, as an embodiment, the target information data belongs to multiple operation data of the target database operation; the determining unit 53 is specifically used to determine the data lineage relationship between the multiple operation data included in the target information data.
[0125] Optionally, as an embodiment, the query dependency relationship is manifested in that the first sub-information data is associated with the second sub-information data through a foreign key, and the node corresponding to the first sub-information data in the graph structure is the parent node and the node corresponding to the second sub-information data is the child node.
[0126] Optionally, as an embodiment, the building unit 52 includes:
[0127] Assign a node number to a sub-information data.
[0128] Furthermore, the building unit 52 includes:
[0129] Find the child nodes of the current node;
[0130] Establish a connection edge between the current node and its child nodes.
[0131] Optionally, as an embodiment, the building unit 52 includes:
[0132] The standardized sub-unit is used to standardize the sub-information data to obtain standard data.
[0133] The hash operation subunit is used to perform hash operations on the standard data obtained by the standardization subunit to obtain a hash value, and use the hash value as the attribute value of the node.
[0134] Furthermore, the sub-information data includes field values of multiple fields; the standardization sub-unit is specifically used to sort the multiple field values according to a preset field arrangement order to obtain standard data in a standard order.
[0135] Furthermore, the determining unit 53 includes:
[0136] Extracting sub-units for extracting a first subgraph from the graph structure;
[0137] The comparison sub-unit is used to compare the first subgraph obtained by the extraction sub-unit with the risk subgraph of known type to verify the consistency between the two in terms of node attributes and topology.
[0138] The sub-unit is determined so that if the test results of the compared sub-units are consistent in terms of node attributes and topology, then the transaction behavior corresponding to the target information data is determined to have the known type of transaction risk.
[0139] Furthermore, the determining unit 53 is specifically used to perform path search on the graph structure to determine the shortest travel path formed by multiple nodes and connecting edges.
[0140] Furthermore, the determining unit 53 is specifically used to perform community discovery on the graph structure, determine a community composed of multiple nodes, and determine that the multiple operation data corresponding to the multiple nodes have a preset type of data lineage relationship.
[0141] Using the apparatus provided in the embodiments of this specification, firstly, the query unit 51 queries various sub-information data corresponding to the target information data from multiple data tables in a relational database, and the sub-information data form a query link based on query dependencies; then, the construction unit 52 maps one sub-information data in the query link to a node in a graph structure, determines the attribute value of the node based on the sub-information data, and establishes a connection edge between the nodes corresponding to two sub-information data with query dependencies, thereby constructing the graph structure corresponding to the query link; finally, the determination unit 53 performs graph analysis processing based on the graph structure to obtain the graph analysis result corresponding to the target information data. As can be seen from the above, the embodiments of this specification transform the query link of the target information data from the storage form of a relational database to the storage form of a graph structure, which is beneficial for intuitively displaying and analyzing the target information data, and the graph analysis result of the target information data can be determined through graph analysis processing, which simplifies the analysis process of the target information data and improves accuracy.
[0142] According to another embodiment, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed in a computer, causes the computer to perform a combination Figure 2 The method described.
[0143] According to another embodiment, a computing device is also provided, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it implements a combination... Figure 2 The method described.
[0144] Those skilled in the art will recognize that, in one or more of the examples above, the functions described in this invention can be implemented using hardware, software, firmware, or any combination thereof. When implemented in software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium.
[0145] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for processing information data with related relationships, the method comprising: The target information data is queried from multiple tables in a relational database, and the sub-information data are linked together by query dependencies. Map a sub-information data in the query link to a node in the graph structure, determine the attribute value of the node based on the sub-information data, and establish a connection edge between the nodes corresponding to two sub-information data with query dependency relationship, thereby constructing the graph structure corresponding to the query link; Graph analysis is performed based on the graph structure to obtain the graph analysis results corresponding to the target information data.
2. The method as described in claim 1, wherein, The target information data belongs to transaction information data; obtaining the graph analysis results corresponding to the target information data includes: Determine whether the transaction behavior corresponding to the target information data is risky.
3. The method as described in claim 1, wherein, The target information data belongs to transportation data; obtaining the graph analysis results corresponding to the target information data includes: Determine the shortest travel path for the traffic behavior corresponding to the target information data.
4. The method of claim 1, wherein, The target information data belongs to multiple operation data of the target database operation; The acquisition of the graph analysis results corresponding to the target information data includes: Determine the data lineage among the multiple operational data included in the target information data.
5. The method of claim 1, wherein, The query dependency relationship is reflected in the fact that the first sub-information data is associated with the second sub-information data through a foreign key, and the node corresponding to the first sub-information data in the graph structure is the parent node and the node corresponding to the second sub-information data is the child node.
6. The method of claim 1, wherein, The step of mapping a sub-information data in the query chain to a node in the graph structure includes: Assign a node number to a sub-information data.
7. The method of claim 5, wherein, The step of establishing a connection edge between nodes corresponding to two sub-information data with query dependencies includes: Find the child nodes of the current node; Establish a connection edge between the current node and its child nodes.
8. The method of claim 1, wherein, Determining the attribute value of the node based on the sub-information data includes: The sub-information data is standardized to obtain standard data; The standard data is hashed to obtain a hash value, which is then used as the attribute value of the node.
9. The method of claim 8, wherein, The sub-information data includes field values for multiple fields; the standardization process includes: The multiple field values are sorted according to a preset field arrangement order to obtain standard data in a standard order.
10. The method of claim 2, wherein, The graph analysis processing based on the graph structure includes: Extract the first subgraph from the graph structure; The first subgraph is compared with risk subgraphs of known types to verify their consistency in node attributes and topology. If the test results show that the two are consistent in node attributes and topology, then it is determined that the transaction behavior corresponding to the target information data has the known type of transaction risk.
11. The method of claim 3, wherein, The graph analysis processing based on the graph structure includes: A path search is performed on the graph structure to determine the shortest travel path consisting of multiple nodes and connecting edges.
12. The method of claim 4, wherein, The graph analysis processing based on the graph structure includes: Community discovery is performed on the graph structure to identify communities composed of multiple nodes, and the multiple operational data corresponding to the multiple nodes have a preset type of data lineage relationship.
13. A processing apparatus for information data with correlation relationships, the apparatus comprising: The query unit is used to query the target information data from multiple data tables in a relational database, and the various sub-information data form a query link based on the query dependency relationship. The construction unit is used to map a sub-information data in the query link obtained by the query unit to a node in the graph structure, determine the attribute value of the node based on the sub-information data, and establish a connection edge between the nodes corresponding to two sub-information data with query dependency relationship, thereby constructing the graph structure corresponding to the query link. The determining unit is used to perform graph analysis processing based on the graph structure obtained by the constructing unit, and to obtain the graph analysis results corresponding to the target information data.
14. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the method of any one of claims 1-12.
15. A computing device comprising a memory and a processor, wherein the memory stores executable code, and the processor, when executing the executable code, implements the method of any one of claims 1-12.