Method and system for dynamically constructing a financial data correlation network with dual-database collaborative processing

By employing a dual-database collaborative processing method, utilizing a graph database for topological retrieval and a relational database for attribute retrieval, the inefficiency and high coupling of relational databases in complex queries are resolved, enabling efficient dynamic construction and querying of financial interconnected networks.

CN122633653APending Publication Date: 2026-08-25TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610759164.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-28
Publication Date
2026-08-25

AI Technical Summary

Technical Problem

In existing technologies, relational databases are inefficient at handling complex relational queries. Independent graph library architectures are highly coupled with relational database systems and data synchronization is difficult, which limits the efficiency of dynamic construction and querying of financial relational networks.

Method used

A dual-database collaborative processing method is adopted, which performs relational topology retrieval through a graph database and attribute retrieval through a relational database, decoupling topology traversal and attribute retrieval. This approach leverages the efficient traversal capabilities of the graph database and the transaction capabilities of the relational database to improve query efficiency.

Benefits of technology

It enables the dynamic construction of financial linkage networks and improves query efficiency. Through dual-database collaborative processing, it enhances the performance of multi-hop traversal queries and the real-time nature of data synchronization, while reducing system coupling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122633653A_ABST
    Figure CN122633653A_ABST
Patent Text Reader

Abstract

The application provides a financial data correlation network dynamic construction method and system for double-library collaborative processing, solves the problems of low efficiency of multi-hop traversal query of a relational database in financial correlation query, high coupling degree of an independent graph database and a system in related technologies, and difficulty in data synchronization. The application obtains a target entity identifier, a relationship type and a traversal depth by analyzing a query request; performs correlation topology retrieval in a graph database to obtain a correlation entity identifier set and a path topology; performs attribute retrieval in a relational database by taking the correlation entity identifier set as a batch query condition to obtain complete attribute data of an entity; and fuses the path topology and the complete attribute data of the entity to output a structured result. The application realizes the collaboration of transaction capability of the relational database and efficient traversal capability of the graph database by decoupling topology traversal and attribute retrieval, and improves the dynamic construction and query efficiency of the financial correlation network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a method and system for dynamically constructing a financial data association network for collaborative processing of dual databases. Background Technology

[0002] With the rapid development of fintech, financial transactions are becoming increasingly networked and dynamic. Intricate relationships exist between entities in financial activities (such as individuals, businesses, accounts, and devices) involving transactions, shareholdings, and guarantees. These relationships collectively form a vast and continuously evolving financial network. Against this backdrop, the ability to deeply mine and rapidly query these relationships has become a critical technological requirement for core business scenarios such as risk control, fraud prevention, intelligent investment research, and compliance supervision.

[0003] Related technologies use relational databases for query performance, but multi-hop traversal queries are inefficient. Alternatively, they use independent graph library architectures with relational databases, resulting in high system coupling and difficulties in data synchronization. Summary of the Invention

[0004] This application provides a method and system for dynamically constructing a financial data association network through dual-database collaborative processing, thereby improving the efficiency of dynamic construction and querying of financial association networks.

[0005] Firstly, this application provides a method for dynamically constructing a financial data association network for collaborative processing using two databases, which includes: Receive query intent requests and parse them to obtain the target entity identifier, relationship type, and traversal depth; Based on the target entity identifier, relation type, and traversal depth, perform an association topology search in the graph database to obtain a set of association entity identifiers and path topology. The set of associated entity identifiers is used as a batch query condition, and attribute retrieval is performed in a relational database using the batch query condition to obtain the complete attribute data of the entity corresponding to each entity identifier in the set of associated entity identifiers. The path topology and the complete attribute data of the entity are fused based on the entity identifier to output a structured result.

[0006] Optionally, the graph database includes multiple nodes and multiple edges; wherein each node stores only globally unique entity identifiers and does not contain business attribute data; each edge stores relation metadata, which includes relation type, timestamp, and operation semantics.

[0007] Optionally, the step of performing an association topology search in the graph database based on the target entity identifier, relationship type, and traversal depth to obtain the set of association entity identifiers and path topology includes: Using the node corresponding to the target entity identifier as the starting node, the relationship type as the edge filtering condition, and the traversal depth as the maximum hop count limit, a graph query language statement is generated. The graph query language statement is submitted to the graph database, so that the graph database uses the graph query language statement to query entity identifiers and corresponding topological paths that satisfy the edge filtering conditions and maximum hop count limit starting from the starting node, and generates a set of associated entity identifiers and path topology based on the entity identifiers and corresponding topological paths.

