CN116450659A - Transaction information accounting method, device, equipment and medium based on distributed system - Google Patents

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

Info

Publication number
CN116450659A
CN116450659A CN202310215746.3A CN202310215746A CN116450659A CN 116450659 A CN116450659 A CN 116450659A CN 202310215746 A CN202310215746 A CN 202310215746A CN 116450659 A CN116450659 A CN 116450659A
Authority
CN
China
Prior art keywords
accounting
information
current
period
transaction information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310215746.3A
Other languages
Chinese (zh)
Inventor
吕虎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202310215746.3A priority Critical patent/CN116450659A/en
Publication of CN116450659A publication Critical patent/CN116450659A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2379Updates performed during online database operations; commit processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses a transaction information accounting method based on a distributed system, which comprises the following steps: acquiring transaction information to be processed in a current accounting period through an Hbase database, performing detail accounting on the transaction information to be processed, and determining accounting result information in the current accounting period; determining an accounting information table of the current accounting period according to the accounting result information of the current accounting period and the accounting result information of the last accounting period stored in the Hbase database through the Hbase database; through Hive, according to the accounting information table of the current accounting period, determining an accounting external table of the HBase database, and storing the detail accounting external table in the HDFS; performing a column conversion process on the accounting external table through the HDFS to convert the accounting external table into a column-type storage internal table, and extracting a user detail account and a transaction information accounting entry from the column-type storage internal table; and updating the general ledger information of the enterprise through the HDFS according to the user detail account and the transaction information accounting entry. And the accounting efficiency of transaction information is improved.

Description

