Transaction information accounting method and device based on distributed system, equipment and medium

By using HBase database and Hive to store and transpose transaction information calculation data in HDFS, the problem of low efficiency in the transaction information calculation process is solved, and efficient data writing and flexible querying are achieved.

CN116450659BActive Publication Date: 2026-06-05AGRICULTURAL BANK OF CHINA

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
AGRICULTURAL BANK OF CHINA
Filing Date
2023-03-01
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In existing technologies, the database storage overhead is large and data writing is slow during the transaction information calculation process, resulting in low calculation efficiency.

Method used

HBase database is used for detailed accounting. The accounting information table is stored in HDFS through Hive and then transformed. HDFS is used to extract user detailed account ledgers and transaction information to calculate accounting entries and update the enterprise general ledger information.

Benefits of technology

It improves the writing capability and query efficiency of transaction information accounting, reduces database storage overhead, and enhances the query flexibility of detailed accounting information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116450659B_ABST
    Figure CN116450659B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on distributed system's transaction information accounting method, comprising: by Hbase database, obtain the transaction information to be handled of current accounting period, and carry out detailed accounting to the transaction information to be handled, determine the accounting result information of current accounting period;By Hbase database, according to the accounting result information of current accounting period and the accounting result information of last accounting period stored in Hbase database, determine the accounting information table of current accounting period;According to the accounting information table of current accounting period, determine the accounting external table of HBase database by Hive, and store detailed accounting external table in HDFS;By HDFS, carry out transcolumn processing to accounting external table, to convert accounting external table into column storage internal table, and extract user detailed household account and transaction information accounting entry from column storage internal table;By HDFS, update enterprise general ledger information according to user detailed household account and transaction information accounting entry. Improve the accounting efficiency of transaction information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computers, and in particular to a method, apparatus, device and medium for calculating transaction information based on a distributed system. Background Technology

[0002] Currently, transaction information acquisition and verification are handled through a single system. Information acquisition is handled by the users conducting the transactions, while verification is handled by the enterprise's internal management. As the rules governing transaction verification become increasingly complex, the computational burden on the system grows, leading to excessive database storage overhead, slow data writing, and low efficiency in transaction verification. Therefore, improving data writing efficiency and overall transaction verification efficiency are problems that need to be addressed. Summary of the Invention

[0003] This invention provides a transaction information accounting method, apparatus, device, and medium based on a distributed system, which can improve the ability to write detailed accounting results, improve the accounting efficiency of transaction information, reduce database storage overhead, and improve the flexibility of querying detailed accounting information.

[0004] According to one aspect of the present invention, a transaction information accounting method based on a distributed system is provided, comprising:

[0005] The system retrieves pending transaction information for the current accounting period from the HBase database, performs detailed accounting on the pending transaction information, and determines the accounting result information for the current accounting period.

[0006] Using the HBase database, the accounting information table for the current accounting period is determined based on the accounting result information for the current accounting period and the accounting result information for the previous accounting period stored in the HBase database.

[0007] Using Hive, the HBase database's external accounting table is determined based on the accounting information table for the current accounting cycle, and the detailed accounting external table is stored in HDFS according to the storage format and storage path specified by the external accounting table.

[0008] The external accounting table is transformed into a columnar storage internal table using HDFS, and user detailed account ledgers and transaction information accounting entries are extracted from the columnar storage internal table.

[0009] The enterprise general ledger information is updated by calculating journal entries based on the user's detailed account ledger and the transaction information using HDFS.

[0010] According to another aspect of the present invention, a transaction information accounting device based on a distributed system is provided, the device comprising:

[0011] The accounting result information determination module is used to obtain the pending transaction information of the current accounting period through the HBase database, perform detailed accounting on the pending transaction information, and determine the accounting result information of the current accounting period.

[0012] The accounting information table determination module is used to determine the accounting information table for the current accounting period by using the HBase database, based on the accounting result information of the current accounting period and the accounting result information of the previous accounting period stored in the HBase database.

[0013] The external accounting table storage module is used to determine the external accounting table of the HBase database through Hive based on the accounting information table of the current accounting cycle, and store the detailed external accounting table in HDFS according to the storage format and storage path specified by the external accounting table.

