WO2013189011A1 - 交易处理的方法和装置 - Google Patents

交易处理的方法和装置 Download PDF

Info

Publication number
WO2013189011A1
WO2013189011A1 PCT/CN2012/077078 CN2012077078W WO2013189011A1 WO 2013189011 A1 WO2013189011 A1 WO 2013189011A1 CN 2012077078 W CN2012077078 W CN 2012077078W WO 2013189011 A1 WO2013189011 A1 WO 2013189011A1
Authority
WO
WIPO (PCT)
Prior art keywords
account
book
temporary
record
real
Prior art date
Application number
PCT/CN2012/077078
Other languages
English (en)
French (fr)
Inventor
陈齐
李科
薛定胜
姜衡
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN2012800005112A priority Critical patent/CN102870134A/zh
Priority to PCT/CN2012/077078 priority patent/WO2013189011A1/zh
Publication of WO2013189011A1 publication Critical patent/WO2013189011A1/zh
Priority to US14/569,108 priority patent/US20150095220A1/en

Links

Classifications

    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/10Payment architectures specially adapted for electronic funds transfer [EFT] systems; specially adapted for home banking systems
    • 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
    • G06Q30/00Commerce
    • 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/12Accounting

Definitions

  • the present invention relates to the field of billing and, more particularly, to a method and apparatus for transaction processing. Background technique
  • Trial balance is an important task that the financial fund accounting system has to do on a regular basis. The purpose is to check the consistency, integrity and correctness of daily account changes and account (book) records for all accounts through aggregation, calculation and comparison. Sex. Therefore, the trial balance must be guaranteed and is a necessary condition for the completion of the day-end processing. This is a basic norm for the accounting treatment of the financial system.
  • the existing trial balance process often requires locking the real-time books to stop real-time transactions.
  • Embodiments of the present invention provide a method and apparatus for transaction processing, which can perform real-time transactions when the real-time books are not modifiable in the trial balance process.
  • an embodiment of the present invention provides a method for transaction processing, the method comprising: receiving a transaction request, and determining whether an account record of an account to be traded exists in a temporary account book when determining that the real-time account book is undergoing computationally intensive transaction processing, If yes, processing the transaction request based on the account record of the account to be traded in the temporary book, and updating the account record of the account to be traded in the temporary book according to the processing result; if not, reading the account from the real-time account book An account record of the trading account, processing the transaction request based on the account record of the to-be-traded account, and recording an account record of the to-be-traded account updated according to the processing result in the temporary account book; after the calculation-intensive transaction is finished, The real-time book is updated according to the temporary book, and after the update, the account record in the temporary book is deleted.
  • an embodiment of the present invention provides an apparatus for transaction processing, the apparatus comprising: a transaction processing module, configured to receive a transaction request, and determine that the real-time account book is accepting a computationally intensive transaction When processing, determining whether there is an account record of the account to be traded in the temporary book, and if so, processing the transaction request based on the account record of the account to be traded in the temporary book, and updating the pending transaction in the temporary book according to the processing result Account record of the account; if not, reading the account record of the account to be traded from the real-time account book, processing the transaction request based on the account record of the account to be traded, and recording in the temporary account book according to the processing result
  • the account record of the to-be-traded account an update module, configured to update the real-time account book according to the temporary book after the end of the computation-intensive transaction, and delete the account record in the temporary book after the update.
  • the method and apparatus for transaction processing when the real-time account book is undergoing computation-intensive transaction processing, processing the transaction request based on the temporary account book, and after the calculation-intensive transaction processing ends, according to the temporary account book pair
  • the real-time books are updated to achieve the purpose of real-time transactions when the real-time books are not modifiable during the process of computationally intensive transactions such as trial balance.
  • FIG. 1 is a schematic flow chart of a method of transaction processing according to an embodiment of the present invention.
  • FIG. 2 is a schematic flow chart of a method of transaction processing according to another embodiment of the present invention.
  • FIG. 3 is a schematic block diagram of an apparatus for transaction processing in accordance with an embodiment of the present invention.
  • FIG. 4 is a schematic block diagram of an apparatus for transaction processing according to another embodiment of the present invention. detailed description
  • FIG. 1 shows a schematic flow diagram of a method 100 of transaction processing in accordance with an embodiment of the present invention. As shown in FIG. 1, the method 100 includes:
  • the transaction processing device processes the transaction request based on the temporary book when it is determined that the real time book is undergoing computationally intensive transactions. Specifically, the transaction processing device receives the transaction request, and when determining that the real-time account book is accepting the computation-intensive transaction, first determining whether there is an account record of the account to be traded in the temporary account book, if there is an account record of the account to be traded in the temporary account book And processing the transaction request based on the account record of the account to be traded in the temporary account book, and updating the account record of the account to be traded in the temporary account book according to the processing result; if there is no account record of the account to be traded in the temporary account book, The account record of the account to be traded is read in the account book, the transaction request is processed based on the account record of the account to be traded, and the account record of the account to be traded updated according to the processing result is recorded in the temporary book.
  • the account record of the account to be traded is read from the real-time account book, and the pending transaction is recorded in the temporary account book after the transaction processing.
  • the account record of the account; the subsequent transaction processing of the account to be traded is performed based on the account record of the account to be traded in the temporary book, and the account record of the account to be traded in the temporary book is updated after the transaction is processed.
  • the transaction processing device updates the real-time account book according to the temporary book after the end of the computation-intensive transaction, and deletes the account record in the temporary book after the update.
  • the transaction processing method of the embodiment of the present invention processes the transaction request based on the temporary account book when the real-time account book is undergoing the computation-intensive transaction processing, and updates the real-time account book according to the temporary account book after the calculation-intensive transaction processing ends. Therefore, in the process of performing computationally intensive transaction processing such as trial balance, the real-time transaction can still be performed when the real-time account book cannot be modified.
  • the account due to the need to update account records only received during the computationally intensive transaction process The account records the account record of the associated transaction request, so the amount of calculation of the update operation of the technical solution provided by the embodiment of the present invention is lower than that of the operation method of updating all the account records in the real-time account book.
  • embodiments of the present invention can be applied to scenarios where various computationally intensive transactions conflict with real-time transactions.
  • a scenario in which a computational balance, a capital processing of an accounting system, and a financial analysis of an enterprise resource planning ("ERP") system, such as a financial analysis of a system, may conflict with a real-time transaction may be applied to the embodiment of the present invention.
  • ERP enterprise resource planning
  • the technical solution, that is, the above computationally intensive transaction may be a trial balance, a capital processing of an accounting system, or a financial analysis of an ERP system.
  • S120 specifically includes:
  • A1 When the temporary account book is not empty, read a predetermined number of account records in the temporary account book; A2. For each account record read, record the corresponding account in the real-time account book according to each account record. The record is updated, and after the update is completed, the account record is deleted;
  • the transaction processing device updates the account records in the temporary account book into the real-time account book in batches. That is, when the temporary book is not empty, each time a predetermined number of account records in the temporary book are read; for each account record read, the account records are recorded in the real-time book The corresponding account record is updated, and after the update is completed, the account record is deleted. When the temporary book is empty, the update is complete.
  • the number of scheduled updates for each batch can be adjusted based on the number of concurrent transactions. For example, if there are more concurrent transactions, the number of account records updated per batch can be reduced to reduce the blocking rate of concurrent transactions; if there are fewer concurrent transactions, the number of account records updated per batch can be increased. , reduce the total batch. It should be understood that the predetermined number of updates for each batch update may be a minimum of 1, and the maximum number of accounts recorded in the temporary account book may be that the account records in the temporary account book may be updated one by one to the real-time account book, or Update all batch account records.
  • the account records of the predetermined number are updated each time by means of batch update, so that other accounts that have not been updated during this period can be traded.
  • transactions during this period can be achieved by:
  • transactions during this period can also be achieved by:
  • the transaction processing method of the embodiment of the present invention not only does not need to copy all the account records in advance, but also further reduces the concurrent transaction by batch update in the update process after the end of the computationally intensive transaction processing. Blockage rate.
  • the method 100 further includes:
  • the transaction request is processed based on the account record of the account to be traded in the real-time account book, and the account record of the account to be traded in the real-time account book is updated according to the processing result.
  • the transaction processing device processes the transaction request based on the real-time account, that is, the normal transaction processing method is used.
  • the flow of the transaction processing is a conventional process of the prior art, and will not be described here.
  • the trial balance processing is based on real-time books, and the real-time books cannot be modified.
  • the transaction TO is processed first, and the specific process is as follows. 5201. Determine whether there is an account record of the account to be traded in the temporary account book. At time t0, the transaction TO needs to be performed, and the transaction processing device determines that the real-time account book is undergoing the trial balance processing, and therefore the transaction processing of the account A needs to be performed based on the temporary book. The transaction processing device first determines whether there is an account record of the account A in the temporary book, and since it is the first transaction during the trial period, the account record of the account A does not exist in the temporary account book.
  • the transaction processing device reads the Account A account record from the real time book.
  • S201 Determine whether there is an account record of the account to be traded in the temporary account book. Since it is the second transaction during the trial period, the account record of Account A already exists in the temporary account book.
  • processing business logic Complete the transaction T1's specific processing logic, that is, deduct 50 yuan from account A.
  • the transaction processing device updates the real time book according to the temporary book, and after the update, deletes the account record in the temporary book.
  • the account record of Account A is updated to the real-time account book in the temporary account book
  • the balance of Account A in the real-time book is the latest balance.
  • the trial balance is performed based on the real-time account book, and At the same time, real-time transactions for each sub-account are realized based on the temporary book, without interrupting real-time transactions.
  • the transaction processing method of the embodiment of the present invention can perform real-time transactions without realizing all account records in advance, and can reduce the blocking rate of concurrent transactions when the real-time books are not modifiable.
  • FIG. 3 shows a schematic block diagram of an apparatus 300 for transaction processing in accordance with an embodiment of the present invention.
  • the apparatus 300 includes:
  • the transaction processing module 310 is configured to receive a transaction request, and determine whether there is an account record of the account to be traded in the temporary account book when determining that the real-time account book is accepting the computation-intensive transaction, and if yes, based on the account to be traded in the temporary account book An account record, processing the transaction request, and updating an account record of the account to be traded in the temporary account book according to the processing result; if not, reading an account record of the account to be traded from the real-time account book, based on the account to be traded The account record processes the transaction request, and records the account record of the to-be-traded account updated according to the processing result in the temporary account book;
  • the update module 320 is configured to update the real-time account book according to the temporary book after the end of the computation-intensive transaction, and delete the account record in the temporary book after the update.
  • the transaction processing apparatus of the embodiment of the present invention processes the transaction request based on the temporary account book when the real-time account book is undergoing the computation-intensive transaction processing, and updates the real-time account book according to the temporary account book after the calculation-intensive transaction processing ends, thereby achieving
  • the real-time transaction can still be performed when the real-time account book cannot be modified.
  • the account record that needs to be updated is only an account record that receives a transaction request associated with the account record during the computationally intensive transaction process, the present invention is compared to an operation method that requires updating all account records in the real-time account book.
  • the update operation of the technical solution provided by the embodiment is less computationally intensive.
  • the transaction processing module 310 is further configured to: when determining that the real-time account book does not accept the computation-intensive transaction, and perform the transaction request based on the account record of the account to be traded in the real-time account book Processing, and updating the account record of the account to be traded in the real-time account book according to the processing result.
  • the update module 320 is specifically configured to: when the temporary account book is not empty, read a predetermined number of account records in the temporary account book, for each account read Recording, updating the corresponding account record in the real-time account book according to the account record, and deleting each account record after the update is completed. It should be understood that the update module 320 cyclically performs the above operations when the temporary book is not empty.
  • the apparatus 300 for transaction processing may correspond to an execution body of the method of transaction processing in the embodiment of the present invention, and the above and other operations and/or functions of the respective modules in the apparatus 300 are respectively implemented to implement FIG. 1 and The corresponding flow of each method in 2, for brevity, will not be repeated here.
  • the device for transaction processing in the embodiment of the present invention can perform real-time transactions without re-copying all account records in advance, so that the blocking rate of concurrent transactions can be reduced, and the batch update method is adopted. , can further reduce the blocking rate of concurrent transactions.
  • FIG. 4 shows a schematic block diagram of an apparatus 400 for transaction processing in accordance with another embodiment of the present invention.
  • the apparatus 400 includes:
  • the receiving module 410 is configured to receive a transaction request.
  • An account data reading and writing component 420 configured to read an account record of the account to be traded from the temporary account book if the account book of the account to be traded exists in the temporary account book when the real-time book is receiving the computation-intensive transaction, if If there is no account record of the account to be traded in the temporary account book, the account record of the account to be traded is read from the real-time account book, and
  • the processor 430 is configured to process the transaction request based on the account record of the account to be traded read by the account data reading and writing component 420;
  • the account data read and write component 420 is further configured to: when the real-time account book is accepting the computationally intensive transaction, if the account record of the account to be traded exists in the temporary account book, the to-be-processed after the processor 430 processes the transaction The account record of the account is updated into the temporary account book. If the account record of the account to be traded does not exist in the temporary account book, the account record of the account to be traded processed by the processor 430 is recorded in the temporary account book. And,
  • the account record of the to-be-traded account processed by the processor 430 is updated into the real-time account book;
  • the update module 440 is configured to update the real-time account book according to the temporary book after the end of the computation-intensive transaction, and delete the account record in the temporary book after the update.
  • the account data read and write component reads the pending transaction from the real-time account book.
  • Account record of the account after the processor finishes processing, update the processed account record to the real-time account book; during the trial balance, the account data reading and writing component reads the account record of the account to be traded from the temporary account book (if temporary If there is no account record of the account to be traded in the account book, the account record of the account to be traded is read from the real-time account book.
  • the processed account record is updated to the temporary account book (if there is no temporary account book yet) If the account record of the account to be traded is recorded, the processed account record is recorded to the temporary account book).
  • the account data reading and writing component may be a DAO (Data Access Object) class
  • the DAO class may select an account record from a real-time account or a temporary account book for different scenarios
  • the processor is The processed account records are written to the real-time books or temporary books.
  • the technical solution of the embodiment of the present invention can be implemented by modifying the DAO class, without any modification to the service layer, and the impact on the architecture is reduced to the maximum degree.
  • the embodiment of the present invention does not affect the business logic or the domain entity at the transaction level, and only needs to modify the DAO entity of the data access layer, which is advantageous for the transaction processing and the extension of the respective functions of the day-end processing; meanwhile, no new fields need to be added in the database, and Because real-time books are separated from temporary book records, even if there are a large number of concurrent transactions, performance is not affected.
  • the update module 440 is specifically configured to: when the temporary account book is not empty, read a predetermined number of account records in the temporary account book, for each account record read And updating the corresponding account record in the real-time account book according to the account record, and deleting each account record after the update ends. It should be understood that the update module 440 loops through the above operations when the temporary book is not empty.
  • the apparatus 400 for transaction processing may correspond to an execution body of the method of transaction processing in the embodiment of the present invention, and the above-described and other operations and/or functions of the respective modules in the apparatus 400 are respectively implemented to implement FIG. 1 and The corresponding processes of the respective methods in FIG. 2 are not described herein for the sake of brevity.
  • the transaction processing apparatus of the embodiment of the present invention processes the transaction request based on the temporary account book when the real-time account book is undergoing the computation-intensive transaction processing, and updates the real-time account book according to the temporary account book after the calculation-intensive transaction processing ends, thereby achieving
  • the real-time transaction can still be performed when the real-time account book cannot be modified.
  • the account record that needs to be updated is only an account record that receives a transaction request associated with the account record during the computationally intensive transaction process, the present invention is compared to an operation method that requires updating all account records in the real-time account book. The amount of calculation of the update operation of the technical solution provided by the embodiment is more Low.
  • the term "and/or” is merely an association describing the associated object, indicating that there may be three relationships.
  • a and / or B can mean: A exists separately, there are A and B, and there are three cases of B alone.
  • the character "/" in this article generally indicates that the contextual object is an "or" relationship.
  • the disclosed systems, devices, and methods may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, or an electrical, mechanical or other form of connection.
  • the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit is implemented in the form of a software functional unit and sold as a separate product When sold or used, it can be stored on a computer readable storage medium.
  • the technical solution of the present invention contributes in essence or to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like, which can store program codes. .

