A financial accounting bottom-layer architecture decoupled from legal accounting and multi-dimensional management tags
Patent Information
- Application Number
- CN202611026500.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-10
- Publication Date
- 2026-11-03
AI Technical Summary
The existing financial system suffers from problems such as lock conflicts, data bloat, high expansion costs, weak real-time query capabilities, insufficient data capacity for large groups, and lack of multi-currency consolidated accounting due to the coupled storage of accounting and dimensions.
It adopts a four-layer physical isolation hierarchical storage architecture to achieve complete decoupling of accounting and dimensional data, and introduces distributed sharding, multi-currency conversion and group offset modules to form an integrated collaborative system that provides independent transactions and comprehensive isolation.
Significantly improves concurrency performance, reduces lock wait time, reduces data redundancy, supports online dimensional expansion, improves compliance, and is suitable for large groups and multinational multi-currency accounting scenarios.
Smart Images

Figure CN123030679A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of hierarchical storage technology for relational databases such as MySQL 8.0, PostgreSQL 12+, and domestic databases like DM and Kingbase, specifically to a decoupled financial accounting underlying architecture, which is particularly suitable for multi-dimensional accounting scenarios in AI financial and tax systems and distributed multi-group integrated business and finance platforms. Background Technology
[0002] Currently, mainstream financial systems generally adopt a co-located storage architecture for accounting and dimensions, which is mainly divided into traditional auxiliary accounting architecture and JSON dynamic dimension architecture. Both have inherent underlying technical defects, and the industry has long held a technical bias that "accounting and dimensions must be stored in the same table and massive amounts of vouchers rely on offline summary wide tables".
[0003] Traditional auxiliary accounting architecture attaches dimension fields to journal entries. Adding a new dimension generates a large number of redundant journal entries, leading to row explosion and high database storage pressure. Adding or modifying the dimension structure requires performing DDL table modification operations that require downtime, resulting in extremely high maintenance costs. Furthermore, accounting and dimensions share the same transaction, and frequent dimension modifications lock accounting entries, leading to severe lock blocking and high task failure rates in high-concurrency AI batch certificate production scenarios.
[0004] While the JSON dynamic dimension architecture solves the problem of fixed dimension expansion, JSON text lacks fixed structured fields, making it impossible to create effective indexes. Multidimensional report queries require full table scans, and AI real-time Q&A and risk control analysis suffer from extremely high latency. At the same time, dimension updates lock the entire entry record, further exacerbating concurrency conflicts. Moreover, accounting data contains redundant dimension information, requiring secondary cleaning for tax reporting and auditing, resulting in poor compliance.
[0005] The existing next-generation architectures of commercial ERP systems such as Kingdee and Yonyou only achieve partial decoupling and optimization. They lack native distributed sharding, multi-currency underlying conversion, and internal group offsetting mechanisms, making them unable to handle massive voucher data of hundreds of billions of legal entities. Their adaptability to large-scale group consolidated accounting and multinational multi-currency business scenarios is severely insufficient.
[0006] When common database technologies such as table partitioning and sharding are directly applied to AI-driven financial and tax scenarios, they have unique industry-specific adaptation defects. They cannot meet the requirements of accounting standards for the clean isolation of legally mandated accounting data, the balancing of double-entry book balances, automatic allocation of multiple currencies, offsetting of intra-group transactions, and full-chain compliance constraints for taxation and listing audits. General technical solutions lack dedicated isolation, verification, and traceability mechanisms, and their direct application can lead to specific problems such as entry data pollution, accounting errors, concurrent lock conflicts, and non-compliance. Summary of the Invention
[0007] The purpose of this invention is to overcome the technical defects of existing technologies, such as conflicts in accounting dimension coupling locks, bloated journal entries, high cost of dimension expansion, weak real-time query capabilities, insufficient distributed support for large groups, and lack of multi-currency consolidated accounting, and to provide a financial accounting underlying architecture that decouples statutory accounting from multi-dimensional management labels.
[0008] To achieve the above objectives, this invention adopts a four-layer physically isolated hierarchical storage architecture to achieve complete decoupling of accounting data and dimensional data and independent transactions; at the same time, it adds distributed sharding, multi-currency conversion, and group offset extension modules to make up for the shortcomings of large groups in adapting to all scenarios, and takes into account the needs of lightweight deployment for small and micro enterprises and distributed cluster deployment for large groups.
[0009] This invention is not a simple stacking of known technologies. The modules form an integrated and synergistic coupling system: a four-layer physical isolation storage layer achieves comprehensive isolation of accounting and dimensional data, transactions, and read / write channels, solving compliance and lock conflict issues from the bottom up; a two-level distributed sharding architecture adapts to the massive data storage of multiple legal entities within a group; and a multi-currency conversion and group offsetting module compensates for the shortcomings of general databases that lack dedicated financial and tax business logic. The various technical features constrain each other and work together to enhance efficiency. No single known technology can achieve the comprehensive performance improvement and compliance adaptation effect of this invention, resulting in unexpected technical effects.
[0010] Currently, mainstream commercial ERP systems can only achieve partial decoupling, and do not integrate a complete set of integrated capabilities such as four-layer physical isolation architecture, dual-channel read-write separation, two-level distributed sharding, multi-currency underlying conversion, and group offsetting snapshots. This has long been a technological gap in the industry and is not a conventional technological transformation method in this field.
[0011] The beneficial technical effects of this invention are as follows: 1. Significantly improved concurrency performance: Dimensional operations operate independently without locking accounting entries, reducing concurrent lock waiting by 94.9%, perfectly adapting to high-concurrency scenarios such as AI batch certificate production and RPA automatic accounting; 2. Eliminate data redundancy and expansion: Journal entries are bound one-to-one with tag packages, eliminating the need for additional redundant journal entry rows and reducing database storage capacity by more than 60%; 3. Seamless expansion capabilities: Supports online, uninterrupted dimension addition and archiving; distributed clusters can be dynamically expanded to adapt to the continuous iteration needs of AI financial and tax models. 4. Significantly improved compliance: The legal accounting data is clean, and no secondary data cleaning is required for tax filing and auditing. The dual-channel isolation prevents operational data from interfering with compliant accounting. 5. Full-scenario adaptation coverage: Natively supports single micro and small enterprises, medium and large enterprises, multi-legal entity groups with hundreds of billions of yuan, and multi-currency cross-border accounting, completely making up for the shortcomings of traditional architecture in adapting to large-scale scenarios. Attached Figure Description
[0012] Figure 1 This is a topology diagram of the four-layer hierarchical architecture of the present invention; 1-legal measurement storage layer, 2-tag mapping storage layer, 3-dimensional metadata management layer, 4-index calculation acceleration layer; the overall architecture realizes physical isolation, independent transactions, and distributed sharding collaborative linkage.
[0013] Figure 2 This is a schematic diagram of the one-to-one binding relationship between the statutory accounting layer and the tag mapping layer of this invention; 1-gl_entry entry table, 2-tag_bundle tag packaging table, 3-one-to-one association primary key; achieving non-redundant binding and completely eliminating the problem of entry line explosion.
[0014] Figure 3 This is a schematic diagram of the dual data reading channel adaptation of the present invention; 1-standard compliance reading channel, 2-multidimensional analysis reading channel; the two channels are physically isolated and adapted to specific scenarios of compliance audit and business analysis respectively. Detailed Implementation
[0015] Test environment description: Server CPU 32 cores, memory 128G; Database MySQL 8.0 / DaMeng 8; Test data 10 million vouchers; Concurrent threads 500; Accounting period 12 months; The benchmark is the mainstream ERP coupled architecture on the market; All test data are the average of multiple repeated tests.
[0016] This embodiment provides a decoupled financial accounting underlying architecture that is adaptable to all scenarios. The specific implementation steps are as follows: 1. Establish a four-layer physical isolation infrastructure: Create an independent `gl_entry` legal entry table, retaining only the standard accounting fields from accounting standards, and setting read-only permissions at the table level to prevent dimension data write pollution; create an independent `tag_bundle` tag bundling table, binding it one-to-one with the entry table via the `entry_id` primary key, using READ COMMITTED independent transactions, so dimension modifications only operate on the tag table and do not trigger accounting row locks. Build `dim_meta` and `dim_item` metadata tables to enable online dimension configuration and DDL-free expansion; asynchronously update high-frequency dimension indexes via message queues to achieve fast multidimensional data retrieval.
[0017] 2. Configure dual read-write isolation channels: differentiate between the compliant tax filing channel and the business analysis channel. Tax filing, auditing, and voucher printing operations only read legal accounting data to ensure data compliance and consistency; AI business analysis, dimension allocation adjustment, and custom report operations read tag data and index data to achieve flexible multi-dimensional analysis.
[0018] 3. Distributed Sharding Implementation: A two-level sharding routing system is set up. The first-level sharding distinguishes different legal entities and subsidiaries based on the account set ID, achieving physical isolation of data across multiple organizations. The second-level sharding is based on accounting month and year, reusing in-memory sharding aggregation logic to avoid cross-period data interference. Cross-sharding transactions adopt the Seata AT lightweight solution to ensure eventual consistency of accounting data and adapt to the storage of billions of vouchers.
[0019] 4. Multi-currency and group offset optimization: The binary tag package reserves currency and exchange rate fields, caches real-time exchange rate data in memory, and realizes automatic currency conversion of allocated amounts; builds an independent group offset snapshot library, reuses the audit snapshot mechanism, and fully retains internal transaction offset entries and dimension change records to support the traceability audit of group consolidated financial statements. The table below shows a quantitative performance comparison of the present invention with that of the traditional coupled architecture in multiple scenarios:
[0020] Test Scenario Traditional coupled architecture This invention features a four-layer decoupled + distributed architecture. Concurrent certificate creation lock waiting time 1280ms 65ms Dimensional Expansion and Transformation Methods Stop DDL table modification Online configuration without downtime Massive data carrying capacity The cap is in the tens of millions. A billion-level distributed system without pressure Multi-currency consolidated accounting Requires secondary development at the upper level Underlying native automatic conversion
Claims
1. A financial accounting underlying architecture that decouples statutory accounting from multi-dimensional management labels, comprising a traditional financial system accounting dimension coupled storage structure, characterized in that, Configure a four-layer physically isolated data storage layer and a distributed expansion module: The statutory measurement storage layer is configured with an independent journal entry data table. The journal entry data table only stores the standard accounting fields stipulated by accounting standards and does not contain any business dimension extended fields. It provides a read-only compliant accounting query interface to the outside world, ensuring that tax and audit data are pure and without redundancy. The tag mapping storage layer has an independently configured tag packaging data table. The tag packaging data table is associated one-to-one with the entry data table through a unique entry primary key entry_id. All dimension data addition, deletion, modification, and allocation adjustment operations are performed independently in this layer and do not write to or lock the legal measurement storage layer accounting data. The dimension metadata management layer configures the dimension metadata table and dimension archive table to uniformly store dimension definitions, hierarchical structure, allocation rules and activation status. It supports dynamic registration, addition and archiving of dimensions without modifying the business data table structure. The index calculation acceleration layer includes an asynchronous indexing submodule and a real-time aggregation calculation submodule. The asynchronous indexing submodule builds incremental indexes for high-frequency dimensions such as customers, suppliers, departments, and projects. The real-time aggregation calculation submodule performs real-time aggregation and verification of accounting and dimension data across layers. The distributed full-scenario extension module is configured with two-level sharding routing rules. The first-level sharding distinguishes legal entities by account set ID, and the second-level sharding isolates data by accounting year and month. Combined with Seata's lightweight distributed transactions, multi-currency real-time exchange rate conversion operators, and the group's internal transaction offsetting snapshot library, it enables the distributed carrying of massive data and the group's consolidated accounting.
2. The architecture according to claim 1, characterized in that: The statutory measurement storage layer and the tag mapping storage layer adopt the READ COMMITTED independent database transaction isolation mechanism. Dimension data update operations do not trigger row locks on the entry data table, and cross-shard data adopts the Seata AT eventual consistency mechanism to ensure data integrity.
3. The architecture according to claim 1, characterized in that: Each entry record in the data table uniquely corresponds to one tag package data table record, completely eliminating the problem of entry line bloat caused by multi-dimensional mounting. In multi-currency scenarios, the tag package has a built-in currency field, supporting automatic exchange rate conversion and dimension allocation conversion at the underlying level.
4. The architecture according to claim 1, characterized in that: The system is configured with dual physically isolated read and write channels. Standard tax filing and audit verification operations only access the statutory measurement storage layer, while multidimensional business analysis and dimension adjustment operations only access the tag mapping storage layer and the index calculation acceleration layer.
5. The architecture according to claim 1, characterized in that: The dimension metadata management layer supports online, uninterrupted dimension expansion, and the distributed expansion module supports dynamic expansion of cluster nodes without interrupting system services.