[0008] Optionally, the graph database uses the graph query language statement to query entity identifiers and corresponding topological paths that satisfy the edge filtering conditions and maximum hop count limit, starting from the starting node, and returns a set of associated entity identifiers and a path topology based on the entity identifiers and corresponding topological paths, including: Using the entity identifiers stored in the nodes and the relation metadata stored in the multiple edges, a multi-hop association traversal is performed. Each traversal starts from the starting node and expands hop by hop along the edges that satisfy the relation type. The entity identifier sequence of the nodes passed through and the edge relationship between adjacent nodes are recorded to form a path topology. Extract all unique entity identifiers from the path topology as associated entity identifiers, and combine all associated entity identifiers into an associated entity identifier set.

[0009] Optionally, the relational database includes: an entity master table and an associated event log table; The entity master table stores detailed attribute information of each entity. The entity master table uses a globally unique entity identifier as the primary key and includes fields for entity name, entity type, entity status, and valid time range. The association event log table records change events in the association relationship between entities. The association event log table includes fields for event identifier, source entity identifier set, event time, and relationship type.

[0010] Optionally, the step of using the set of associated entity identifiers as batch query conditions and performing attribute retrieval in a relational database using the batch query conditions to obtain the complete entity attribute data corresponding to each entity identifier in the set of associated entity identifiers includes: The IN clause in a Structured Query Language statement is constructed by sequentially using each entity identifier in the set of associated entity identifiers as the query value; the IN clause lists each entity identifier in the set of associated entity identifiers. Generate a complete structured query language statement based on the IN condition clause; The structured query language statement is sent to the relational database to search for all records in the entity master table whose value of the globally unique entity identifier field matches any entity identifier in the IN clause, and all records are used as the complete attribute data of the entity corresponding to each entity identifier in the associated entity identifier set.

[0011] Optionally, the process of fusing the path topology with the complete attribute data of entities based on entity identifiers to output a structured result includes: Based on the entity identifier, the complete attribute data of the entity is matched to the corresponding node of the path topology, and the matched associated paths are sorted according to the path depth to generate a tree-like structured result or a network-like structured result containing the complete association structure and detailed entity attributes, with the paths ordered by depth. The tree-like or network-like structuring results are used as the structuring results and output.

[0012] Optionally, the method for dynamically constructing a financial data association network for dual-database collaborative processing further includes: By monitoring the change logs of the relational database, change events in the relationships between entities can be captured; The change events are parsed in real time and converted into graph database operation instructions; The graph database operation command is executed to synchronize the changes to the graph database, thereby achieving incremental synchronization.

[0013] Optionally, the method for dynamically constructing a financial data association network for dual-database collaborative processing further includes: The relational database and the graph database are fully verified using entity identifier set comparison and hash comparison methods to confirm whether there are any differences between them. When a difference is detected between the relational database and the graph database, the graph database is automatically repaired based on the data in the relational database to ensure data consistency between the two databases.

[0014] Secondly, this application provides a dynamic construction system for a financial data association network that enables collaborative processing of two databases, including: The query parser receives query intent requests and parses them to obtain the target entity identifier, relation type, and traversal depth. A two-stage query scheduler is used to perform an association topology search in the graph database to obtain a set of association entity identifiers and path topology based on the target entity identifier, relationship type and traversal depth, and use the set of association entity identifiers as batch query conditions to perform attribute search in the relational database to obtain complete entity attribute data. The result fusion processor is used to fuse the path topology with the complete attribute data of the entities based on entity identifiers, and output a structured result.

[0015] This application provides a method and system for dynamically constructing financial data association networks through dual-database collaborative processing. The system parses query requests to obtain target entity identifiers, relationship types, and traversal depths; performs association topology retrieval in a graph database to obtain a set of associated entity identifiers and path topology; uses the set of associated entity identifiers as batch query conditions to perform attribute retrieval in a relational database to obtain complete entity attribute data; and merges the path topology and complete entity attribute data to output structured results. This application decouples topology traversal and attribute retrieval, achieving synergy between the transaction capabilities of relational databases and the efficient traversal capabilities of graph databases, thereby improving the efficiency of dynamic construction and querying of financial association networks. Attached Figure Description