Transaction information accounting method, device, equipment and medium based on distributed system
Technical Field
The embodiment of the invention relates to the field of computers, in particular to a transaction information accounting method, device, equipment and medium based on a distributed system.
Background
At present, when transaction information is calculated, the transaction information acquisition and the transaction information calculation are realized through one system, the transaction information acquisition is oriented to a user performing transaction activities, the transaction information calculation is oriented to enterprise internal management, and as the nucleic acid rule of the transaction information calculation is more and more complex, the calculation pressure of the transaction system is more and more increased, so that the problems of overlarge storage expense of a database, slower writing of calculation related data and low transaction information calculation efficiency are caused in the transaction information calculation process. Therefore, how to improve the data writing efficiency in the transaction information accounting process and improve the transaction information accounting efficiency is a problem to be solved.
Disclosure of Invention
The invention provides a transaction information accounting method, device, equipment and medium based on a distributed system, which can improve the writing capability of a detail accounting result, improve the accounting efficiency of transaction information, reduce the storage expense of a database and improve the flexibility of inquiring the detail accounting information.
According to an aspect of the present invention, there is provided a transaction information accounting method based on a distributed system, including:
acquiring transaction information to be processed in a current accounting period through an Hbase database, performing detail accounting on the transaction information to be processed, and determining accounting result information in the current accounting period;
determining an accounting information table of the current accounting period according to the accounting result information of the current accounting period and the accounting result information of the last accounting period stored in the Hbase database through the Hbase database;
through Hive, determining an accounting external table of the HBase database according to the accounting information table of the current accounting period, and storing the detail accounting external table in an HDFS according to a storage format and a storage path designated by the accounting external table;
performing column conversion processing on the accounting external table through an HDFS (Hadoop distributed File System) to convert the accounting external table into a column-type storage internal table, and extracting a user detail account and a transaction information accounting entry from the column-type storage internal table;
and updating the enterprise general ledger information through the HDFS according to the user detail account and the transaction information accounting entry.
According to another aspect of the present invention, there is provided a transaction information accounting apparatus based on a distributed system, the apparatus including:
the accounting result information determining module is used for acquiring the transaction information to be processed in the current accounting period through the Hbase database, carrying out detail accounting on the transaction information to be processed, and determining the accounting result information in the current accounting period;
the accounting information table determining module is used for determining an accounting information table of the current accounting period according to the accounting result information of the current accounting period and the accounting result information of the last accounting period stored in the Hbase database through the Hbase database;
the accounting external table storage module is used for determining an accounting external table of the HBase database according to the accounting information table of the current accounting period through Hive and storing the detail accounting external table in the HDFS according to the storage format and the storage path appointed by the accounting external table;
the column type storage table processing module is used for carrying out column conversion processing on the accounting external table through the HDFS so as to convert the accounting external table into a column type storage internal table, and extracting user detail account and transaction information accounting entry from the column type storage internal table;
And the enterprise general ledger information updating module is used for updating the enterprise general ledger information through the HDFS according to the user detail account and the transaction information accounting entry.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the transaction information accounting method based on the distributed system according to any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the transaction information accounting method based on a distributed system according to any one of the embodiments of the present invention when executed.
According to the technical scheme, the Hbase database is used for acquiring the transaction information to be processed in the current accounting period, carrying out detail accounting on the transaction information to be processed, and determining accounting result information in the current accounting period; determining an accounting information table of the current accounting period according to the accounting result information of the current accounting period and the accounting result information of the last accounting period stored in the Hbase database through the Hbase database; through Hive, according to the accounting information table of the current accounting period, determining an accounting external table of the HBase database, and according to the storage format and the storage path appointed by the accounting external table, storing the detail accounting external table in the HDFS; performing a column conversion process on the accounting external table through the HDFS to convert the accounting external table into a column-type storage internal table, and extracting a user detail account and a transaction information accounting entry from the column-type storage internal table; and updating the general ledger information of the enterprise through the HDFS according to the user detail account and the transaction information accounting entry. By the scheme, the problem that in the transaction information accounting process, the efficiency of writing process data in a database in the accounting process is low, so that the accounting efficiency of transaction information is low is solved. Hbase is used as a database engine for transaction information accounting, so that the writing capability of the detail accounting result can be improved. Meanwhile, an accounting external table corresponding to the accounting information table in the current accounting period is converted into a column type for storage in the HDFS, so that the subsequent query efficiency of the detail accounting information can be improved, the storage cost of a database can be reduced, and the flexibility of querying the detail accounting information can be improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a transaction information accounting method based on a distributed system according to a first embodiment of the present invention;
fig. 2 is a flowchart of a transaction information accounting method based on a distributed system according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a transaction information accounting device based on a distributed system according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "current" and "history" and the like in the description of the present invention and the claims and the above drawings are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "includes," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a transaction information accounting method based on a distributed system according to an embodiment of the present invention, where the embodiment is applicable to a situation of accounting transaction information through the distributed system. The method may be performed by a distributed system based transaction information accounting device, which may be implemented in hardware and/or software, which may be configured in an electronic device.
As shown in fig. 1, the transaction information accounting method based on the distributed system includes:
s110, acquiring transaction information to be processed in the current accounting period through the Hbase database, performing detail accounting on the transaction information to be processed, and determining accounting result information in the current accounting period.
Wherein, the accounting result information of the current accounting period includes: the generation amount information of the current accounting period, the enterprise account information, the user account information and the metering processing data. The occurrence information refers to the sum of all the transactions that this subject has occurred at the borrower or lender over a period of time. The account book is a main account book for detail accounting, is a detailed record of each subject of the general account, and is also a basis for checking accounts with units. The enterprise account information includes information such as income and expense of the enterprise. The user account information includes information such as income and expense of the user. The user is the user corresponding to the enterprise. For example, if the enterprise is a bank, the user is the user of that bank. The metering processing data is data obtained after the subsequent metering processing of performing detail accounting on the transaction information to be processed. Subsequent metering refers to re-metering when there is adequate evidence that a recorded item has its value changed by an increase or decrease after the initial metering, which determines the listing value of the item on the liability statement. The detail accounting is a way of carrying out detailed, specific and systematic accounting on business activities and expenses of enterprises, and specifically reflects business activity conditions of each unit and each business. The detail calculation is to set up a detail account table for each account under each transaction information department, and to record the account material increase/decrease change of each account in detail. The accounting program is as follows: according to the certificates of the generated business, account numbers are recorded, balance tables are recorded according to the account numbers, and certain important economic matters can be recorded by setting a registry.
Specifically, transaction information of a current accounting period uploaded by a user is obtained according to a transaction system, and the transaction information of the current accounting period uploaded by the user is used as transaction information to be processed of the current accounting period. Performing detail accounting on transaction information to be processed, and determining accounting result information of the current accounting period
The method comprises the steps of obtaining transaction information to be processed in a current accounting period through an Hbase database, carrying out detail accounting on the transaction information to be processed, and before the accounting result information in the current accounting period is determined, carrying out data cleaning on historical accounting information in the Hbase database through the Hbase database, and reserving the accounting result information in the last accounting period stored in the Hbase database.
According to the scheme, the storage memory of the Hbase database can be released, and meanwhile, the inquiring efficiency of the follow-up calculation result information of the previous calculation period is improved.
S120, determining an accounting information table of the current accounting period according to the accounting result information of the current accounting period and the accounting result information of the last accounting period stored in the Hbase database through the Hbase database.
The Hbase database is a high-reliability, high-performance, column-oriented and scalable distributed storage system. The accounting result information of the last accounting period includes occurrence information of the last accounting period, enterprise account information, user account information, and metering processing data.
Specifically, the accounting result information of the current accounting period and the accounting result information of the last accounting period stored in the Hbase database are stored in an accounting information table of the current accounting period established in the Hbase database based on the LSM storage structure. LSM, LSM tree, is a storage structure on HBase.
S130, determining an accounting external table of the HBase database according to an accounting information table of the current accounting period through Hive, and storing the detail accounting external table in the HDFS according to a storage format and a storage path designated by the accounting external table.
Hive is a data warehouse tool based on Hadoop, and is used for extracting, converting and loading data, which is a mechanism capable of storing, querying and analyzing large-scale data stored in Hadoop. The Hive defaults to create an internal table, and the essential difference between the internal table and the external table is that when the table is deleted, the internal table can delete the metadata of the internal table and the table data of the internal table, and when the external table is deleted, only the metadata of the external table can be deleted, and the external table corresponding to the file under the HDFS path cannot be deleted. HDFS refers to a distributed file system designed to fit on general purpose hardware.
Specifically, the accounting information table of the current accounting period is converted into an accounting external table of the HBase database by Hive, and the detail accounting external table is stored in the HDFS according to the storage format and the storage path specified by the accounting external table.
S140, performing column conversion processing on the accounting external table through the HDFS to convert the accounting external table into a column-type storage internal table, and extracting a user detail account and a transaction information accounting entry from the column-type storage internal table.
The user detail account refers to a table in which user income and expense detail information is recorded. The user detail account may include a user account number, an institution to which the user belongs, a transaction credential category, a subject, an occurrence, a balance, and the like. The transaction information accounting entry comprises a user account number, an organization to which the user belongs, a transaction certificate type, an entry number, a subject, a balance, an accounting date, a red and blue word, a leasing party and the like. The subjects include revenue information, expense information, asset information, and rental information.
Specifically, the external accounting table is subjected to a column conversion process through the HDFS so as to be converted into a column type table, and a column type storage internal table corresponding to the external accounting table is obtained. User detail account and transaction information accounting entry are extracted from the columnar storage internal table.
S150, accounting entry is calculated according to user detail account and transaction information through the HDFS, and enterprise general account information is updated.
The enterprise general ledger information comprises an enterprise affiliated institution, a transaction certificate category, an entry number, an accounting date, subjects, transaction certificate related fields and the like.
Specifically, the HDFS checks and records all the information recorded in the general ledger information of the enterprise according to the user detail account and the transaction information, determines the field to be updated in the general ledger information of the enterprise according to the checking result, and updates the field to be updated according to the user detail account and the transaction information check and record.
For example, the method for updating the general ledger information of the enterprise may be: summarizing transaction information accounting records based on the recorded subjects in the transaction information accounting records through the HDFS, and determining subject updating information of each subject to be updated in enterprise account information according to the summarized transaction information accounting records; updating each subject to be updated in the enterprise general ledger information based on the subject updating information through the HDFS; and updating the account details to be updated in the enterprise general ledger information according to the user detail account by using the HDFS.
Wherein the entry subjects include revenue information, expense information, asset information, and rental information.
It can be understood that the transaction information accounting entry is summarized based on the branch directory, the subject information of the enterprise account information is updated according to the summarized transaction information accounting entry, and the account detail information in the enterprise account information is updated according to the user detail account, so that the enterprise account information can be updated in time, and the real-time performance and accuracy of the enterprise account information update are improved.
When a detail accounting information query request is acquired, an account identifier of a request sender is determined through an HDFS according to the enterprise account query request, and the account identifier is used as a query main key; and determining request feedback information from the internal list of the columnar storage according to the query primary key through the HDFS, and sending the request feedback information to a request sender.
Illustratively, after the enterprise account information is updated, general account accounting processing can be performed according to the updated enterprise account information, expense information and income information are determined according to processing results, and a general account accounting table is determined according to the expense information and the income information; and checking the general ledger accounting table according to the user detail account.
It can be understood that the accuracy of the enterprise account information can be improved by checking the enterprise account information after updating the enterprise account information.
According to the technical scheme provided by the embodiment, the Hbase database is used for acquiring the transaction information to be processed in the current accounting period, carrying out detail accounting on the transaction information to be processed, and determining accounting result information in the current accounting period; determining an accounting information table of the current accounting period according to the accounting result information of the current accounting period and the accounting result information of the last accounting period stored in the Hbase database through the Hbase database; through Hive, according to the accounting information table of the current accounting period, determining an accounting external table of the HBase database, and according to the storage format and the storage path appointed by the accounting external table, storing the detail accounting external table in the HDFS; performing a column conversion process on the accounting external table through the HDFS to convert the accounting external table into a column-type storage internal table, and extracting a user detail account and a transaction information accounting entry from the column-type storage internal table; and updating the general ledger information of the enterprise through the HDFS according to the user detail account and the transaction information accounting entry. By the scheme, the problem that in the transaction information accounting process, the efficiency of writing process data in a database in the accounting process is low, so that the accounting efficiency of transaction information is low is solved. Hbase is used as a database engine for transaction information accounting, so that the writing capability of the detail accounting result can be improved. Meanwhile, an accounting external table corresponding to the accounting information table in the current accounting period is converted into a column type for storage in the HDFS, so that the subsequent query efficiency of the detail accounting information can be improved, the storage cost of a database can be reduced, and the flexibility of querying the detail accounting information can be improved.
Example two
Fig. 2 is a flowchart of a transaction information accounting method based on a distributed system according to a second embodiment of the present invention, where the present embodiment is optimized based on the foregoing embodiment, and a preferred implementation manner of obtaining transaction information to be processed in a current accounting period through an Hbase database, performing detailed accounting on the transaction information to be processed, and determining accounting result information in the current accounting period is provided. Specifically, as shown in fig. 2, the method includes:
s210, acquiring the to-be-processed transaction information of the current accounting period of the transaction system through the Hbase database, carrying out data storage on the to-be-processed transaction information of the current accounting period according to the LSM storage format, and generating a to-be-accounting data file according to the data storage result.
The data file to be calculated is a Hfile file.
Specifically, the to-be-processed transaction information of the current accounting period of the transaction system is obtained through the Hbase database, the to-be-processed transaction information of the current accounting period is subjected to data storage according to the LSM storage format, and a Hfile file in the Hbase, namely, the to-be-accounting data file is generated.
S220, performing detail accounting initial confirmation processing on the transaction information to be processed in the data file to be accounting through the Hbase database, determining transaction data of the current accounting period, performing detail accounting subsequent metering processing on the transaction data of the current accounting period, and determining metering processing data of the current accounting period.
Specifically, accounting is performed on the data to be confirmed in the accounting data file in Hbase. Firstly, carrying out initial confirmation processing of detail accounting on transaction information to be processed in a data file to be accounting through an Hbase database, determining transaction data of a current accounting period from the transaction information to be processed, carrying out subsequent metering processing of detail accounting on the transaction data of the current accounting period, and determining metering processing data of the current accounting period according to a subsequent metering processing result.
S230, determining user account information, occurrence amount information and enterprise account information of the current accounting period according to transaction data of the current accounting period through an Hbase database.
Specifically, user account information, occurrence amount information and enterprise account information of the current accounting period are extracted from transaction data of the current accounting period through an Hbase database.
S240, determining an accounting information table of the current accounting period according to the accounting result information of the current accounting period and the accounting result information of the last accounting period stored in the Hbase database through the Hbase database.
S250, determining an accounting external table of the HBase database according to an accounting information table of the current accounting period through Hive, and storing the detail accounting external table in the HDFS according to a storage format and a storage path designated by the accounting external table.
S260, performing column conversion processing on the accounting external table through the HDFS to convert the accounting external table into a column-type storage internal table, and extracting a user detail account and a transaction information accounting entry from the column-type storage internal table.
S270, accounting entry is calculated according to the user detail account and the transaction information through the HDFS, and the enterprise general account information is updated.
According to the technical scheme of the embodiment, a preferred implementation mode of carrying out detail accounting on the transaction information to be processed in the current accounting period through the Hbase database and determining accounting result information of the current accounting period is provided. According to the scheme, the transaction information to be processed in the current accounting period is subjected to data storage according to the LSM storage format, and the data file to be accounting in the current accounting period is determined; and carrying out initial confirmation processing of detail accounting and subsequent metering processing of detail accounting on the transaction information to be processed in the data file to be checked, and determining user account information, occurrence amount information and enterprise account information of the current accounting period. The Hbase database can be adopted to conduct detail accounting on the transaction information, so that follow-up row-to-row processing on an accounting external table corresponding to the accounting information table is facilitated, and the efficiency of transaction information accounting is improved.
Example III
Fig. 3 is a schematic structural diagram of a transaction information accounting device based on a distributed system according to a third embodiment of the present invention. The present embodiment is applicable to a case of accounting transaction information by a distributed system. As shown in fig. 3, the transaction information accounting apparatus based on the distributed system includes: the accounting result information determination module 310, the accounting information table determination module 320, the accounting external table storage module 330, the columnar storage table processing module 340, and the enterprise general ledger information update module 350.
The accounting result information determining module 310 is configured to obtain, through the Hbase database, transaction information to be processed in a current accounting period, and perform detail accounting on the transaction information to be processed, so as to determine accounting result information in the current accounting period;
the accounting information table determining module 320 is configured to determine, by using the Hbase database, an accounting information table of a current accounting period according to the accounting result information of the current accounting period and the accounting result information of a previous accounting period stored in the Hbase database;
an accounting external table storage module 330, configured to determine, by Hive, an accounting external table of the HBase database according to an accounting information table of a current accounting period, and store the detail accounting external table in the HDFS according to a storage format and a storage path specified by the accounting external table;
The column type storage table processing module 340 is configured to perform a column conversion process on the accounting external table through the HDFS, so as to convert the accounting external table into a column type storage internal table, and extract a user detail account and a transaction information accounting entry from the column type storage internal table;
the enterprise general ledger information updating module 350 is configured to update the enterprise general ledger information through the HDFS according to the user details account and the transaction information accounting entry.
According to the technical scheme provided by the embodiment, the Hbase database is used for acquiring the transaction information to be processed in the current accounting period, carrying out detail accounting on the transaction information to be processed, and determining accounting result information in the current accounting period; determining an accounting information table of the current accounting period according to the accounting result information of the current accounting period and the accounting result information of the last accounting period stored in the Hbase database through the Hbase database; through Hive, according to the accounting information table of the current accounting period, determining an accounting external table of the HBase database, and according to the storage format and the storage path appointed by the accounting external table, storing the detail accounting external table in the HDFS; performing a column conversion process on the accounting external table through the HDFS to convert the accounting external table into a column-type storage internal table, and extracting a user detail account and a transaction information accounting entry from the column-type storage internal table; and updating the general ledger information of the enterprise through the HDFS according to the user detail account and the transaction information accounting entry. By the scheme, the problem that in the transaction information accounting process, the efficiency of writing process data in a database in the accounting process is low, so that the accounting efficiency of transaction information is low is solved. Hbase is used as a database engine for transaction information accounting, so that the writing capability of the detail accounting result can be improved. Meanwhile, an accounting external table corresponding to the accounting information table in the current accounting period is converted into a column type for storage in the HDFS, so that the subsequent query efficiency of the detail accounting information can be improved, the storage cost of a database can be reduced, and the flexibility of querying the detail accounting information can be improved.
Illustratively, the accounting result information determination module 310 includes:
the transaction information storage unit is used for acquiring the transaction information to be processed in the current accounting period of the transaction system through the Hbase database, carrying out data storage on the transaction information to be processed in the current accounting period according to the LSM storage format, and generating a data file to be accounting according to the data storage result;
the metering processing data determining unit is used for carrying out the initial confirmation processing of detail accounting on the transaction information to be processed in the data file to be accounting through the Hbase database, determining the transaction data of the current accounting period, carrying out the subsequent metering processing of detail accounting on the transaction data of the current accounting period, and determining the metering processing data of the current accounting period;
and the transaction data analysis unit is used for determining user account information, occurrence amount information and enterprise account information of the current accounting period according to the transaction data of the current accounting period through the Hbase database.
Illustratively, the enterprise general ledger information update module 350 is specifically configured to:
summarizing transaction information accounting records based on the recorded subjects in the transaction information accounting records through the HDFS, and determining subject updating information of each subject to be updated in enterprise account information according to the summarized transaction information accounting records;
Updating each subject to be updated in the enterprise general ledger information based on the subject updating information through the HDFS;
and updating the account details to be updated in the enterprise general ledger information according to the user detail account by using the HDFS.
Illustratively, the transaction information accounting device based on the distributed system further includes:
the query main key determining module is used for determining an account identifier of a request sender according to the enterprise account query request through the HDFS when acquiring the detail accounting information query request, and taking the account identifier as a query main key;
and the feedback information determining module is used for determining request feedback information from the column-type storage internal table according to the query main key through the HDFS and sending the request feedback information to a request sender.
Illustratively, the transaction information accounting device based on the distributed system further includes:
the general ledger accounting table determining module is used for carrying out general ledger accounting processing according to the updated enterprise account information, determining expenditure information and income information according to the processing result, and determining a general ledger accounting table according to the expenditure information and the income information;
and the general ledger accounting table checking module is used for checking the general ledger accounting table according to the user detail account.
Illustratively, the transaction information accounting device based on the distributed system further includes:
and the data cleaning module is used for cleaning the historical accounting information in the Hbase database through the Hbase database, and reserving the accounting result information of the last accounting period stored in the Hbase database.
The transaction information accounting device based on the distributed system provided by the embodiment is applicable to the transaction information accounting method based on the distributed system provided by any embodiment, and has corresponding functions and beneficial effects.
Example IV
Fig. 4 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, 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 meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having 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 specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a transaction information accounting method based on a distributed system.
In some embodiments, the transaction information accounting method based on a distributed system may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the distributed system-based transaction information accounting method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the distributed system-based transaction information accounting method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out 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, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here 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 a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A transaction information accounting method based on a distributed system, comprising:
acquiring transaction information to be processed in a current accounting period through an Hbase database, performing detail accounting on the transaction information to be processed, and determining accounting result information in the current accounting period;
determining an accounting information table of the current accounting period according to the accounting result information of the current accounting period and the accounting result information of the last accounting period stored in the Hbase database through the Hbase database;
Through Hive, determining an accounting external table of the HBase database according to the accounting information table of the current accounting period, and storing the detail accounting external table in an HDFS according to a storage format and a storage path designated by the accounting external table;
performing column conversion processing on the accounting external table through an HDFS (Hadoop distributed File System) to convert the accounting external table into a column-type storage internal table, and extracting a user detail account and a transaction information accounting entry from the column-type storage internal table;
and updating the enterprise general ledger information through the HDFS according to the user detail account and the transaction information accounting entry.
2. The method of claim 1, wherein obtaining the transaction information to be processed for the current accounting period through the Hbase database, and performing detail accounting on the transaction information to be processed, and determining accounting result information for the current accounting period, comprises:
acquiring transaction information to be processed in a current accounting period of a transaction system through the Hbase database, performing data storage on the transaction information to be processed in the current accounting period according to an LSM storage format, and generating a data file to be accounting according to a data storage result;
Performing detail accounting initial confirmation processing on the transaction information to be processed in the data file to be accounted through the Hbase database, determining transaction data of a current accounting period, performing detail accounting subsequent metering processing on the transaction data of the current accounting period, and determining metering processing data of the current accounting period;
and determining user account information, occurrence amount information and enterprise account information of the current accounting period according to the transaction data of the current accounting period through the Hbase database.
3. The method of claim 1, wherein updating, by the HDFS, the corporate ledger information based on the user detail ledger and the transaction information accounting entry, comprising:
summarizing the transaction information accounting records based on the recorded subjects in the transaction information accounting records through the HDFS, and determining subject updating information of each subject to be updated in enterprise account information according to the summarized transaction information accounting records;
updating each subject to be updated in the enterprise general ledger information based on the subject updating information through the HDFS;
and updating the account details to be updated in the enterprise general ledger information according to the user detail account by using the HDFS.
4. The method as recited in claim 1, further comprising:
when a detail accounting information query request is acquired, determining an account identifier of a request sender according to the enterprise account query request through an HDFS, and taking the account identifier as a query main key;
and determining request feedback information from the column-type storage internal table according to the query main key through the HDFS, and sending the request feedback information to the request sender.
5. The method as recited in claim 1, further comprising:
performing general ledger accounting processing according to updated enterprise account information, determining expenditure information and income information according to processing results, and determining a general ledger accounting table according to the expenditure information and the income information;
and checking the general ledger accounting table according to the user detail account.
6. The method as recited in claim 1, further comprising:
and data clearing is carried out on historical accounting information in the Hbase database through the Hbase database, and the accounting result information of the last accounting period stored in the Hbase database is reserved.
7. A transaction information accounting apparatus based on a distributed system, comprising:
The accounting result information determining module is used for acquiring the transaction information to be processed in the current accounting period through the Hbase database, carrying out detail accounting on the transaction information to be processed, and determining the accounting result information in the current accounting period;
the accounting information table determining module is used for determining an accounting information table of the current accounting period according to the accounting result information of the current accounting period and the accounting result information of the last accounting period stored in the Hbase database through the Hbase database;
the accounting external table storage module is used for determining an accounting external table of the HBase database according to the accounting information table of the current accounting period through Hive and storing the detail accounting external table in the HDFS according to the storage format and the storage path appointed by the accounting external table;
the column type storage table processing module is used for carrying out column conversion processing on the accounting external table through the HDFS so as to convert the accounting external table into a column type storage internal table, and extracting user detail account and transaction information accounting entry from the column type storage internal table;
and the enterprise general ledger information updating module is used for updating the enterprise general ledger information through the HDFS according to the user detail account and the transaction information accounting entry.
8. The apparatus of claim 7, wherein the accounting result information determination module comprises:
the transaction information storage unit is used for acquiring the transaction information to be processed in the current accounting period of the transaction system through the Hbase database, carrying out data storage on the transaction information to be processed in the current accounting period according to an LSM storage format, and generating a data file to be accounting according to a data storage result;
the measurement processing data determining unit is used for carrying out the initial confirmation processing of detail accounting on the transaction information to be processed in the data file to be accounted through the Hbase database, determining the transaction data of the current accounting period, carrying out the subsequent measurement processing of detail accounting on the transaction data of the current accounting period, and determining the measurement processing data of the current accounting period;
and the transaction data analysis unit is used for determining user account information, occurrence amount information and enterprise account information of the current accounting period according to the transaction data of the current accounting period through the Hbase database.
9. An electronic device, the electronic device comprising:
at least one processor; and
A memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the distributed system-based transaction information accounting method of any one of claims 1-6.
10. A computer readable storage medium storing computer instructions for causing a processor to implement the distributed system based transaction information accounting method of any one of claims 1-6 when executed.
CN202310215746.3A 2023-03-01 2023-03-01 Transaction information accounting method, device, equipment and medium based on distributed system Pending CN116450659A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310215746.3A CN116450659A (en) 2023-03-01 2023-03-01 Transaction information accounting method, device, equipment and medium based on distributed system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310215746.3A CN116450659A (en) 2023-03-01 2023-03-01 Transaction information accounting method, device, equipment and medium based on distributed system