[0014] The columnar storage table processing module is used to perform columnar processing on the external accounting table through HDFS to convert the external accounting table into a columnar storage internal table, and extract user detailed account ledgers and transaction information accounting entries from the columnar storage internal table;

[0015] The enterprise general ledger information update module is used to update the enterprise general ledger information by calculating journal entries based on the user detailed account ledger and the transaction information through HDFS.

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

[0017] At least one processor; and

[0018] A memory communicatively connected to the at least one processor; wherein,

[0019] The memory stores a computer program that can be executed by the at least one processor, which is then executed by the at least one processor to enable the at least one processor to perform the transaction information calculation method based on a distributed system as described in any embodiment of the present invention.

[0020] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions, the computer instructions being configured to cause a processor to execute and implement the transaction information calculation method based on a distributed system as described in any embodiment of the present invention.

[0021] The technical solution of this invention involves obtaining pending transaction information for the current accounting period from the HBase database, performing detailed accounting on the pending transaction information, and determining the accounting result information for the current accounting period. Using the HBase database, based on the accounting result information for the current accounting period and the accounting result information for the previous accounting period stored in the HBase database, an accounting information table for the current accounting period is determined. Using Hive, an external accounting table for the HBase database is determined based on the accounting information table for the current accounting period, and the detailed accounting external table is stored in HDFS according to the specified storage format and path. HDFS is used to perform columnar transformation on the external accounting table, converting it into a columnar storage internal table, and extracting user detailed account ledgers and transaction information accounting entries from the columnar storage internal table. HDFS is then used to update the enterprise general ledger information based on the user detailed account ledgers and transaction information accounting entries. This solution addresses the problem of low efficiency in writing data to the database during the transaction information accounting process, which leads to low efficiency in transaction information accounting. Using HBase as the database engine for transaction information accounting improves the ability to write detailed accounting results. Simultaneously, converting the external accounting table corresponding to the accounting information table for the current accounting period into columnar storage in HDFS improves the efficiency of subsequent queries on detailed accounting information, reduces database storage overhead, and enhances the flexibility of querying detailed accounting information.

[0022] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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.

[0024] Figure 1 A flowchart of a transaction information calculation method based on a distributed system provided in Embodiment 1 of the present invention;

[0025] Figure 2 This is a flowchart of a transaction information calculation method based on a distributed system provided in Embodiment 2 of the present invention;

[0026] Figure 3 This is a schematic diagram of the structure of a transaction information accounting device based on a distributed system provided in Embodiment 3 of the present invention;

[0027] Figure 4 This is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. Detailed Implementation

[0028] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0029] It should be noted that the terms "current" and "historical," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "etc.", and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0030] Example 1

[0031] Figure 1 This document provides a flowchart of a transaction information calculation method based on a distributed system, as described in Embodiment 1 of the present invention. This embodiment is applicable to situations where transaction information is calculated using a distributed system. The method can be executed by a transaction information calculation device based on a distributed system, which can be implemented in hardware and / or software and can be configured in an electronic device.

[0032] like Figure 1 As shown, the above-mentioned transaction information calculation method based on a distributed system includes:

[0033] S110. Obtain the pending transaction information for the current accounting period from the HBase database, perform detailed accounting on the pending transaction information, and determine the accounting result information for the current accounting period.

[0034] The accounting results for the current accounting period include: transaction amount information, enterprise sub-ledger information, user sub-ledger information, and measurement processing data. Transaction amount information refers to the sum of all transactions for this account on the debit or credit side within a certain period. Sub-ledgers are the main ledgers for detailed accounting, providing detailed records of each account in the general ledger and serving as the basis for reconciliation with other entities. Enterprise sub-ledger information includes the enterprise's income and expenses. User sub-ledger information includes the user's income and expenses. Users refer to the enterprise's corresponding customers. For example, if the enterprise is a bank, then the users are the bank's customers. Measurement processing data refers to the data obtained after subsequent measurement processing of the transaction information to be processed. Subsequent measurement refers to the remeasurement performed when there is sufficient and appropriate evidence that the value of a recorded item has increased or decreased since the initial measurement; it determines the item's presented value on the balance sheet. Detailed accounting is a method of detailed, specific, and systematic accounting of an enterprise's business activities and income and expenses, specifically reflecting the business activities of each unit and each business. Detailed accounting involves setting up detailed ledgers under each transaction information subject, recording in detail the increases and decreases in account materials for each account. The accounting procedure is as follows: record transactions in the subsidiary ledgers based on the vouchers, then post the balance sheets based on the subsidiary ledgers. For certain important economic events, a registration form can also be set up for recording.

[0035] Specifically, based on the transaction information uploaded by users for the current accounting period obtained from the transaction system, this information is designated as the pending transaction information for the current accounting period. Detailed calculations are then performed on this pending transaction information to determine the accounting result information for the current accounting period.

[0036] For example, before obtaining the pending transaction information for the current accounting period through the HBase database, performing detailed accounting on the pending transaction information, and determining the accounting result information for the current accounting period, you can also clean up the historical accounting information in the HBase database and retain the accounting result information of the previous accounting period stored in the HBase database.

[0037] The above solution can free up storage memory in the HBase database and improve the efficiency of querying the results of the previous accounting cycle.

[0038] S120. Using the HBase database, determine the accounting information table for the current accounting period based on the accounting results information for the current accounting period and the accounting results information for the previous accounting period stored in the HBase database.

[0039] HBase is a highly reliable, high-performance, column-oriented, and scalable distributed storage system. The accounting results from the previous accounting period include transaction amounts, enterprise ledger information, user ledger information, and metering data.

[0040] Specifically, the calculation results of the current calculation period and the calculation results of the previous calculation period stored in the HBase database are stored in the current calculation period's calculation information table in the HBase database based on the LSM storage structure. LSM, or LSM tree, is a storage structure on HBase.

[0041] S130. Using Hive, determine the external accounting table of the HBase database based on the accounting information table of the current accounting cycle, and store the detailed accounting external table in HDFS according to the storage format and storage path specified by the external accounting table.

[0042] Hive is a data warehouse tool based on Hadoop, used for data extraction, transformation, and loading. It's a mechanism for storing, querying, and analyzing large-scale data stored in Hadoop. Hive creates internal tables by default. The key difference between internal and external tables is that when deleting an internal table, both its metadata and table data are deleted. Deleting an external table, however, only deletes its metadata; the corresponding files in the HDFS path are not deleted. HDFS refers to a distributed file system designed to run on general-purpose hardware.

[0043] Specifically, Hive is used to transform the accounting information table for the current accounting cycle into an external accounting table in the HBase database, and the detailed accounting external table is stored in HDFS according to the storage format and storage path specified by the external accounting table.

[0044] S140. The external accounting table is transformed into a columnar storage internal table using HDFS, and user detailed account ledgers and transaction information accounting entries are extracted from the columnar storage internal table.

[0045] The user detailed account ledger is a table that records detailed information on user income and expenses. It may include user account number, user's affiliated institution, transaction voucher type, account, transaction amount, and balance. Transaction information accounting entries include user account number, user's affiliated institution, transaction voucher type, entry number, account, balance, accounting date, red / blue ink, and lessor. Accounts include income information, expense information, asset information, and lease information.

[0046] Specifically, HDFS is used to transform the external accounting table into a columnar table, thereby obtaining the corresponding columnar internal storage table. User detailed account ledgers and transaction information accounting entries are then extracted from the columnar internal storage table.

[0047] S150: Calculate journal entries based on user detailed ledgers and transaction information using HDFS, and update the enterprise's general ledger information.

[0048] The enterprise general ledger information includes the enterprise's affiliated organization, transaction voucher type, entry number, accounting date, account, and transaction voucher related fields.

[0049] Specifically, HDFS calculates journal entries based on user detailed ledgers and transaction information, verifies various information recorded in the enterprise general ledger, determines the fields in the enterprise general ledger that need to be updated based on the verification results, and updates the fields that need to be updated based on the user detailed ledgers and transaction information.

[0050] For example, the method for updating the enterprise general ledger information can be as follows: using HDFS, based on the journal entries in the transaction information accounting entries, summarize the transaction information accounting entries, and determine the account update information for each account to be updated in the enterprise subsidiary ledger information based on the summarized transaction information accounting entries; using HDFS, update each account to be updated in the enterprise general ledger information based on the account update information; and using HDFS, update the account details to be updated in the enterprise general ledger information based on the user's subsidiary ledger.

[0051] The journal entries include revenue information, expenditure information, asset information, and lease information.

[0052] Understandably, by summarizing the accounting entries for transaction information based on the subject catalog, updating the account information of the enterprise's subsidiary ledgers according to the summarized accounting entries for transaction information, and updating the account details in the enterprise's general ledger information according to the user's subsidiary ledgers, the enterprise's general ledger information can be updated in a timely manner, improving the real-time performance and accuracy of the enterprise's general ledger information updates.

[0053] For example, when a detailed accounting information query request is obtained, the account identifier of the requester is determined by HDFS based on the enterprise sub-ledger query request, and the account identifier is used as the query primary key; by HDFS, the request feedback information is determined from the columnar storage internal table based on the query primary key, and the request feedback information is sent to the requester.

[0054] For example, after updating the enterprise's subsidiary ledger information, general ledger accounting can be performed based on the updated enterprise subsidiary ledger information, and expenditure and revenue information can be determined based on the processing results. The general ledger accounting statement can then be determined based on the expenditure and revenue information. The general ledger accounting statement can be verified based on the user's detailed subsidiary ledger.

[0055] Understandably, verifying the enterprise sub-ledger information after updating it can improve its accuracy.

[0056] The technical solution provided in this embodiment obtains the pending transaction information for the current accounting period from the HBase database, performs detailed accounting on the pending transaction information, and determines the accounting result information for the current accounting period. Using the HBase database, based on the accounting result information for the current accounting period and the accounting result information for the previous accounting period stored in the HBase database, the accounting information table for the current accounting period is determined. Using Hive, based on the accounting information table for the current accounting period, the external accounting table for the HBase database is determined, and the detailed accounting external table is stored in HDFS according to the specified storage format and storage path. HDFS performs columnar transformation on the accounting external table to convert it into a columnar storage internal table, and extracts user detailed account ledgers and transaction information accounting entries from the columnar storage internal table. HDFS updates the enterprise general ledger information based on the user detailed account ledgers and transaction information accounting entries. This solution solves the problem of low efficiency in writing data to the database during each process of transaction information accounting, which leads to low efficiency in transaction information accounting. Using HBase as the database engine for transaction information accounting improves the ability to write detailed accounting results. Simultaneously, converting the external accounting table corresponding to the accounting information table for the current accounting period into columnar storage in HDFS improves the efficiency of subsequent queries on detailed accounting information, reduces database storage overhead, and enhances the flexibility of querying detailed accounting information.

[0057] Example 2

[0058] Figure 2 This is a flowchart of a transaction information accounting method based on a distributed system provided in Embodiment 2 of the present invention. This embodiment optimizes the above embodiment and provides a preferred implementation method that obtains the pending transaction information for the current accounting period from the HBase database, performs detailed accounting on the pending transaction information, and determines the accounting result information for the current accounting period. Specifically, as shown... Figure 2 As shown, the method includes:

[0059] S210. Obtain the pending transaction information of the current accounting period of the transaction system through the HBase database, store the pending transaction information of the current accounting period in the LSM storage format, and generate the pending data file based on the data storage result.

[0060] The data file to be calculated is the Hfile file.

[0061] Specifically, the system obtains the pending transaction information for the current accounting period of the transaction system from the HBase database, stores the pending transaction information for the current accounting period in the LSM storage format, and generates an Hfile file in HBase, which is the data file to be processed.

[0062] S220. Initial confirmation processing of detailed accounting of transaction information to be processed in the data file to be accounted for in the HBase database, determine the transaction data of the current accounting period, and perform subsequent measurement processing of detailed accounting of the transaction data of the current accounting period to determine the measurement processing data of the current accounting period.