[0016] Figure 1 The diagram shown is a flowchart illustrating a method for dynamically constructing a financial data association network through dual-database collaborative processing, as provided in an embodiment of this application. Figure 2 The diagram shown is a flowchart of a complex relationship dynamic query provided in an embodiment of this application; Figure 3 The diagram shown is a detailed flowchart of implementation S1 provided in the embodiment of this application; Figure 4 The diagram shown is a detailed flowchart of implementation S2 provided in the embodiment of this application; Figure 5 The diagram shown is a detailed flowchart of implementation S3 provided in the embodiment of this application; Figure 6 The diagram shown is a detailed flowchart of implementation S4 provided in the embodiment of this application; Figure 7 The diagram shown is an interactive schematic of the dynamic construction system for financial data association networks in dual-database collaborative processing provided in this application embodiment. Detailed Implementation

[0017] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.

[0018] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods may include more or fewer steps than described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.

[0019] Traditional financial systems have long relied on relational databases (such as Oracle, DB2, and PostgreSQL) as their core data foundation. Their mature ACID protection, standardized query interfaces (SQL), and structured data management capabilities offer advantages in ensuring business data consistency and high-concurrency writes. To overcome the performance bottleneck of relational databases when handling complex relational queries, the industry has gradually explored two technical paths. First, using independent graph databases to construct relational networks. For example, patent CN117435754A, "Data Query Method and Device, Storage Medium and Electronic Equipment," proposes a graph operator-based data query method that imports all business entities and their relationships into a graph database, constructs a static relational network, and dynamically generates graph query language statements (such as Cypher) through graph operators, performing multi-hop relational analysis within the graph database. Second, some relational databases are attempting to embed graph query capabilities. For example, patent CN118550931A, "Graph Data Query Method and Apparatus for Relational Databases," proposes a graph data query method for relational databases. This method automatically parses the primary and foreign key constraints of the database schema, identifies tables with primary keys as vertex tables and tables with foreign keys as relation tables, generates structured graph metadata, and dynamically converts graph queries into optimized structured query language (SQL) statements to execute graph queries in relational databases in related technologies.

[0020] However, for independent graph database solutions, such as those represented by patent CN117435754A, the graph database is deeply coupled and exists independently, without involving relational databases. This makes it difficult to adapt to systems based on relational or document-oriented databases. Furthermore, the design, debugging, and optimization of graph operators require the team to simultaneously master business logic, graph query languages ​​(such as Cypher), and permission models, resulting in a high dependence on multi-skilled personnel and a high implementation threshold for small to medium-sized teams. For embedded graph query capabilities solutions, such as those represented by patent CN118550931A, they are mainly adapted to single-hop or shallow graph query scenarios. For complex graph algorithms such as multi-hop traversal, shortest path, and community detection, the converted SQL statements may generate deep joins and Cartesian products, making their execution efficiency difficult to match the native optimization of dedicated graph databases. In addition, when dealing with complex relational tables containing multiple foreign keys, this solution treats each foreign key as an independent relation, which may lead to semantic ambiguity or query logic bloat, constraining the expressive power of the business model.

[0021] In summary, related technologies are limited by the query performance bottleneck of relational databases, resulting in inefficient multi-hop traversal queries. Alternatively, they may use independent graph database architectures with relational databases, leading to high system coupling and difficulties in data synchronization. For example, relational databases suffer from inherent deep decoupling, a strong reliance on graph query languages ​​and specialized personnel, or significant deficiencies in the depth of collaboration within the graph embedding capabilities of relational databases.

[0022] To address the limitations of related technologies, such as query performance bottlenecks in relational databases, low efficiency of multi-hop traversal queries, and high system coupling and data synchronization difficulties due to independent graph database architectures, this application provides a method for dynamically constructing a financial data association network through dual-database collaborative processing. The method involves parsing the query request to obtain the target entity identifier, relationship type, and traversal depth; performing an association topology search in the graph database to obtain a set of associated entity identifiers and path topology; using the set of associated entity identifiers as batch query conditions to perform attribute retrieval in the relational database to obtain complete entity attribute data; and fusing the path topology and complete entity attribute data to output a structured result. Thus, This application decouples topology traversal and attribute retrieval, thereby achieving synergy between the transaction capabilities of relational databases and the efficient traversal capabilities of graph databases, and improving the efficiency of dynamic construction and querying of financial interconnected networks.