Landscapes

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

Abstract

本发明实施例公开了一种交易处理的方法和装置。该方法包括接收交易请求,在判定实时账簿正在接受计算密集型事务处理时,判断临时账簿中是否存在待交易账户的账户记录,若是,则基于临时账簿中待交易账户的账户记录,对交易请求进行处理,并根据处理结果更新该临时账簿中该账户记录;若否,则从该实时账簿中读取该待交易账户的账户记录,基于该待交易账户的账户记录对交易请求进行处理,并在该临时账簿中记录根据处理结果更新过的该账户记录;在计算密集型事务处理结束后,根据该临时账簿对该实时账簿进行更新,并在更新之后,删除该临时账簿中的账户记录。本技术方案可在试算平衡过程中当实时账簿不可修改时进行实时交易。

Description

交易处理的方法和装置 技术领域
本发明涉及计费领域, 并且更具体地, 涉及交易处理的方法和装置。 背景技术
试算平衡, 是金融资金核算系统定期要做的一项重要工作, 其目的就是 通过汇总、 计算和比较, 来检查所有账户每天资金变动和账证(簿)记录的 一致性、 完整性和正确性。 因此, 试算平衡是必须保证的, 是完成日终处理 的必要条件, 这是金融系统账务处理的一个基本规范。
在执行试算平衡的过程中, 如果进行实时交易, 会导致实时账簿中的账 户记录数据发生变化, 很容易使得试算平衡的结果不正确。 因此, 现有的试 算平衡处理过程往往需要对实时账簿进行锁定, 以此来中止实时交易。
然而, 实时账簿的数据量非常巨大, 致使整个试算平衡过程非常耗时。 在试算平衡过程中中止实时交易, 经常导致实时交易在很长时间内得不到处 理。 发明内容
本发明实施例提供了一种交易处理的方法和装置, 能够在试算平衡过程 中当实时账簿不可修改时仍能进行实时交易。
一方面, 本发明实施例提供了一种交易处理的方法, 该方法包括: 接收 交易请求, 在判定实时账簿正在接受计算密集型事务处理时, 判断临时账簿 中是否存在待交易账户的账户记录, 若是, 则基于临时账簿中待交易账户的 账户记录, 对交易请求进行处理, 并根据处理结果更新该临时账簿中该待交 易账户的账户记录;若否,则从该实时账簿中读取该待交易账户的账户记录, 基于该待交易账户的账户记录对交易请求进行处理, 并在该临时账簿中记录 根据处理结果更新过的该待交易账户的账户记录; 在计算密集型事务处理结 束后, 根据该临时账簿对该实时账簿进行更新, 并在更新之后, 删除该临时 账簿中的账户记录。
另一方面, 本发明实施例提供了一种交易处理的装置, 该装置包括: 交 易处理模块, 用于接收交易请求, 在判定实时账簿正在接受计算密集型事务 处理时, 判断临时账簿中是否存在待交易账户的账户记录, 若是, 则基于该 临时账簿中该待交易账户的账户记录, 对交易请求进行处理, 并根据处理结 果更新该临时账簿中该待交易账户的账户记录; 若否, 则从该实时账簿中读 取该待交易账户的账户记录,基于该待交易账户的账户记录对交易请求进行 处理, 并在该临时账簿中记录根据处理结果更新过的该待交易账户的账户记 录; 更新模块, 用于在计算密集型事务处理结束后, 根据该临时账簿对该实 时账簿进行更新, 并在更新之后, 删除该临时账簿中的账户记录。
基于上述技术方案, 本发明实施例的交易处理的方法和装置, 在实时账 簿正在接受计算密集型事务处理时, 基于临时账簿处理交易请求, 并在计算 密集型事务处理结束后, 根据临时账簿对实时账簿进行更新, 从而达到在进 行试算平衡等计算密集型事务处理的过程中, 当实时账簿不可修改时仍能进 行实时交易的目的。 附图说明
为了更清楚地说明本发明实施例的技术方案, 下面将对本发明实施例中 所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本 发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动的 前提下, 还可以根据这些附图获得其他的附图。
图 1是根据本发明实施例的交易处理的方法的示意性流程图。
图 2是根据本发明另一实施例的交易处理的方法的示意性流程图。
图 3是根据本发明实施例的交易处理的装置的示意性框图。
图 4是根据本发明另一实施例的交易处理的装置的示意性框图。 具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行 清楚、 完整地描述, 显然, 所描述的实施例是本发明的一部分实施例, 而不 是全部实施例。 基于本发明中的实施例, 本领域普通技术人员在没有作出创 造性劳动的前提下所获得的所有其他实施例, 都应属于本发明保护的范围。
图 1示出了根据本发明实施例的交易处理的方法 100的示意性流程图。 如图 1所示, 该方法 100包括:
S110,接收交易请求,在判定实时账簿正在接受计算密集型事务处理时, 判断临时账簿中是否存在待交易账户的账户记录, 若是, 则基于临时账簿中 待交易账户的账户记录, 对交易请求进行处理, 并根据处理结果更新该临时 账簿中该待交易账户的账户记录; 若否, 则从该实时账簿中读取该待交易账 户的账户记录, 基于该待交易账户的账户记录对交易请求进行处理, 并在该 临时账簿中记录根据处理结果更新过的该待交易账户的账户记录;
S120, 在计算密集型事务处理结束后, 根据该临时账簿对该实时账簿进 行更新, 并在更新之后, 删除该临时账簿中的账户记录。
在本发明实施例中, 交易处理的装置在判定实时账簿正在接受计算密集 型事务处理时, 基于临时账簿处理交易请求。 具体而言, 交易处理的装置接 收交易请求, 在判定实时账簿正在接受计算密集型事务处理时, 首先判断临 时账簿中是否存在待交易账户的账户记录, 若临时账簿中存在待交易账户的 账户记录,则基于临时账簿中待交易账户的账户记录,对交易请求进行处理, 并根据处理结果更新临时账簿中待交易账户的账户记录; 若临时账簿中不存 在待交易账户的账户记录, 则从实时账簿中读取待交易账户的账户记录, 基 于该待交易账户的账户记录对交易请求进行处理, 并在临时账簿中记录根据 处理结果更新过的待交易账户的账户记录。 也就是说, 在计算密集型事务处 理期间, 对于待交易账户的第一次交易处理, 从实时账簿中读取该待交易账 户的账户记录, 并在交易处理后在临时账簿中记录该待交易账户的账户记 录; 对于该待交易账户的后续的交易处理, 则基于临时账簿中该待交易账户 的账户记录进行, 并在交易处理后更新临时账簿中该待交易账户的账户记 录。
由于在计算密集型事务处理期间,发生过交易处理的账户的最新账户记 录保存在临时账簿中, 在计算密集型事务处理结束后, 需要将这些账户记录 更新到实时账簿中。 因此, 在本发明实施例中, 交易处理的装置在计算密集 型事务处理结束后,根据该临时账簿对该实时账簿进行更新,并在更新之后, 删除该临时账簿中的账户记录。
这样, 本发明实施例的交易处理的方法, 在实时账簿正在接受计算密集 型事务处理时, 基于临时账簿处理交易请求, 并在计算密集型事务处理结束 后, 根据临时账簿对实时账簿进行更新, 从而达到在进行试算平衡等计算密 集型事务处理的过程中, 当实时账簿不可修改时仍能进行实时交易的目的。 此外, 由于需要更新的账户记录仅为在计算密集型事务处理过程中接收到与 该账户记录相关联的交易请求的账户记录, 因此相比需要更新实时账簿中全 部账户记录的操作方法,本发明实施例提供的技术方案的更新操作的计算量 更低。
应理解,本发明实施例可以应用于各种计算密集型事务与实时交易存在 冲突的场景。 例如, 试算平衡、 会计系统的资金处理以及企业资源管理 ( Enterprise Resource Planning, 简称为 "ERP" )系统的财务分析等计算密集 型事务与实时交易存在冲突的场景, 都可以应用本发明实施例的技术方案, 即上述计算密集型事务可以是试算平衡、 会计系统的资金处理或者 ERP 系 统的财务分析。
在本发明实施例中, 可选地, S120具体包括:
A1、在该临时账簿不为空时,读取该临时账簿中的预定条数的账户记录; A2、对于读取的每一账户记录,根据该每一账户记录对该实时账簿中的 对应账户记录进行更新, 并在更新结束后, 删除该每一账户记录;
A3、 在该预定条数的账户记录更新结束后, 回到步骤 Al。
由于在计算密集型事务处理期间发生交易处理的账户可能会有多个, 因 此在临时账簿中相应的账户记录会有多条。 若同时复制到实时账簿中, 复制 时间会较长, 而处于复制过程中的账户不能交易。 因此,在本发明实施例中, 可选地, 交易处理的装置将临时账簿中的账户记录分批次更新到实时账簿 中。 即, 在该临时账簿不为空时, 每次读取该临时账簿中的预定条数的账户 记录; 对于读取的每一账户记录, 才艮据该每一账户记录对该实时账簿中的对 应账户记录进行更新, 并在更新结束后, 删除该每一账户记录。 在临时账簿 为空时, 更新完毕。 每个批次更新的预定条数可以根据并发交易的数目进行 调整。 例如, 若并发交易比较多, 可减少每个批次更新的账户记录的条数, 以减少并发交易的阻塞率; 若并发交易较少, 可增大每个批次更新的账户记 录的条数, 减少总批次。 应理解, 每个批次更新的预定条数最小可为 1 , 最 大可为临时账簿中所有的账户记录的条数, 即可以将临时账簿中的账户记录 一条一条地更新到实时账簿, 也可以将所有账户记录一批更新完。
在计算密集型事务处理结束后的更新过程期间, 由于釆用分批次更新的 方式, 每次更新预定条数的账户记录, 因此, 在这期间没有进行更新的其他 账户可以进行交易。 可选地, 在这期间的交易可以通过以下方式实现:
在判定该实时账簿正处于计算密集型事务处理结束后的更新状态中时, 判断临时账簿中是否存在待交易账户的账户记录, 若是, 则基于该临时账簿 中该待交易账户的账户记录, 对交易请求进行处理, 并根据处理结果更新该 临时账簿中该待交易账户的账户记录; 若否, 则从该实时账簿中读取该待交 易账户的账户记录, 基于该待交易账户的账户记录对交易请求进行处理, 并 在该临时账簿中记录根据处理结果更新过的该待交易账户的账户记录。
可选地, 在这期间的交易还可以通过以下方式实现:
在判定该实时账簿正处于计算密集型事务处理结束后的更新状态中时, 判断临时账簿中是否存在待交易账户的账户记录, 若是, 则基于该临时账簿 中该待交易账户的账户记录, 对交易请求进行处理, 并根据处理结果更新该 临时账簿中该待交易账户的账户记录; 若否, 则基于该实时账簿中该待交易 账户的账户记录, 对交易请求进行处理, 并根据处理结果更新该实时账簿中 该待交易账户的账户记录。
因此, 本发明实施例的交易处理的方法, 不仅不需要事先复制所有账户 记录, 而且, 在计算密集型事务处理结束后的更新过程中, 通过分批次更新 的方式, 进一步降低了并发交易的阻塞率。
在本发明实施例中, 可选地, 该方法 100还包括:
在判定该实时账簿未接受计算密集型事务处理时 ,基于该实时账簿中该 待交易账户的账户记录, 对交易请求进行处理, 并根据处理结果更新该实时 账簿中该待交易账户的账户记录。
在实时账簿未接受计算密集型事务处理时, 交易处理的装置基于实时账 簿处理交易请求, 即釆用正常交易处理方式。
下面结合图 2, 以试算平衡处理与实时交易并发的场景为例, 详细描述 本发明实施例的交易处理的方法。 应注意, 这些例子仅仅是为了帮助本领域 技术人员理解本发明的一些可能的实施方式, 而非穷尽地列举的所有实施方 式, 因而不能理解为对本发明范围的限制。
在非试算平衡期间, 交易处理的流程为现有技术的常规流程, 在此不再 赘述。 在试算平衡期间, 试算平衡处理基于实时账簿进行, 实时账簿不可修 改。 在此期间, 会有账户需要进行交易。 例如, 在 to时刻, 进行交易 TO, 准备对账户 A充值 100元; 在 tl刻时, 进行交易 T1 , 准备对账户 A扣款 50元, 其中, TO发生在 T1之前。
首先处理交易 TO, 具体流程如下。 5201 , 确定临时账簿中是否存在待交易账户的账户记录。 在 t0 时刻, 需要进行交易 TO, 交易处理的装置确定实时账簿正在接受试算平衡处理, 因此需要基于临时账簿对账户 A进行交易处理。交易处理的装置首先确定临 时账簿中是否存在账户 A的账户记录, 由于是在试算期间的第一次交易, 因 此临时账簿中不存在账户 A的账户记录。
5202,从实时账簿中读取账户记录。 因为临时账簿中不存在账户 A的账 户记录, 因此交易处理的装置从实时账簿中读取账户 A账户记录。
S204, 创建账户实体。 将读取的账户 A的账户记录提取到内存,创建账 户实体, 为业务处理做准备。
S205 , 处理业务逻辑。 完成交易 TO的具体处理逻辑, 即对账户 A充值 謂元。
S206,将账户记录记录到临时账簿。 由于账户 A的账户记录是从实时账 簿中读取的, 因此在业务处理后, 交易处理的装置将处理后的账户 A的账户 记录记录到临时账簿。
交易 TO处理完成之后, 试算平衡尚未结束, 在 tl时刻, 处理交易 T1 , 具体流程如下。
S201 , 确定临时账簿中是否存在待交易账户的账户记录。 由于是在试算 期间的第二次交易, 临时账簿中已经存在账户 A的账户记录。
5203 , 从临时账簿中读取账户记录。 因为临时账簿中已经存在账户 A 的账户记录, 因此从临时账簿中读取账户 A的账户记录。
5204, 创建账户实体。 将读取的账户 A的账户记录提取到内存,创建账 户实体, 为业务处理做准备。
5205 , 处理业务逻辑。 完成交易 T1的具体处理逻辑, 即对账户 A扣款 50元。
S207,将账户记录更新到临时账簿。 由于账户 A的账户记录是从临时账 簿中读取的, 因此在业务处理后, 交易处理的装置将处理后的账户 A的账户 记录更新到临时账簿。 此时临时账簿中账户 A的余额是最新余额。
在试算平衡处理结束后, 交易处理的装置根据临时账簿对实时账簿进行 更新, 并在更新之后, 删除临时账簿中的账户记录。 在临时账簿中账户 A的 账户记录更新到实时账簿中后, 实时账簿中账户 A的余额为最新余额。
在本发明实施例中, 试算平衡基于实时账簿进行, 并且, 在试算平衡的 同时, 基于临时账簿实现各分账户的实时交易, 不须中断实时交易。
因此, 本发明实施例的交易处理的方法, 不需事先复制所有账户记录, 可以在实时账簿不可修改时, 仍能进行实时交易, 从而能够降低并发交易的 阻塞率。
上文结合图 1和图 2,详细描述了根据本发明实施例的交易处理的方法, 下面结合图 3和图 4, 对根据本发明实施例的交易处理的装置进行描述。
图 3示出了根据本发明实施例的交易处理的装置 300的示意性框图。如 图 3所示, 该装置 300包括:
交易处理模块 310, 用于接收交易请求, 在判定实时账簿正在接受计算 密集型事务处理时,判断临时账簿中是否存在待交易账户的账户记录,若是, 则基于该临时账簿中该待交易账户的账户记录, 对交易请求进行处理, 并根 据处理结果更新该临时账簿中该待交易账户的账户记录; 若否, 则从该实时 账簿中读取该待交易账户的账户记录,基于该待交易账户的账户记录对交易 请求进行处理, 并在该临时账簿中记录根据处理结果更新过的该待交易账户 的账户记录;
更新模块 320, 用于在计算密集型事务处理结束后, 根据该临时账簿对 该实时账簿进行更新, 并在更新之后, 删除该临时账簿中的账户记录。
本发明实施例的交易处理的装置,在实时账簿正在接受计算密集型事务 处理时, 基于临时账簿处理交易请求, 并在计算密集型事务处理结束后, 根 据临时账簿对实时账簿进行更新,从而达到在进行试算平衡等计算密集型事 务处理的过程中, 当实时账簿不可修改时仍能进行实时交易的目的。 此外, 由于需要更新的账户记录仅为在计算密集型事务处理过程中接收到与该账 户记录相关联的交易请求的账户记录, 因此相比需要更新实时账簿中全部账 户记录的操作方法, 本发明实施例提供的技术方案的更新操作的计算量更 低。
在本发明实施例中, 可选地, 该交易处理模块 310还用于, 在判定该实 时账簿未接受计算密集型事务处理,基于该实时账簿中该待交易账户的账户 记录, 对交易请求进行处理, 并根据处理结果更新该实时账簿中该待交易账 户的账户记录。
在本发明实施例中, 可选地, 该更新模块 320具体用于, 在该临时账簿 不为空时, 读取该临时账簿中的预定条数的账户记录, 对于读取的每一账户 记录, 根据该每一账户记录对该实时账簿中的对应账户记录进行更新, 并在 更新结束后, 删除该每一账户记录。 应理解, 在临时账簿不为空时, 该更新 模块 320循环执行上述操作。
根据本发明实施例的交易处理的装置 300可对应于本发明实施例中交易 处理的方法的执行主体, 并且装置 300 中的各个模块的上述和其它操作和 / 或功能分别为了实现图 1和图 2中的各个方法的相应流程, 为了简洁, 在此 不再赘述。
本发明实施例的交易处理的装置, 不需事先复制所有账户记录, 可以在 实时账簿不可修改时,仍能进行实时交易,从而能够降低并发交易的阻塞率, 而且, 通过分批次更新的方式, 能够进一步降低并发交易的阻塞率。
图 4示出了根据本发明另一实施例的交易处理的装置 400 的示意性框 图。 如图 4所示, 该装置 400包括:
接收模块 410, 用于接收交易请求;
账户数据读写组件 420, 用于在实时账簿正在接受计算密集型事务处理 时, 若临时账簿中存在待交易账户的账户记录, 则从该临时账簿中读取该待 交易账户的账户记录, 若临时账簿中不存在待交易账户的账户记录, 则从该 实时账簿中读取该待交易账户的账户记录, 并且
在该实时账簿未接受计算密集型事务处理时,从该实时账簿中读取该待 交易账户的账户记录;
处理器 430, 用于基于该账户数据读写组件 420读取的该待交易账户的 账户记录对交易请求进行处理;
该账户数据读写组件 420还用于,在该实时账簿正在接受计算密集型事 务处理时,若该临时账簿中存在该待交易账户的账户记录,则将该处理器 430 处理后的该待交易账户的账户记录更新到该临时账簿中, 若该若临时账簿中 不存在该待交易账户的账户记录, 则将该处理器 430处理后的该待交易账户 的账户记录记录到该临时账簿中, 并且,
在该实时账簿未接受计算密集型事务处理时,将该处理器 430处理后的 该待交易账户的账户记录更新到该实时账簿中;
更新模块 440, 用于在计算密集型事务处理结束后, 根据该临时账簿对 该实时账簿进行更新, 并在更新之后, 删除该临时账簿中的账户记录。
例如, 在非试算平衡期间, 账户数据读写组件从实时账簿中读取待交易 账户的账户记录, 在处理器处理完后, 再将处理后的账户记录更新到实时账 簿; 在试算平衡期间, 账户数据读写组件从临时账簿中读取待交易账户的账 户记录(若临时账簿中没有待交易账户的账户记录, 则从实时账簿中读取待 交易账户的账户记录), 在处理器处理完后, 再将处理后的账户记录更新到 临时账簿(若临时账簿中还没有待交易账户的账户记录, 则将处理后的账户 记录记录到临时账簿)。
在本发明实施例中,可选地,账户数据读写组件可以为 DAO( Data Access Object )类, 该 DAO类可以针对不同场景选择从实时账簿或临时账簿中读 取账户记录, 并将处理器处理后的账户记录写入实时账簿或临时账簿。 本发 明实施例的技术方案通过修改 DAO类即可实现,不需对业务层做任何修改, 对架构的影响降低到最 ' j、程度。
本发明实施例不影响交易层面的业务逻辑或领域实体,只须修改数据访 问层的 D A O实体, 有利于交易处理和日终处理各自功能的扩展; 同时数据 库中也不需增加新的字段, 并且, 由于实时账簿与临时账簿读写分离, 即便 有大量并发交易, 也不影响性能。
在本发明实施例中, 可选地, 该更新模块 440具体用于, 在该临时账簿 不为空时, 读取该临时账簿中的预定条数的账户记录, 对于读取的每一账户 记录, 根据该每一账户记录对该实时账簿中的对应账户记录进行更新, 并在 更新结束后, 删除该每一账户记录。 应理解, 在临时账簿不为空时, 该更新 模块 440循环执行上述操作。
根据本发明实施例的交易处理的装置 400可对应于本发明实施例中交易 处理的方法的执行主体, 并且该装置 400中的各个模块的上述和其它操作和 /或功能分别为了实现图 1和图 2中的各个方法的相应流程,为了简洁,在此 不再赘述。
本发明实施例的交易处理的装置,在实时账簿正在接受计算密集型事务 处理时, 基于临时账簿处理交易请求, 并在计算密集型事务处理结束后, 根 据临时账簿对实时账簿进行更新,从而达到在进行试算平衡等计算密集型事 务处理的过程中, 当实时账簿不可修改时仍能进行实时交易的目的。 此外, 由于需要更新的账户记录仅为在计算密集型事务处理过程中接收到与该账 户记录相关联的交易请求的账户记录, 因此相比需要更新实时账簿中全部账 户记录的操作方法, 本发明实施例提供的技术方案的更新操作的计算量更 低。
应理解, 在本发明实施例中, 术语 "和 /或"仅仅是一种描述关联对象的 关联关系, 表示可以存在三种关系。 例如, A和 /或 B, 可以表示: 单独存在 A, 同时存在 A和 B, 单独存在 B这三种情况。 另外, 本文中字符 "/" , 一 般表示前后关联对象是一种 "或" 的关系。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各 示例的单元及算法步骤, 能够以电子硬件、 计算机软件或者二者的结合来实 现, 为了清楚地说明硬件和软件的可互换性, 在上述说明中已经按照功能一 般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执 行, 取决于技术方案的特定应用和设计约束条件。 专业技术人员可以对每个 特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超 出本发明的范围。
所属领域的技术人员可以清楚地了解到, 为了描述的方便和简洁, 上述 描述的系统、 装置和单元的具体工作过程, 可以参考前述方法实施例中的对 应过程, 在此不再赘述。
在本申请所提供的几个实施例中, 应该理解到, 所揭露的系统、 装置和 方法, 可以通过其它的方式实现。 例如, 以上所描述的装置实施例仅仅是示 意性的, 例如, 所述单元的划分, 仅仅为一种逻辑功能划分, 实际实现时可 以有另外的划分方式, 例如多个单元或组件可以结合或者可以集成到另一个 系统, 或一些特征可以忽略, 或不执行。 另外, 所显示或讨论的相互之间的 耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或 通信连接, 也可以是电的, 机械的或其它的形式连接。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作 为单元显示的部件可以是或者也可以不是物理单元, 即可以位于一个地方, 或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或 者全部单元来实现本发明实施例方案的目的。
另外, 在本发明各个实施例中的各功能单元可以集成在一个处理单元 中, 也可以是各个单元单独物理存在, 也可以是两个或两个以上单元集成在 一个单元中。 上述集成的单元既可以釆用硬件的形式实现, 也可以釆用软件 功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销 售或使用时, 可以存储在一个计算机可读取存储介质中。 基于这样的理解, 本发明的技术方案本质上或者说对现有技术做出贡献的部分, 或者该技术方 案的全部或部分可以以软件产品的形式体现出来, 该计算机软件产品存储在 一个存储介质中, 包括若干指令用以使得一台计算机设备 (可以是个人计算 机, 服务器, 或者网络设备等)执行本发明各个实施例所述方法的全部或部 分步骤。 而前述的存储介质包括: U盘、 移动硬盘、 只读存储器(ROM, Read-Only Memory )、 随机存取存储器 ( RAM, Random Access Memory )、 磁碟或者光盘等各种可以存储程序代码的介质。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局限 于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易 想到各种等效的修改或替换, 这些修改或替换都应涵盖在本发明的保护范围 之内。 因此, 本发明的保护范围应以权利要求的保护范围为准。