[0063] Specifically, detailed ledger accounting is performed on the data to be confirmed in the accounting data file in HBase. First, the HBase database performs initial confirmation processing on the transaction information to be processed in the accounting data file to determine the transaction data for the current accounting period from the transaction information to be processed. Then, the transaction data for the current accounting period is subjected to subsequent measurement processing of detailed accounting. Based on the results of the subsequent measurement processing, the measurement processing data for the current accounting period is determined.

[0064] S230. Using the HBase database, determine the user sub-account information, transaction amount information, and enterprise sub-account information for the current accounting period based on the transaction data of the current accounting period.

[0065] Specifically, the system uses the HBase database to extract user account information, transaction amount information, and enterprise account information for the current accounting period from the transaction data of the current accounting period.

[0066] S240. Using the HBase database, determine the accounting information table for the current accounting period based on the accounting results information for the current accounting period and the accounting results information for the previous accounting period stored in the HBase database.

[0067] S250. Using Hive, determine the external accounting table of the HBase database based on the accounting information table of the current accounting cycle, and store the detailed accounting external table in HDFS according to the storage format and storage path specified by the external accounting table.

[0068] S260. The external accounting table is transformed into a columnar storage internal table through HDFS, and user detailed account ledgers and transaction information accounting entries are extracted from the columnar storage internal table.

[0069] S270. The enterprise general ledger information is updated by calculating journal entries based on user detailed account ledgers and transaction information through HDFS.

[0070] This embodiment proposes a preferred implementation method for performing detailed accounting on pending transaction information of the current accounting period using an HBase database to determine the accounting result information of the current accounting period. The above solution stores the pending transaction information of the current accounting period in LSM storage format to determine the pending accounting data file for the current accounting period; it then performs initial confirmation processing and subsequent measurement processing on the pending transaction information in the pending accounting data file to determine the user ledger information, transaction amount information, and enterprise ledger information for the current accounting period. The ability to use an HBase database for detailed accounting of transaction information facilitates subsequent row-to-column conversion processing of the external accounting tables corresponding to the accounting information table, improving the efficiency of transaction information accounting.

[0071] Example 3

[0072] Figure 3 This is a schematic diagram of a transaction information calculation device based on a distributed system, provided in Embodiment 3 of the present invention. This embodiment is applicable to situations where transaction information is calculated using a distributed system. Figure 3 As shown, the transaction information accounting device based on a distributed system includes: an accounting result information determination module 310, an accounting information table determination module 320, an accounting external table storage module 330, a columnar storage table processing module 340, and an enterprise general ledger information update module 350.

[0073] The accounting result information determination module 310 is used to obtain the pending transaction information of the current accounting period through the HBase database, perform detailed accounting on the pending transaction information, and determine the accounting result information of the current accounting period.

[0074] The accounting information table determination module 320 is used to determine the accounting information table for the current accounting period by using the HBase database, based on the accounting result information of the current accounting period and the accounting result information of the previous accounting period stored in the HBase database.

[0075] The external accounting table storage module 330 is used to determine the external accounting table of the HBase database through Hive based on the accounting information table of the current accounting cycle, and store the detailed external accounting table in HDFS according to the storage format and storage path specified by the external accounting table.

[0076] The columnar storage table processing module 340 is used to perform columnar processing on the external accounting table through HDFS, so as to convert the external accounting table into a columnar storage internal table, and extract user detailed account ledgers and transaction information accounting entries from the columnar storage internal table.

[0077] The Enterprise General Ledger Information Update Module 350 is used to update the enterprise general ledger information by calculating journal entries based on user detailed account ledgers and transaction information through HDFS.

[0078] The technical solution provided in this embodiment obtains the pending transaction information for the current accounting period from the HBase database, performs detailed accounting on the pending transaction information, and determines the accounting result information for the current accounting period. Using the HBase database, based on the accounting result information for the current accounting period and the accounting result information for the previous accounting period stored in the HBase database, the accounting information table for the current accounting period is determined. Using Hive, based on the accounting information table for the current accounting period, the external accounting table for the HBase database is determined, and the detailed accounting external table is stored in HDFS according to the specified storage format and storage path. HDFS performs columnar transformation on the accounting external table to convert it into a columnar storage internal table, and extracts user detailed account ledgers and transaction information accounting entries from the columnar storage internal table. HDFS updates the enterprise general ledger information based on the user detailed account ledgers and transaction information accounting entries. This solution solves the problem of low efficiency in writing data to the database during each process of transaction information accounting, which leads to low efficiency in transaction information accounting. Using HBase as the database engine for transaction information accounting improves the ability to write detailed accounting results. Simultaneously, converting the external accounting table corresponding to the accounting information table for the current accounting period into columnar storage in HDFS improves the efficiency of subsequent queries on detailed accounting information, reduces database storage overhead, and enhances the flexibility of querying detailed accounting information.

[0079] For example, the accounting result information determination module 310 includes:

[0080] The transaction information storage unit is used to obtain the pending transaction information of the current accounting period of the transaction system through the HBase database, store the pending transaction information of the current accounting period in the LSM storage format, and generate the pending data file based on the data storage result.

[0081] The metering processing data determination unit is used to perform initial confirmation processing of detailed accounting of transaction information to be processed in the data file to be accounted for in the HBase database, determine the transaction data of the current accounting period, and perform subsequent metering processing of detailed accounting of the transaction data of the current accounting period to determine the metering processing data of the current accounting period.

[0082] The transaction data analysis unit is used to determine the user sub-account information, transaction amount information, and enterprise sub-account information for the current accounting period based on the transaction data of the current accounting period using the HBase database.

[0083] For example, the enterprise general ledger information update module 350 is specifically used for:

[0084] Using HDFS, the transaction information accounting entries are summarized based on the journal entries in the transaction information accounting entries, and the account update information of each account to be updated in the enterprise's subsidiary ledger information is determined based on the summarized transaction information accounting entries.

[0085] The HDFS is used to update each account in the enterprise's general ledger information based on the account update information.

[0086] HDFS updates the account details to be updated in the enterprise's general ledger information based on the user's detailed account ledger.

[0087] For example, the above-mentioned transaction information accounting device based on a distributed system further includes:

[0088] The primary key determination module is used to determine the account identifier of the requester based on the enterprise sub-ledger query request through HDFS when a detailed accounting information query request is obtained, and to use the account identifier as the query primary key.

[0089] The feedback information determination module is used to determine the request feedback information from the columnar storage internal table through HDFS based on the query primary key, and then send the request feedback information to the requester.

[0090] For example, the above-mentioned transaction information accounting device based on a distributed system further includes:

[0091] The general ledger accounting statement determination module is used to perform general ledger accounting processing based on the updated enterprise sub-ledger information, and determine expenditure and revenue information based on the processing results, and determine the general ledger accounting statement based on the expenditure and revenue information;

[0092] The general ledger reconciliation module is used to reconcile the general ledger reconciliation based on the user's detailed account ledger.

[0093] For example, the above-mentioned transaction information accounting device based on a distributed system further includes:

[0094] The data cleaning module is used to clean up historical accounting information in the HBase database, retaining the accounting results information of the previous accounting period stored in the HBase database.

[0095] The transaction information accounting device based on a distributed system provided in this embodiment can be applied to the transaction information accounting method based on a distributed system provided in any of the above embodiments, and has the corresponding functions and beneficial effects.

[0096] Example 4

[0097] Figure 4 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0098] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0099] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0100] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as transaction information accounting methods based on distributed systems.

[0101] In some embodiments, the transaction information accounting method based on a distributed system can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the transaction information accounting method based on a distributed system described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to execute the transaction information accounting method based on a distributed system by any other suitable means (e.g., by means of firmware).