Publications (1)

Publication Number Publication Date
CN116450659A true CN116450659A (en) 2023-07-18

Family

ID=87124589

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310215746.3A Pending CN116450659A (en) 2023-03-01 2023-03-01 Transaction information accounting method, device, equipment and medium based on distributed system

Country Status (1)

Country Link
CN (1) CN116450659A (en)

Similar Documents

Publication Publication Date Title
CN109034988B (en) Accounting entry generation method and device
CN111553656A (en) Capital settlement method and device based on big data, electronic equipment and medium
CN112613964A (en) Account checking method, account checking device, account checking equipment and storage medium
CN116167860A (en) Account checking processing method and device, electronic equipment and storage medium
CN116611411A (en) Business system report generation method, device, equipment and storage medium
CN117057795A (en) Account number-based account transfer method, device and equipment
CN116342304A (en) Data processing method, device, electronic equipment, system, medium and program product
CN116450659A (en) Transaction information accounting method, device, equipment and medium based on distributed system
CN115330540A (en) Method and device for processing transaction data
CN114896322A (en) JSON (Java Server object notation) -based configuration data conversion method, device, equipment and medium
CN113902415A (en) Financial data checking method and device, computer equipment and storage medium
CN115017875B (en) Enterprise information processing method, device, system, equipment and medium
CN117251433A (en) Power grid transaction account management method and device, electronic equipment and storage medium
CN116342280A (en) Data determination method and device, electronic equipment and storage medium
CN117150215B (en) Assessment result determining method and device, electronic equipment and storage medium
CN117272970B (en) Document generation method, device, equipment and storage medium
CN117994013A (en) Bank transaction knowledge graph construction method, device, equipment and medium
CN117009356A (en) Method, device and equipment for determining application success of public data
CN114862619A (en) Basic electricity charge processing method and device, electronic equipment and medium
CN116385150A (en) Credit information determining method, device, equipment, medium and product
CN117632138A (en) Attendance application form analysis method and device, electronic equipment and storage medium
CN117609625A (en) Data processing method, device, electronic equipment and storage medium
CN117609398A (en) Data processing method, device, equipment and storage medium
CN117667894A (en) Data migration method, device, electronic equipment and storage medium
CN118503224A (en) Object data storage processing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination