Method and apparatus for on-line processing of transaction data

Abstract: Transaction data (303) are generated at one or more terminal units (101) and transmitted to a transaction management system (102) which stacks such data until predetermined conditions occur, at which occurrence the stacked transaction data (304) are transmitted as a batch for processing. Confirmation of successful processing is then re-transmitted to the terminal units (101). The predetermined conditions for batch transfer may be expressed in terms of a maximum number of stacked transaction data (304) or a maximum time of stacking on both. By transferring transaction data for processing as a batch, the processing time can be reduced. As with standard transaction processing, it is important that processing operates in an all-or-nothing way and so appropriate storage of the transaction data and the record or records being changed to ensure that the original record may be restored if there is a failure of any part of the transaction processing. The method may be applied to a banking or lottery system.

Description: The present invention relates to a method of on-line processing of transaction data and to a system for on-line processing of such data. As is stated above, the present invention is concerned with on-line processing of transaction data. It should be appreciated immediately that transaction data are data used in transactions, and transaction processing is a specialized area. In such processing, a "transaction" is a single unit of work, which must be wholly completed or wholly aborted. Then, the unit of work of such a transaction involves the step supplying a request in the form of transaction data for the change of stored information, changing stored information, and confirming that the change has been made, with the transaction being aborted unless all the steps are performed correctly. Change of stored data includes addition of new data to the store. Furthermore, on-line transaction processing is normally concerned with the case where a very large number of transactions must be processed quickly. One example of on-line transaction processing is in the operation of a banking system, in which each transaction represents a single specific change to the records of the bank. Thus, a request for withdrawal of a specified sum from an account is processed by transmitting, normally from a remote site, a request to the bank's main records to withdraw that sum from the specified account, the changing of the amount in that account by the specified sum, and the confirmation to the remote site that the appropriate sum can be withdrawn. If any of these steps are not carried out correctly, then the whole of the transaction must be void. Thus, transaction processing exhibits what is known as "atomicity". Any change to the stored record must be on an all-or-nothing basis, so that if any transaction is void, the record must be restored to its original state. The system either performs all the changes to the record that the transaction specified, or it does none of them. In practice, this means that, when each transaction is processed, it is necessary that various stages of the processing be recorded to ensure that it is possible to return the system to its original state if the transaction is void. Thus, the system normally includes a data register (also sometimes known as a data log) which records the incoming transaction data, and also records data output as part of the transaction. Furthermore there is normally a file register (or file log) which records the initial state of the record to be changed prior to it being changed, and records the appropriate state of the record after it has been changed. Then, if there is failure, it is normally possible to restore all the stored records to their original state on the basis of the current state of the store, and the file register's recording of the record prior to its change. This is known as "backward recovery". sometimes, this cannot be used in which case it may be necessary to use a backup record and the file register of the changed record. This is known as "forward recovery". In themselves, such techniques of transaction processing are known. In existing transaction processing the transaction data are processed immediately they are received by a suitable processor. Thus, when transaction data is received, the appropriate stored information is changed, and suitable confirmation passed back to the site at which the transaction data originated. An example of such transaction processing is disclosed in the "Manual of TMS-4 V/SP Programming of HITAC Program Product VOS3", and in JP-A-62-145366. Another example of transaction processing exhibiting atomicity is disclosed in US-A-4819159. In this document there is disclosed a distributed processing system capable of "fault-tolerant processing" in which an error in processing is recognised and corrected. The system includes a plurality of processor units, at least one of which is capable of recognizing the failure of another processing unit, examining the transaction data contained in the disk associated with the faulty processing unit, and establishing control of that disk. In considering the standard methods of on-line transaction processing, it is important to realise that the volume of transactions received at the transaction processing site is extremely numerous. Furthermore, the transaction processing site will necessarily store a very large number of records, any one of which could be changed by a single transaction. In practice, this means that the records will be distributed over a number of storage media, and when a transaction is processed, it is first necessary to find the appropriate record within the transaction media. In order to read the appropriate records, some mechanical operations will be needed, and these are slow, compared with the processing itself. Therefore, the time taken to find the appropriate record within the storage media is relatively long, and thus this time becomes a major factor in the total time of processing the transaction. Since each transaction is then processed separately, a large proportion of the time of transaction processing is taken up in the step of identifying the transaction records to be changed by each of a series of transaction data. In US-A-4752910 there is disclosed a transactional data processing apparatus which stacks processed data in a temporary storage file. The processed data is transferred to a permanent storage file when a predetermined condition is satisfied prior to the time at which the temporary storage file has become filled with processed data. The transferring circuitry operates on a time-shared basis with other ongoing operations of the processing apparatus. Because no manual saving of the processed data on to a disk is required, the speed of the processing is increased. The teachings of this document, however, are still subject to the disadvantages explained above, because the data are processed singly, rather than as a batch. It is only after processing that the data are stacked as a batch. JP-A-63-94360 discloses a method of on-line processing of transaction data in which, when each transaction is received, a judgement is made as to whether the transaction should be batch processed, or not. If the transaction should not be batch processed, it undergoes normal processing. If it is to be batch processed, the transaction is stacked with other transactions. When the number of stacked transactions exceeds a predetermined number, or when a predetermined time has elapsed, the transactions in the stack are processed. According to the present invention as defined in claim 1 there is provided a method of on-line processing of transaction data comprising the steps of a) transmitting a multiplicity of transaction data from at least one transaction initiation site to a transaction processing site; b) stacking a plurality of the transmitted transaction data at said transaction processing site until predetermined conditions for said stacking exist for said stacked transaction data, the predetermined conditions being such as to indicate when a prerequisite has been satisfied for deciding to terminate the stacking procedure; c) transferring all said stacked transaction data to a processing means at said transaction processing site for processing when said predetermined conditions exist; and d) processing said transferred transaction data by use of said processing means; wherein said multiplicity of transaction data includes a plurality of different types of transaction data, and said predetermined conditions relate to the arrival of transaction data of a specified one of said types at said transaction processing site, whereby step (c) occurs when said transaction data of said specified one of said types arrives at said transaction processing site such as to satisfy said predetermined conditions relating to that type of transaction data. The present invention also relates to a system for transaction processing. Thus, according to claim 5, a second aspect of the present invention provides an on-line processing system for transaction data, comprising: at least one transaction initiation site for generating a multiplicity of transaction data; a transaction processing site for processing said multiplicity of transaction data, the transaction processing site including processing means for processing said transaction data; and transmission means for transmitting said transaction data from said transaction initiation site to said transaction processing site; wherein: said transaction processing site further includes: definition means defining predetermined conditions; stacking means for stacking a plurality of the transmitted transaction data at said transaction processing site until said predetermined conditions exist for said stacked transaction data, the predetermined conditions being predetermined conditions for said stacking and being such as to indicate when a prerequisite has been satisfied for deciding to terminate the stacking procedure; and transferring means for transferring all said stacked transaction data to said processing means for processing when said predetermined conditions exist; wherein said multiplicity of transaction data includes a plurality of different types of transaction data, and said predetermined conditions relate to the arrival of transaction data of a specified one of said types at said transaction processing site; and said transferring means is arranged to transfer said stacked data when said transaction data of said specified one of said types arrives at said transaction processing site such as to satisfy said predetermined conditions relating to that type of transaction data. Thus, it can be appreciated that the present invention is achievable either on the basis of a suitably programmed general purpose computer, or by dedicated systems. Embodiments of the present invention will now be described by way of example with reference to the accompanying drawings in which: Fig. 1 is a general schematic diagram of a known on-line transaction processing system; Fig. 2 shows a tree of interconnections of parts of an on-line transaction processing system which may incorporate the present invention; Fig. 3 is a block-diagram of part of a transaction processing site which may operate according to the present invention; Fig. 4 shows a general schematic diagram of an on-line transaction processing system incorporating the present invention; Figs. 5 is a flow-chart illustrating the processing occurring within the system of Fig. 4; Fig. 6 shows a data string which may be used in the transaction processing of the present invention; Fig. 7 shows schematically the relationship between data strings used in the present invention; and Fig. 8 shows memories and registers in an on-line processing system which may operate according to the present invention. Before describing embodiments of the present invention, it is helpful to understand the known methods of transaction processing. A summary of one known method will now be given with reference to Fig. 1. A terminal 101 requests transaction processing by generating transaction data. The terminal 101 transmits a request message 108 (i.e. transaction data) through communication lines to a transaction management system (which will be hereinafter referred to as a "TMS") 102. The TMS 102 having received the request message instantly starts transaction processing of the transaction data. In this transaction processing, the request message is first received (at 103) to process the following job. After the necessary journal information and the log information have been stored (at 104) in a disc unit, a data base (DB) is updated (at 105). After this, a response message (109) is transmitted (at 106), if necessary, and the transaction processing ends (at 107). Thus, in the known method, one transaction process occurs each time a transaction data (request message) is inputted, so that the transactions are inputted and processed one by one. In recent on-line systems (for e.g. financial business, securities business, seat reservations, stock control and lotteries) more complex systems and higher traffic densities for transaction processing are desired. Since, in the known transaction processing the transactions are processed one by one, the processing dynamic step number (i.e. the step number of programs to be executed) increases in proportion to the number of transactions, and the number of disc access operations for journal storage and for data base access in the processing of individual transaction are also proportional to the number of transactions so that a high throughput cannot be achieved. In the transaction processing of the present invention, a plurality of transaction data are batched and transferred as a batch for transaction processing. In transaction processing in which a plurality of transaction data are batched and transferred, the processing time for each transaction can be reduced by executing the processings of the individual transactions in as batched a form as possible, to improve the throughput of the system as a whole. In order to reduce the processing time of one transaction, the memory records or the like are batched and transmitted to reduce the number of dynamic steps of the processing of the transaction data so that the CPU processing time of one transaction can be reduced. The most effective way of improving the throughput is by use of a disc batch access in transaction processing. In the ordinary transaction processing, disc access is performed for acquiring journal/log information and to refer to and or update the data base. By batching these disc access operations for all the transferred transactions in a batch, the input/output (I/O) time per transaction can be drastically reduced. Since, in disc access involving a plurality of discs, the time to find the appropriate disc (the 'seek' time) is longer, by several times than the data transfer time or time to find the appropriate record on a pre-identified disc (the 'search time'), the I/O time can be reduced by having a single seek operation, by means of the present invention, as compared with the known methods in which a seek time is involved for each transaction data. As a result, a high throughput can be achieved while satisfying the demand response for each transaction. A high throughput can also be achieved for the transaction having no strict response demand. In the system in which transactions having strict and loose response demands are mixed, a high throughput can also be achieved in the whole system while satisfying the strict response demand for the transactions of the strict response demand. Fig. 2 shows an embodiment of the structure of an on-line system transaction processing system, to which the present invention is applied. The system shown in Fig. 2(a) controls several thousands of terminal units 101 distributed over a wide geographical spread. At the highest rank of this system, two host computers 201 are connected to act primarily as data base servers through a direct channel 202 to constitute a hot standby system. At lower ranks, front end processors (FEP) 203 are distributed and arranged at points where their main function is to control the terminal units 101. Since the FEPs 203 and the host computer 201 transmit/receive vast amounts of data, lines 204 used to connect them are fast digital lines or ISDN. Each FEP 203 is connected to several tens of terminals 101 through cleared lines 205. The majority of transactions are executed between the FEPs 203 and the terminals 101, but vast data transmissions/ receptions by batch processing occur between the FEPs 203 and the host computer 201. The transaction management system according to the present embodiment may be located in the FEPs required for high traffic transaction processing and/or in the host computers 201. The present invention can be applied not only to the system structure shown in Fig. 2(a) but also a system in which the terminal groups 101 below the FEPs 203 are connected through local area networks (LAN), as shown in Fig. 2(b), or a system in which the FEP groups 203 are connected to one another through a LAN 207, as shown in Fig. 2(c). Here, the LAN 207 of Fig. 2(c) need not be connected to the host 201. Moreover, the present invention can be used even when a demand for the transaction processing is received only from one terminal. Fig. 3 shows the basic hardware structure of an FEP 203 to which the system of the present invention is applied. The FEP has a memory 92 such as a ROM or RAM for storing e.g. a program, various tables; an input unit 93 such as a keyboard; a communication control unit 94 for controlling the communications to the terminal units 101; a disc unit 95 containing a plurality of discs with records stored therein forming a data base; and a CPU 91 for controlling all the foregoing units. A stack area for stacking the transactions is formed in the memory 92. Fig. 4 schematically shows an on-line transaction processing system according to the present embodiment. The present system has three main parts: a transaction initiation site formed by each of the terminal units 101 for inputting transactions 303; a transmission controller formed by TMS 102; and a batch transaction processing unit 110 including the individual transaction processing programs prepared by application programmers. The transaction messages 303 inputted from individual terminal units 101 are transferred as a batch to the transaction processing unit 110 when they are stacked to a specified number in the TMS 102 or when a specified time has elapsed after the first transaction stacked in a vacant stack area is received. In the transaction processing unit 110, batch messages 304 are received (at a reception unit 305), and the journal/log information of each transaction is stored as a batch (at logger 306). The corresponding data base is updated (by unit 307) to prepare a response message. This message is returned as a batch response message 310 to the TMS 102 (at 308). Then, the process is ended (at 309). In response to the batch response message 310, the TMS 102 returns a response message 311 to each terminal 101 and ends the transaction process for that batch. Of course, since this operation is transaction processing, it is necessary that checks are made to ensure that all operates correctly, as will be described later. In the present invention, however, the timing of the start of the batch processing is on the basis of the input of a transaction data of a specified type. Fig. 5 is a schematic flow showing the case in which there is transfer of all the transactions stacked when transaction data of a specified type are input, the stack being transferred as a whole to the transaction processing. First, input messages are received (at 501) from the terminal units 101, and a check is made (at step 502) to determine whether or not the messages are the predetermined specific transaction data. If NOT, the messages are stacked (at step 503) in the system. If YES, the transaction data stacked up to that time are transferred as a whole to the transaction processing, and this processing starts (at step 504). An input transaction format at this time is shown in Fig. 6. In order to discriminate the type of each transaction data, the message 502 of each transaction data string is preceded by a transaction identification (TID) 501. When an input message is generated, each terminal unit 101 sets TID in accordance with the type of transaction. The TMS then uses the TID to carry out the decision step 502 of Fig. 5. Fig. 7 shows the data structure of input messages which may be stacked. The example illustrates the case in which the messages are stacked for each type of transaction. Individual messages 702 are managed by a list structure for each type of transaction. A header 701 for each transaction has a TID 703, a message number 704, a start indicator 705 for indicating the first message and a final indicator 706 for indicating the final message. Moreover, each message is accompanied by an indicator indicating the next message. When the transaction processing starts, the messages are batched and transferred to the transaction processing by the start indicator 705 and the final indicator in the header 701. In the transaction processing, all the messages transferred can be referred by following the indicators 702 attached to the individual messages from the start of the start indicator 705. The final indicator 706 can be omitted if desired. Since the present invention is concerned with transaction processing, it is necessary for appropriate checks to be made at each stage, to ensure that the appropriate changes are made correctly. As was mentioned earlier, transaction processing must display atomicity, with the transactions being processed on an all-or-nothing basis. For this reason, recordings are made of the state of various operations in the transaction processing. This is shown by Fig. 8 which illustrates part of the transaction processing unit 110. In Fig. 8, a data bus 120 connects to a main data base memory 111, and the movement of data on the bus 120 is controlled by a processor 112. Apart from the necessary records, transaction data could move on the bus 110, for processing, to the data base 111, and from that database 111 back to complete the transaction. However, in practice there are a series of registers 113, 114, 115, 116, and a back-up data base 117. In practice, the registers 113 to 116 may be virtual memory areas in a larger memory, but it is preferable, for safety, that the records 113 to 116 be separate from the data base 111. Furthermore, the back-up data base 117 represents a memory in which the main data base 111 can periodically be down-loaded (e.g. at the end of each day), so that even if there is a full system failure the next day, a large part of the transaction record can be restored. The first register 113 is an input register for recording incoming transaction data. In a similar way, register 114 is a register for recording output data for the transaction. Each transaction normally involves the change of one specific record within the data base 111. Therefore, the register 115 records that record prior to change, whilst register 116 records that record after change. Thus, every step in the transaction processing is recorded, so that if there is a failure anywhere in the transaction processing, the data base 111 can be restored to its original state prior to the commencement of processing of that transaction. Such restoration is, in itself, known and will not be discussed in further detail. However, it should be noted that, with the present invention, a multiplicity of such registers may be needed, to enable the system to operate in a batch manner. In practice, it is likely that if there is a failure in the system, it will affect all the transactions of a batch, so that either all the transactions are successfully processed, or none of them are. However, it is possible for one or more transactions of the batch to fail, whilst the other transactions succeed, and thus it is necessary to have a record then of the specific transaction data that failed. This could be achieved, for example, by storing in the input register 113, with suitable addresses, all the transaction data of a batch, to enable any specific transaction data to be recovered if necessary. As was mentioned above, the system shown in Fig. 8 is controlled by a suitable processor 112. This processor must check that the transaction has been completed correctly, and if not it triggers the registers 113 to 116, and possibly the back-up data base 117 to restore the data base 111 to its original state. This may be by means of backward recovery or forward recovery as appropriate. As was mentioned earlier, the present invention is applicable to the on-line processing of a range of transactions. It may, for example, be used in banking systems, in which case each transaction represents an instruction to make a specific change to the record of a specific account. The present invention may also be applied to a lottery system, in which case the transaction is the purchase of a specific lottery number by a specific person, so that the transaction data is a request to associate a specific person with a specific lottery number.