Claims

权利要求
1、 一种交易处理的方法, 其特征在于, 包括:
接收交易请求, 在判定实时账簿正在接受计算密集型事务处理时, 判断 临时账簿中是否存在待交易账户的账户记录, 若是, 则基于临时账簿中待交 易账户的账户记录, 对交易请求进行处理, 并根据处理结果更新所述临时账 簿中所述待交易账户的账户记录; 若否, 则从所述实时账簿中读取所述待交 易账户的账户记录, 基于所述待交易账户的账户记录对交易请求进行处理, 并在所述临时账簿中记录根据处理结果更新过的所述待交易账户的账户记 录;
在计算密集型事务处理结束后,根据所述临时账簿对所述实时账簿进行 更新, 并在更新之后, 删除所述临时账簿中的账户记录。
2、 根据权利要求 1所述的方法, 其特征在于, 所述方法还包括: 在判定所述实时账簿未接受计算密集型事务处理时,基于所述实时账簿 中所述待交易账户的账户记录, 对交易请求进行处理, 并根据处理结果更新 所述实时账簿中所述待交易账户的账户记录。
3、 根据权利要求 1或 2所述的方法, 其特征在于, 所述在计算密集型 事务处理结束后, 根据所述临时账簿对所述实时账簿进行更新, 并在更新之 后, 删除所述临时账簿中的账户记录, 具体包括:
Al、在所述临时账簿不为空时,读取所述临时账簿中的预定条数的账户 记录;
A2、对于读取的每一账户记录,根据所述每一账户记录对所述实时账簿 中的对应账户记录进行更新, 并在更新结束后, 删除所述每一账户记录; A3、 在所述预定条数的账户记录更新结束后, 回到步骤 Al。
4、 一种交易处理的装置, 其特征在于, 包括:
交易处理模块, 用于接收交易请求, 在判定实时账簿正在接受计算密集 型事务处理时, 判断临时账簿中是否存在待交易账户的账户记录, 若是, 则 基于所述临时账簿中所述待交易账户的账户记录, 对交易请求进行处理, 并 根据处理结果更新所述临时账簿中所述待交易账户的账户记录; 若否, 则从 所述实时账簿中读取所述待交易账户的账户记录,基于所述待交易账户的账 户记录对交易请求进行处理, 并在所述临时账簿中记录根据处理结果更新过 的所述待交易账户的账户记录; 更新模块, 用于在计算密集型事务处理结束后, 根据所述临时账簿对所 述实时账簿进行更新, 并在更新之后, 删除所述临时账簿中的账户记录。
5、 根据权利要求 4所述的装置, 其特征在于, 所述交易处理模块还用 于, 在判定所述实时账簿未接受计算密集型事务处理时, 基于所述实时账簿 中所述待交易账户的账户记录, 对交易请求进行处理, 并根据处理结果更新 所述实时账簿中所述待交易账户的账户记录。
6、 根据权利要求 4或 5所述的装置, 其特征在于, 所述更新模块具体 用于, 在所述临时账簿不为空时, 读取所述临时账簿中的预定条数的账户记 录, 对于读取的每一账户记录, 根据所述每一账户记录对所述实时账簿中的 对应账户记录进行更新, 并在更新结束后, 删除所述每一账户记录。
PCT/CN2012/077078 2012-06-18 2012-06-18 交易处理的方法和装置 WO2013189011A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN2012800005112A CN102870134A (zh) 2012-06-18 2012-06-18 交易处理的方法和装置
PCT/CN2012/077078 WO2013189011A1 (zh) 2012-06-18 2012-06-18 交易处理的方法和装置
US14/569,108 US20150095220A1 (en) 2012-06-18 2014-12-12 Method and apparatus for transaction processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2012/077078 WO2013189011A1 (zh) 2012-06-18 2012-06-18 交易处理的方法和装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/569,108 Continuation US20150095220A1 (en) 2012-06-18 2014-12-12 Method and apparatus for transaction processing