[0102] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0103] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0104] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0105] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0106] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0107] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0108] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0109] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A transaction information accounting method based on a distributed system, characterized in that, include: The system retrieves pending transaction information for the current accounting period from the HBase database, performs detailed accounting on the pending transaction information, and determines the accounting result information for the current accounting period. Using the HBase database, the accounting information table for the current accounting period is determined based on the accounting result information for the current accounting period and the accounting result information for the previous accounting period stored in the HBase database. Using Hive, the HBase database's external accounting table is determined based on the accounting information table for the current accounting cycle, and the detailed accounting external table is stored in HDFS according to the storage format and storage path specified by the external accounting table. The external accounting table is transformed into a columnar storage internal table using HDFS, and user detailed account ledgers and transaction information accounting entries are extracted from the columnar storage internal table. The enterprise general ledger information is updated by calculating journal entries based on the user's detailed account and the transaction information using HDFS; The process of obtaining pending transaction information for the current accounting period from the HBase database, performing detailed accounting on the pending transaction information, and determining the accounting result information for the current accounting period includes: The system obtains pending transaction information for the current accounting period from the HBase database, stores the pending transaction information for the current accounting period in LSM storage format, and generates a pending data file based on the data storage result. The HBase database is used to perform initial confirmation processing on the transaction information to be processed in the data file to be processed, to determine the transaction data of the current accounting period, and to perform subsequent measurement processing on the transaction data of the current accounting period, to determine the measurement processing data of the current accounting period. The user sub-account information, transaction amount information, and enterprise sub-account information for the current accounting period are determined using the HBase database based on the transaction data of the current accounting period.

2. The method according to claim 1, characterized in that, The enterprise general ledger information is updated by calculating journal entries based on the user's detailed account ledger and the transaction information using HDFS, including: Using HDFS, the transaction information accounting entries are summarized based on the journal entries in the transaction information accounting entries, and the account update information of each account to be updated in the enterprise sub-ledger information is determined based on the summarized transaction information accounting entries. The HDFS is used to update each account in the enterprise's general ledger information that needs to be updated, based on the account update information. The HDFS is used to update the account details to be updated in the enterprise general ledger information based on the user's detailed account ledger.

3. The method according to claim 1, characterized in that, Also includes: When a detailed accounting information query request is received, HDFS determines the account identifier of the requester based on the enterprise sub-ledger query request, and uses the account identifier as the query primary key; Using HDFS, based on the query primary key, the request feedback information is determined from the columnar storage internal table, and the request feedback information is sent to the request issuer.

4. The method according to claim 1, characterized in that, Also includes: Based on the updated enterprise sub-ledger information, general ledger accounting is performed, and expenditure and revenue information are determined based on the processing results. A general ledger accounting statement is then determined based on the expenditure and revenue information. The general ledger accounting statement is reconciled based on the user detailed account statements.

5. The method according to claim 1, characterized in that, Also includes: The historical accounting information in the HBase database is cleaned up, and the accounting results information of the previous accounting period stored in the HBase database is retained.

6. A transaction information accounting device based on a distributed system, characterized in that, include: The accounting result information determination module is used to obtain the pending transaction information of the current accounting period through the HBase database, perform detailed accounting on the pending transaction information, and determine the accounting result information of the current accounting period. The accounting information table determination module is used to determine the accounting information table for the current accounting period by using the HBase database, based on the accounting result information of the current accounting period and the accounting result information of the previous accounting period stored in the HBase database. The external accounting table storage module is used to determine the external accounting table of the HBase database through Hive based on the accounting information table of the current accounting period, and store the detailed accounting external table in HDFS according to the storage format and storage path specified by the external accounting table. The columnar storage table processing module is used to perform columnar processing on the external accounting table through HDFS to convert the external accounting table into a columnar storage internal table, and extract user detailed account ledgers and transaction information accounting entries from the columnar storage internal table; The enterprise general ledger information update module is used to update the enterprise general ledger information by calculating journal entries based on the user detailed account ledger and the transaction information through HDFS; The accounting result information determination module includes: The transaction information storage unit is used to obtain the pending transaction information of the current accounting period of the transaction system through the HBase database, store the pending transaction information of the current accounting period in the LSM storage format, and generate a pending data file based on the data storage result. The metering processing data determination unit is used to perform initial confirmation processing on the transaction information to be processed in the data file to be calculated through the HBase database, determine the transaction data of the current accounting period, and perform subsequent metering processing on the transaction data of the current accounting period to determine the metering processing data of the current accounting period. The transaction data analysis unit is used to determine the user sub-account information, transaction amount information, and enterprise sub-account information for the current accounting period based on the transaction data of the current accounting period through the HBase database.

7. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the transaction information accounting method based on a distributed system as described in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the transaction information accounting method based on a distributed system as described in any one of claims 1-5.