Claims: A method of on-line processing of transaction data comprising the steps of: a) transmitting a multiplicity of transaction data from at least one transaction initiation site (101) to a transaction processing site (110); b) stacking a plurality of the transmitted transaction data at said transaction processing site (110) until predetermined conditions for said stacking exist for said stacked transaction data, the predetermined conditions being such as to indicate when a prerequisite has been satisfied for deciding to terminate the stacking procedure; c) transferring all said stacked transaction data to a processing means (305 to 309) at said transaction processing site (110) for processing when said predetermined conditions exist; and d) processing said transferred transaction data by use of said processing means (305 to 309); characterised in that: said multiplicity of transaction data includes a plurality of different types of transaction data, and said predetermined conditions relate to the arrival of transaction data of a specified one of said types at said transaction processing site, and in that step (c) occurs when said transaction data of said specified one of said types arrives at said transaction processing site such as to satisfy said predetermined conditions relating to that type of transaction data. A method of on-line processing of transaction data according to claim 1, wherein the processing of said transferred transaction data by said processing means (305 to 309) includes; e) changing a plurality of stored information items stored in a store (95, 111) to changed information items in said store (95, 111) on the basis of each of said plurality of transaction data; and f) confirming to said at least one initiation site (101) that said changed information items are stored in store (95, 111); and g) checking that each of said steps (a) to (c),(e) and (f) have been performed correctly and restoring said stored information items to their state prior to steps (a) to (c), (e) and (f) unless all of said steps (a) to (c), (e) and (f) have been correctly performed. A method according to claim 2, wherein prior to step (e) each of said plurality of stored information items is stored in a first register (115) whereby each of said plurality of stored information items is returned from said register (115) to said store (111) at said step (g) unless all of said steps (a) to (c), (e) and (f) are correctly performed. A method according to claim 2 or claim 3, wherein said step (e) includes storing each of said changed information items in a second register (116) in addition to said store (111), whereby each of said plurality of stored information items is restorable at said step (g) on the basis of said changed information items and said stacked transaction data. An on-line processing system for transaction data, comprising: at least one transaction initiation site (101) for generating a multiplicity of transaction data; a transaction processing site (110) for processing said multiplicity of transaction data, the transaction processing site (110) including processing means (305 to 309) for processing said transaction data; and transmission means for transmitting said transaction data from said transaction initiation site (101) to said transaction processing site (110); wherein: said transaction processing site (110) further includes: definition means (401 to 406, 501 to 504) defining predetermined conditions; stacking means (102) for stacking a plurality of the transmitted transaction data at said transaction processing site (110) until said predetermined conditions exist for said stacked transaction data, the predetermined conditions being predetermined conditions for said stacking and being such as to indicate when a prerequisite has been satisfied for deciding to terminate the stacking procedure; and transferring means (405, 504) for transferring all said stacked transaction data to said processing means (305 to 309) for processing when said predetermined conditions exist; characterised in that: said multiplicity of transaction data includes a plurality of different types of transaction data, and said predetermined conditions relate to the arrival of transaction data of a specified one of said types at said transaction processing site, and in that said transferring means is arranged to transfer said stacked data when said transaction data of said specified one of said types arrives at said transaction processing site such as to satisfy said predetermined conditions relating to that type of transaction data. An on-line processing system for transaction data according to claim 5, wherein the transaction processing means (305 to 309) further includes: a store (95, 111) for storing information items; changing means for changing a plurality of information items stored in a said store (95, 111) to changed information items in said store (95, 111) on the basis of each of said plurality of transaction data; confirmation means for confirming to said at least one initiation site (101) that said changed information items are stored in said store (95, 111); check means for checking that said transmission means, said stacking means, said transferring means, said changing means, and said confirmation means have operated correctly; and restoration means for restoring said changed information items to unchanged information items in said store unless said check means indicates correct operation of said transmission means, said stacking means, said transferring means, said changing means, and said confirmation means.

Inventors: ADACHI YOSHIAKI, HAYASHI KEIJIRO, SUEKI MASAO, WATAYA HIROSHI, ADACHI, YOSHIAKI, HAYASHI, KEIJIRO, SUEKI, MASAO, WATAYA, HIROSHI, WATAYA, HIROSHI, NARUSAWA APT. 4714
Applicants: HITACHI LTD, HITACHI, LTD.
Application year: 1990
Main classification: G06F17
IPC codes: G06F17, G06F15