Publications (1)

Publication Number Publication Date
WO2013189011A1 true WO2013189011A1 (zh) 2013-12-27

Family

ID=47447749

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/077078 WO2013189011A1 (zh) 2012-06-18 2012-06-18 交易处理的方法和装置

Country Status (3)

Country Link
US (1) US20150095220A1 (zh)
CN (1) CN102870134A (zh)
WO (1) WO2013189011A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105488675B (zh) * 2015-11-25 2019-12-24 布比(北京)网络技术有限公司 一种区块链的分布式共享总账构建方法
CN109784930B (zh) * 2019-02-18 2023-07-18 深圳市迅雷网络技术有限公司 一种区块链交易数据的处理方法、装置、电子设备及介质
WO2024096770A1 (en) * 2022-11-02 2024-05-10 Telefonaktiebolaget Lm Ericsson (Publ) Method and apparatus for recording transactions against accounts in an account database

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1521672A (zh) * 2003-01-30 2004-08-18 李凤芝 小额收付系统
CN101477667A (zh) * 2009-01-19 2009-07-08 阿里巴巴集团控股有限公司 交易数据处理方法及系统
CN101620703A (zh) * 2008-07-04 2010-01-06 阿里巴巴集团控股有限公司 一种缓冲记账方法及装置
US20100138339A1 (en) * 2000-03-28 2010-06-03 Richard Adelson Method and system for an online-like account processing and management
CN101841421A (zh) * 2009-03-19 2010-09-22 华为技术有限公司 在线计费方法、装置和系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100138339A1 (en) * 2000-03-28 2010-06-03 Richard Adelson Method and system for an online-like account processing and management
CN1521672A (zh) * 2003-01-30 2004-08-18 李凤芝 小额收付系统
CN101620703A (zh) * 2008-07-04 2010-01-06 阿里巴巴集团控股有限公司 一种缓冲记账方法及装置
CN101477667A (zh) * 2009-01-19 2009-07-08 阿里巴巴集团控股有限公司 交易数据处理方法及系统
CN101841421A (zh) * 2009-03-19 2010-09-22 华为技术有限公司 在线计费方法、装置和系统