[0023] like Figure 1 As shown, this application provides a method for dynamically constructing a financial data association network for dual-database collaborative processing, including the following steps: S1: Receives the query intent request and parses it to obtain the target entity identifier, relationship type, and traversal depth.

[0024] This step receives the query intent request and parses it to obtain the target entity identifier, relationship type, and traversal depth. For example... Figure 2 As shown, a user initiates a query from the application system interface, and the request includes parameters such as the target entity, relationship type, time point, and query depth. The query parser in the dynamic query engine receives and validates the request, standardizing it into an internally processable query task. For example, a typical query request might include the target entity ID, relationship type (such as "transfer to"), valid time point, and maximum traversal depth (such as 10 hops).

[0025] S2: Based on the target entity identifier, relation type, and traversal depth, perform an association topology search in the graph database to obtain the set of association entity identifiers and the path topology.

[0026] This step performs an association topology retrieval in the graph database based on the target entity identifier, relationship type, and traversal depth, obtaining a set of associated entity identifiers and path topology. The query scheduler translates the query intent into a graph query language (such as Cypher) and sends it to the graph database. Leveraging its adjacency storage structure, the graph database efficiently finds the IDs of all associated entities within a specified relationship and depth, starting from the target entity, as well as the path topology between them. For example, the graph database quickly returns ID sequences and merge relationships such as G -> F, C -> D, E, A, B. The graph database focuses on characterizing and storing the relationships between entities. Nodes in the graph contain only the minimum identifying information of the entity (i.e., the entity's unique ID), while edges define relationship types (such as "belongs to," "transfers to," "controls," "associates," etc.), and edge attributes can further describe dimensions such as the strength, direction, time, and frequency of the relationship. This adjacency storage structure makes multi-hop association queries significantly more performant than traditional table joins.

[0027] S3: Use the set of associated entity identifiers as batch query conditions, and use the batch query conditions to perform attribute retrieval in the relational database to obtain the complete attribute data of the entity corresponding to each entity identifier in the set of associated entity identifiers.

[0028] This step uses the set of associated entity identifiers as batch query conditions and performs attribute retrieval in the relational database using these conditions to obtain the complete attribute data of each entity identifier in the set. The engine uses the set of all entity IDs obtained in the first stage as batch query conditions to generate an efficient SQL query statement and sends it to the relational database. Leveraging its B+ tree index and other advantages, the relational database quickly returns the complete attribute information of the entities corresponding to these IDs (such as organization name, registration information, financial statements, etc.). The relational database acts as an "entity detail database," responsible for storing detailed attribute information of all entities. Each entity is marked with a globally unique identifier to ensure its uniqueness within the system. These entities can be financial institutions, personal accounts, trading counterparties, financial products, etc., and their rich static or dynamic attributes (such as name, type, status, amount, timestamp, etc.) are efficiently organized in a standardized table structure.

[0029] S4: Merge the path topology with the complete attribute data of entities based on entity identifiers and output a structured result.

[0030] This step merges the path topology with the complete entity attribute data based on entity identifiers, outputting a structured result. The result merging unit intelligently combines the two results. It matches the detailed data returned by the relational database to the corresponding nodes in the path topology returned by the graph database according to the ID, ultimately forming a tree-like or network-like structured result (such as JSON) containing complete association structure and entity details, which is returned to the user via API.

[0031] In one specific embodiment of this application, the application further defines the specific storage structure of the graph database, which includes multiple nodes and multiple edges; wherein, each node is a node that only stores globally unique entity identifiers and does not contain business attribute data; each edge stores relation metadata, which includes relation type, timestamp and operation semantics.

[0032] This application limits graph database nodes to those that only store globally unique entity identifiers and do not contain business attribute data. The graph database nodes in this application adopt a lightweight storage structure, with node data containing only globally unique entity IDs (fixed at 8 bytes), completely stripping away business attributes. This design significantly reduces I / O load and memory overhead during graph traversal, and improves cache hit rate and edge traversal efficiency.

[0033] This application specifies that each edge stores relation metadata, including relation type, timestamp, and operation semantics. Each edge not only defines the relation type (such as "reorganization", "loan renewal", "merge", etc.), but also stores a timestamp (for time-series filtering) and operation semantics (such as valid version, merge semantics, etc.). Simultaneously, a composite index is established for relation type and timestamp, effectively supporting path filtering based on relation semantics and time-series constraints, providing efficient underlying support for a two-stage query strategy.

[0034] In one specific embodiment of this application, the specific implementation steps of association topology retrieval are further described, such as... Figure 3 As shown, based on the target entity identifier, relation type, and traversal depth, an association topology search is performed in the graph database to obtain the set of association entity identifiers and the path topology, including: S11: Using the node corresponding to the target entity identifier as the starting node, the relationship type as the edge filtering condition, and the traversal depth as the maximum hop count limit, generate a graph query language statement. This step uses the node corresponding to the target entity identifier as the starting node, the relationship type as the edge filtering condition, and the traversal depth as the maximum hop limit to generate a graph query language statement. For example, in the scenario of tracing the evolution chain of a loan, the target entity is the current loan, the relationship type is "reorganized from" or "renewed from", and the traversal depth is set to 10 hops. The system automatically generates a Cypher query statement, limiting the starting node, relationship type, and maximum depth.

[0035] S12, submit the graph query language statement to the graph database so that the graph database can use the query statement to start from the starting node, query the entity identifiers and corresponding topological paths that satisfy the edge filtering conditions and the maximum number of hops limit, and generate a set of associated entity identifiers and path topology based on the entity identifiers and the corresponding topological paths.

[0036] This step submits the graph query language statement to the graph database, enabling the graph database to use the query statement to retrieve entity identifiers and topological paths that satisfy the edge filtering conditions and maximum hop count limit, starting from the initial node. Based on these, it generates a set of associated entity identifiers and path topology. After receiving the Cypher statement, the graph database, based on its native graph storage engine, expands along the edges in O(1) complexity, quickly returning a set of all paths and node IDs that meet the conditions.

[0037] In one specific embodiment of this application, the internal execution process of the graph database is further refined, such as... Figure 4 As shown, the graph database uses a query statement starting from the initial node to retrieve entity identifiers and corresponding topological paths that satisfy edge filtering conditions and maximum hop count limits. Based on the entity identifiers and their corresponding topological paths, it returns a set of associated entity identifiers and a path topology, including: S21. Using the entity identifiers stored in the nodes and the relation metadata stored in the multiple edges, perform a multi-hop association traversal. Each traversal starts from the starting node and expands hop by hop along the edges that satisfy the relation type. Record the sequence of entity identifiers of the nodes passed through and the edge relationships between adjacent nodes to form a path topology. This step utilizes entity identifiers in nodes and relation metadata in edges to perform multi-hop association traversal. Each traversal starts from the initial node and expands hop-by-hop along edges that satisfy the relation type, recording the sequence of entity identifiers of the nodes passed through and the edge relationships between adjacent nodes (such as direction and timestamp), thus forming the path topology. Since nodes only store IDs and edges store relation types and timestamps, no business attributes need to be loaded during the traversal, greatly improving traversal speed.

[0038] S22, extract all unique entity identifiers from the path topology as associated entity identifiers, and form an associated entity identifier set from all associated entity identifiers.

[0039] This step extracts all unique entity identifiers from the path topology, forming a set of associated entity identifiers. This set is used in the second stage for batch attribute retrieval in the relational database. This decouples topology traversal from attribute retrieval.

[0040] In one specific embodiment of this application, the relational database includes: an entity master table and an association event log table; wherein, the entity master table is used to store detailed attribute information of each entity, the entity master table uses a globally unique entity identifier as the primary key, and includes fields for entity name, entity type, entity status, and valid time range; the association event log table is used to record change events in the association relationship between entities, and the association event log table includes fields for event identifier, source entity identifier set, event time, and relationship type.

[0041] This application defines the structure of the entity master table. The relational database uses a normalized table structure to store detailed attribute information of entities such as financial institutions, personal accounts, and counterparties. The entity master table uses a globally unique ID as the primary key and also includes fields such as name, type, status, and valid time range (valid_from / valid_to), supporting ACID transactions and complex condition queries. Furthermore, this application defines the structure of the relational event log table. This table records change events in the relationships between entities. For example, the table structure may include event_id (primary key), source_ids (a collection of source entities stored in JSONB format), event_time (event time), and relation_type (relationship type). This table provides the change data source for the synchronization engine, supporting incremental synchronization and full verification.

[0042] In one specific embodiment of this application, such as Figure 5 As shown, to further illustrate the specific implementation of attribute retrieval, the set of associated entity identifiers is used as a batch query condition, and attribute retrieval is performed in a relational database using the batch query condition to obtain the complete entity attribute data corresponding to each entity identifier in the set of associated entity identifiers, including: S31, take each entity identifier in the set of associated entity identifiers as the query value in turn, and construct the IN condition clause in the structured query language statement; the IN condition clause lists each entity identifier in the set of associated entity identifiers; refer to Figure 2 This step uses each ID in the associated entity identifier set as the query value to construct the IN clause in the SQL. For example, if the first stage returns [ID1, ID2, ID3], then "WHERE entity_id IN (ID1,ID2, ID3)" is generated.

[0043] S32, Generate a complete structured query language statement based on the IN condition clause; refer to Figure 2 This step generates a complete Structured Query Language (SCL) statement based on the IN clause, such as "SELECT * FROM entity_master WHERE entity_id IN (ID1, ID2, ID3)". This statement performs a search on the entity master table.

[0044] S33. Send a Structured Query Language statement to the relational database so that it can find all records in the entity master table whose value of the globally unique entity identifier field matches any entity identifier in the IN clause, and treat all records as the complete attribute data of the entity corresponding to each entity identifier in the associated entity identifier set.

[0045] This step sends the SQL statement to the relational database. The relational database uses a B+ tree index to quickly locate the corresponding record and returns the complete attribute data of all matching records. This avoids the network overhead of multiple single-row queries and achieves efficient batch retrieval.

[0046] In one specific embodiment of this application, a specific method for result fusion and output is described, such as... Figure 6 As shown, the path topology and complete entity attribute data are fused based on entity identifiers to output structured results, including: S41, based on the entity identifier, match the complete attribute data of the entity to the corresponding node of the path topology, and sort the matched associated paths according to the path depth to generate a tree-like structured result or a network-like structured result containing the complete associated structure and detailed entity attributes, with the paths ordered by depth. This step matches the complete attribute data of an entity to the corresponding node in the path topology based on the entity identifier, and sorts the matched associated paths according to path depth, generating a tree-like or network-like structured result containing the complete association structure and detailed entity attributes, with the paths ordered by depth. For example, if a relational database returns detailed attributes (name, type, etc.) for ID1, the result merging unit attaches these attributes to the node corresponding to ID1 in the path topology; then, according to the number of hops from the starting node, the 1-hop path comes first, the 2-hop path comes second, and so on, making it easier for users to understand the association relationships hierarchically.

[0047] S42 takes the tree-like or network-like structured result as the structured result and outputs it.

[0048] This step outputs the tree-structured or network-structured results as the structured output. The final generated JSON format result can be directly used by upper-layer applications (such as risk control systems and anti-fraud systems).

[0049] In one specific embodiment of this application, a data synchronization mechanism is also provided. The method for dynamically constructing a financial data association network for dual-database collaborative processing in this application further includes: By monitoring the change logs of a relational database, change events in the relationships between entities can be captured. refer to Figure 2 This step involves monitoring the change logs of relational databases (such as PostgreSQL's WAL logs and MySQL's Binlog) and using components like Debezium CDC to capture change events (such as inserts, updates, and deletions) in the relationships between entities. End-to-end latency can be controlled to within 200ms.

[0050] The change events are parsed and converted into graph database operation commands in real time; This step involves real-time parsing of captured change events and converting them into graph database operation commands (such as Neo4j's CREATE, UPDATE, and DELETE statements). For example, if a new record "IOU A reorganized into IOU B" is added in a relational database, the synchronization engine will generate a command to create an edge "A - [reorganized into] -> B" in the graph database.

[0051] Execute graph database operation commands to synchronize changes to the graph database, thereby achieving incremental synchronization.

[0052] This step executes graph database operation commands, synchronizing changes to the graph database to achieve incremental synchronization. This mechanism ensures near real-time consistency between relational database writes and graph database updates, avoiding the latency issues of traditional ETL solutions.

[0053] In one specific embodiment of this application, a full verification and repair mechanism is further added. The method for dynamically constructing a financial data association network through dual-database collaborative processing in this application also includes: The entity identifier set comparison method and the hash comparison method are used to perform full data verification on relational databases and graph databases to confirm whether there are any differences between them. This step employs entity identifier set comparison and hash comparison to perform full data verification on the relational database and graph database to confirm whether there are any discrepancies. Full data verification is performed via a scheduled task (e.g., scheduled daily at 02:00). The verification uses two methods: first, entity identifier set comparison, checking if the node IDs in the two databases are consistent; second, hash comparison, comparing entity attributes or relationships after hash calculation to ensure content consistency.

[0054] When a difference is detected between the relational database and the graph database, the graph database is automatically repaired based on the data in the relational database to ensure data consistency between the two databases.

[0055] This step automatically repairs the graph database based on the data in the relational database when discrepancies are detected, ensuring data consistency between the two databases. For example, if a node or edge is missing from the graph database, the data in the relational database will be used as the reference, and a repair instruction will be automatically generated and executed.

[0056] like Figure 7 As shown, this application provides a dynamic construction system for a financial data association network involving dual-database collaborative processing, comprising: The query parser receives query intent requests and parses them to obtain the target entity identifier, relation type, and traversal depth. refer to Figure 7 The dynamic query engine includes a query parser, which receives user requests, identifies parameters such as target entity, relation type, time window, and traversal depth, and performs standardization processing.

[0057] A two-stage query scheduler is used to perform association topology retrieval in a graph database to obtain a set of association entity identifiers and path topology based on the target entity identifier, relation type and traversal depth, and then use the set of association entity identifiers as batch query conditions to perform attribute retrieval in a relational database to obtain complete entity attribute data. refer to Figure 7 This section describes the two-stage query scheduler. Also located within the dynamic query engine, it is responsible for breaking down complex queries into two stages: Stage 1 generates graph query language statements (such as Cypher), performs relational topology traversal in the graph database, and returns a set of structured entity IDs; Stage 2 generates parameterized SQL based on the ID set to retrieve entity details in batches from the relational database.

[0058] The result fusion unit is used to fuse path topology with complete entity attribute data based on entity identifiers, and output structured results.

[0059] This section is the results merging unit. The results merging unit sorts the results by path depth and relational metadata, intelligently concatenates the results from the two stages, and outputs tree-like or network-like structured results (supporting JSON / XML formats).

[0060] The above description is merely a preferred embodiment of this application and is not intended to limit this application. For those skilled in the art, various improvements and modifications can be made without departing from the spirit and principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application. The above description is merely a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of protection of this specification.

[0061] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Without further limitation, an element qualified by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

Claims

1. A method for dynamically constructing a financial data association network for dual-database collaborative processing, characterized in that, include: Receive query intent requests and parse them to obtain the target entity identifier, relationship type, and traversal depth; Based on the target entity identifier, relation type, and traversal depth, perform an association topology search in the graph database to obtain a set of association entity identifiers and path topology. The set of associated entity identifiers is used as a batch query condition, and attribute retrieval is performed in a relational database using the batch query condition to obtain the complete attribute data of the entity corresponding to each entity identifier in the set of associated entity identifiers. The path topology and the complete attribute data of the entity are fused based on the entity identifier to output a structured result.

2. The method for dynamically constructing a financial data association network for dual-database collaborative processing according to claim 1, characterized in that, The graph database includes multiple nodes and multiple edges; each node stores only globally unique entity identifiers and does not contain business attribute data; each edge stores relation metadata, which includes relation type, timestamp, and operation semantics.

3. The method for dynamically constructing a financial data association network for dual-database collaborative processing according to claim 2, characterized in that, The step of performing an association topology search in the graph database based on the target entity identifier, relationship type, and traversal depth to obtain the set of association entity identifiers and path topology includes: Using the node corresponding to the target entity identifier as the starting node, the relationship type as the edge filtering condition, and the traversal depth as the maximum hop count limit, a graph query language statement is generated. The graph query language statement is submitted to the graph database, so that the graph database uses the graph query language statement to query entity identifiers and corresponding topological paths that satisfy the edge filtering conditions and maximum hop count limit starting from the starting node, and generates a set of associated entity identifiers and path topology based on the entity identifiers and corresponding topological paths.

4. The method for dynamically constructing a financial data association network for dual-database collaborative processing according to claim 3, characterized in that, The graph database uses the graph query language to query entity identifiers and corresponding topological paths that satisfy the edge filtering conditions and maximum hop count limit, starting from the starting node. Based on the entity identifiers and corresponding topological paths, it returns a set of associated entity identifiers and a path topology, including: Using the entity identifiers stored in the nodes and the relation metadata stored in the multiple edges, a multi-hop association traversal is performed. Each traversal starts from the starting node and expands hop by hop along the edges that satisfy the relation type. The entity identifier sequence of the nodes passed through and the edge relationship between adjacent nodes are recorded to form a path topology. Extract all unique entity identifiers from the path topology as associated entity identifiers, and combine all associated entity identifiers into an associated entity identifier set.

5. The method for dynamically constructing a financial data association network for dual-database collaborative processing according to claim 1, characterized in that, The relational database includes: an entity master table and an associated event log table; The entity master table stores detailed attribute information of each entity. The entity master table uses a globally unique entity identifier as the primary key and includes fields for entity name, entity type, entity status, and valid time range. The association event log table records change events in the association relationship between entities. The association event log table includes fields for event identifier, source entity identifier set, event time, and relationship type.

6. The method for dynamically constructing a financial data association network for dual-database collaborative processing according to claim 5, characterized in that, The step of using the set of associated entity identifiers as batch query conditions and performing attribute retrieval in a relational database using the batch query conditions to obtain the complete entity attribute data corresponding to each entity identifier in the set of associated entity identifiers includes: The IN clause in a Structured Query Language statement is constructed by sequentially using each entity identifier in the set of associated entity identifiers as the query value; the IN clause lists each entity identifier in the set of associated entity identifiers. Generate a complete structured query language statement based on the IN condition clause; The structured query language statement is sent to the relational database to search for all records in the entity master table whose value of the globally unique entity identifier field matches any entity identifier in the IN clause, and all records are used as the complete attribute data of the entity corresponding to each entity identifier in the associated entity identifier set.

7. The method for dynamically constructing a financial data association network for dual-database collaborative processing according to claim 1, characterized in that, The process of fusing the path topology with the complete attribute data of the entity based on the entity identifier to output a structured result includes: Based on the entity identifier, the complete attribute data of the entity is matched to the corresponding node of the path topology, and the matched associated paths are sorted according to the path depth to generate a tree-like structured result or a network-like structured result containing the complete association structure and detailed entity attributes, with the paths ordered by depth. The tree-like or network-like structuring results are used as the structuring results and output.

8. The method for dynamically constructing a financial data association network for dual-database collaborative processing according to claim 1, characterized in that, The method for dynamically constructing a financial data association network through dual-database collaborative processing also includes: By monitoring the change logs of the relational database, change events in the relationships between entities can be captured; The change events are parsed in real time and converted into graph database operation instructions; The graph database operation command is executed to synchronize the changes to the graph database, thereby achieving incremental synchronization.

9. The method for dynamically constructing a financial data association network for dual-database collaborative processing according to claim 8, characterized in that, The method for dynamically constructing a financial data association network through dual-database collaborative processing also includes: The relational database and the graph database are fully verified using entity identifier set comparison and hash comparison methods to confirm whether there are any differences between them. When a difference is detected between the relational database and the graph database, the graph database is automatically repaired based on the data in the relational database to ensure data consistency between the two databases.

10. A dynamic construction system for a financial data association network involving dual databases, characterized in that: include: The query parser receives query intent requests and parses them to obtain the target entity identifier, relation type, and traversal depth. A two-stage query scheduler is used to perform an association topology search in a graph database to obtain a set of association entity identifiers and path topology based on the target entity identifier, relationship type and traversal depth, and to perform an attribute search in a relational database using the set of association entity identifiers as batch query conditions to obtain complete entity attribute data. The result fusion processor is used to fuse the path topology with the complete attribute data of the entities based on entity identifiers, and output a structured result.