Also Published As

Publication number Publication date
CN102870134A (zh) 2013-01-09
US20150095220A1 (en) 2015-04-02

Similar Documents

Publication Publication Date Title
JP2011527057A (ja) バッファされた簿記
CN107358525B (zh) 一种账户交易方法和装置
CN107392582B (zh) 资源转移的实现方法和装置、收付款的实现方法和装置
CN110188110A (zh) 一种构建分布式锁的方法及装置
WO2023160077A1 (zh) 区块链数据恢复方法及装置、电子设备
CN104537563B (zh) 一种额度数据处理方法及服务器
CN108415758B (zh) 分布式事务协调方法及装置
JP2018538634A (ja) データベース動作方法及び装置
WO2013189011A1 (zh) 交易处理的方法和装置
CN109325073B (zh) 分布式事务的实现方法和装置
CN109472680A (zh) 一种账务处理方法及系统
CN109829815B (zh) 收款代理方法、设备和存储介质
CN112559496A (zh) 一种分布式数据库事务原子性实现方法及装置
CN104599177A (zh) 额度资源处理方法、联机交易处理方法及装置
WO2023078097A1 (zh) 一种区块链攻击拦截方法及装置
US20170177615A1 (en) TRANSACTION MANAGEMENT METHOD FOR ENHANCING DATA STABILITY OF NoSQL DATABASE BASED ON DISTRIBUTED FILE SYSTEM
CN114217978B (zh) 一种基于乐观锁的数据库事务处理方法、系统、计算设备和计算机可读存储介质
US9652766B1 (en) Managing data stored in memory locations having size limitations
CN110532069A (zh) 一种分布式事务提交方法及装置
WO2019232679A1 (zh) 基于时间维度进行加密数字资产的切分锁定及合并控制方法
TWI701631B (zh) 資金追償的方法及裝置
CN113391933A (zh) 一种处理资金的方法
CN109447777B (zh) 财务数据处理方法、装置、电子设备及可读介质
CN111192088A (zh) 积分的结算对象确定方法及装置和计算机可读存储介质
CN112669151A (zh) 一种多系统协同业务处理的方法及设备

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201280000511.2

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12879457

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12879457

Country of ref document: EP

Kind code of ref document: A1