DATA PROCESSING METHOD AND APPARATUS

Abstract: A data terminal (22) includes a memory (72) and data entry means (30, 32) operable to generate transaction data identifying an operator of the terminal (22) and the type of transaction. A time of day means continuously outputs data representing the date, hour and minute. A processor (68) is arranged to reduce the amount of data that is to be stored as a result of a data entry operation. Redundant data, such as data and hour, which may not change for successive data entries is stored in a first storage area of the memory, while non-redundant data, such as the minute, is stored in a second storage area of the memory (72). For each successive data entry there is stored only the non-redundant data and any redundant data that may have changed from the preceding entry.

Description: DATA PROCESSING METHOD AND APPARATUS Technical Field The present invention relates generally to a data processing method and apparatus, and has particular application to a data terminal device having data entry means operable to generate transaction data identifying an operator of said data entry means and identifying the type of transaction represented by the operation of said data entry means. Background Art In modern on-line data processing systems in which data is generated by remote data processing devices, cost is always a factor in the purchase of the system. One of the areas of cost is the amount of memory associated with the terminal device. In order to fully utilize the memory capacity found in today's terminal devices, various methods for compacting the data when stored in the memory have been devised. For example, in U.S. Patents Nos. 3,694,813, 3,717,851 and 3,925,780, data processing techniques using variable length codes to encode data in order to reduce the amount of data that is to be stored are disclosed. Since these techniques are directed for use with a central processing unit, their use by a stand-alone data terminal device which generates data independently of the processing unit would not be economically feasible. Disclosure of the Invention It is an object of the present invention to provide a low-cost data processing method and apparatus capable of reducing the amount of transaction data that is to be stored in storage means as a result of a data entry operation without losing any of the transactional detail. According to one aspect of the invention there is provided in a data terminal device which generates a plurality of data records, a method for processing each said data record characterized in that a first data portion of the data record is compared with data stored in a first storage area of a storage means, data forming at least part of said first data portion and not found in said first storage area as a result of such comparison is stored in said first storage area and in a second storage area of said storage means, and a second data portion of the data record is stored in said second storage area only. According to another aspect of the invention there is provided a data terminal device including data storage means and data entry means operable to generate transaction data identifying an operator of said data entry means and identifying the type of transaction represented by the operation of said data entry means, characterized by time of day means arranged to output data representing the date, the hour and the minute, and processing means arranged to carry out the following operations in response to operation of said data- entry means: comparison of the current date data with date data stored in a first storage area of said storage means; storage of the current date and hour data in said first storage area and in a second storage area of said storage means, and storage of said transaction data and the current minute data in said second storage area, if the compared date data are not the same; comparison of the current hour data with hour data stored in said first storage area if the compared date data are the same; storage of the current hour data in said first storage area and in said second storage area, and storage of said transaction data and the current minute data in said second storage area, if the compared hour data are not the same; and storage of said transaction data and the current minute data in said second storage area if the compared hour data are the same. One embodiment of a data terminal device in accordance with this invention includes a circular buffer in which is stored data, such as data pertaining to the time an employee checks in and checks out, thereby providing a work record. The terminal includes a time of day circuit which continuously outputs time data including the current date, hour and minute. In storing the data, a first data entry includes redundant data such as the date and hour and non-redundant data such as the minute of the terminal operation. The term "redundant", as used in this description of the invention, refers to data which may remain the same for successive data entries, while "non-redundant" refers to data which varies between data entries. Subsequent data entries will result in the storing in the the buffer of only the non-redundant data, such as the minute that pertains to the check in or transaction, together with data identifying the employee. In transferring the stored data from the circular buffer to a central processing unit, the date/hour redundant data that has not • changed between entries is stored in a pointer which is used to read out the non-redundant data stored in the circular buffer. As part of the read-out operation, the pointer will add such redundant date/hour data together with a sequence number to the non-redundant data being read out of the buffer. As the hour changes, such change is stored at the appropriate location in the buffer. When reading out the changed data, the changed data is transferred for storage in the pointer which will then add such changed data to the data subsequently read out of the buffer by the pointer. Brief Description of the Drawings The above-mentioned embodiment of the invention will now be described in more detail with reference to the accompanying drawings, in which:- Fig. 1 is a block diagram of a data processing system in which the data terminal device in accordance with the present invention is located; Fig. 2 is a perspective view of the terminal device; Fig. 3 is a plan view of the keyboard of the terminal device;- Fig. 4 is a block diagram of the terminal device; Fig. 5 is a block diagram illustrating the functional portions of-a typical transaction record generated as a result of a terminal operation which is stored in the circular buffer; Fig. 6 is a block diagram of a date/hour record stored in the circular buffer; Fig. 7 is a block diagram of an hour record stored in the circular buffer; Fig. 8 shows the construction of an employee I.D. table located in a RAM memory unit of the terminal device; Fig. 9 shows the construction of the circular buffer together with the data stored in start and end of buffer pointers; Fig. 10A and 10B taken together form a schematic flow diagram illustrating the storing of transaction data in the circular buffer during which the data is compressed; and Fig. 11A and 11B taken together form a schematic flow diagram illustrating the recovery of the compressed data stored in the circular buffer. Best Mode for Carrying Out the Invention Referring now to Fig. 1, there is shown a block diagram of a data processing system which includes a central processing unit (CPU) 20 and a plurality of remote data terminal devices (DTD) 22 each of which is connected by a bus 24 to a data transmission channel 26 over which data is exchanged between the CPU 20 and the terminal devices 22. In the present embodiment, one of the terminal devices 22 comprises a time and attendance terminal which is used for entering, storing, and transmitting clocking transactions associated with employee work periods, providing accurate time records of such transactions and also recalling previous transactions. Referring now to Fig. 2 there is shown ' a perspective view of the time and attendance terminal device 22 in which the present invention is found. The terminal 22 is normally secured to a wall partition by any conventional mounting means and includes a 15 key keyboard 32, a two-line by 16-character back-lighted LCD display 34 and a slot portion generally indicated by the numeral 36 into which a magnetic stripe record card (not shown) is " inserted and moved by the employee to be read by a magnetic stripe card reader 30 (Fig. 4) located within the terminal device 22 for entering the employee I.D. number into the device. As shown more clearly in Fig. 3, the keyboard 32 includes function and transaction keys 40, 42 and 44, a clear key 46, a shift key 48 and the numerical keys 50 of a ten-key portion of the keyboard. There is further included in the keyboard a logo portion 38 which contains data identifying the function of the keys 40, 42 and 44. As indicated in the logo portion 38, the keys 40-44 inclusive represent the functions A (Arrive)/L(Leave) , Meal and Break, respectively. Upon depressing the shift key 48, the keys 40-44 inclusive functionally represent Recall, Schedule and Department respectively. Referring now to Fig. 4, there is shown a block diagram of the time and attendance terminal device 22. Included in the terminal device is a power supply section 52 comprising a five-volt voltage regulator 54 for outputting five volts potential over line 56, a memory battery back-up voltage supply 58 for supplying voltage to a RAM memory unit 72 and a time of day (TOD) circuit 76 in case of a power failure, a plus or minus 12 volt DC-DC voltage supply 60 and a DC to AC inverter 62 which outputs 90 volts AC over line 64 to operate the illumination of the display 34. The terminal device 22 further includes an INTEL 80C31 microcontroller 68, an INTEL 27C64 ROM program memory 70, a Toshiba 5564 APL RAM data memory 72, a Texas Instruments 74 HC 139 chip select circuit 74 and a Signetics PCB 8573 time of day (TOD) circuit 76. The circuits are interconnected by the busses 78 and 79 in a manner that is well known in the art. The INTEL circuits are commercially available from the INTEL Corporation of Santa Clara, California, U.S.A., the Texas Instruments circuit is commercially available from the Texas Instruments Inc. of Dallas, Texas, U.S.A., the Toshiba memory is commercially available from the Toshiba Corporation of Tustin, California, U.S.A., and the Signetics circuit is commercially available from the Signetics Corporation of Sunnyvale, California, U.S.A. The terminal device further includes a communication section 80 which includes a RS-232 line driver and receiver 82 and a RS-422 line driver and receiver 84 for controlling the transfer of data over the transmission lines 86-89 inclusive between the CPU 20 (Fig. 1) and the time and attendance terminal device 22 in a manner that will be described more fully hereinafter. The time and attendance terminal device 22 also includes a multiplexer 90, the keyboard 32 (Figs. 2 and 3), the magnetic stripe card reader 30, the display 34 (Figs. 2 and 3) and a speaker 92. The time of day circuit 76 outputs over line 94 data bits representing the current time of day, namely date, hour and minute, to the microcontroller 68. The RAM data memory 72 and the time of day circuit 76 are connected to the battery back-up voltage supply 58 so that the data is retained and is current upon an interruption in the normal power supply circuit 60 and 62. The communication lines 86-88 inclusive are part of the bus 24 (Fig. 1) . As will be explained more fully hereinafter, an employee enters his/her employee number by means of the keys 50 of the keyboard 32 or by the use of the magnetic stripe card (not shown) in the manner that is well known in the art. As the employee number is entered into the terminal, the display 34 will display the number as it is entered. The employee then depresses one of the transaction keys 40-44 inclusive which identifies the type of transaction that is being entered. The time and attendance terminal device will perform a check digit verification of the employee number and the display 34 will display the employee number and a six-character mnemonic corresponding to the transaction key 40-44 inclusive which is depressed. The generated data including the time of day is then compressed if appropriate and stored in the RAM memory unit 72. At various times throughout the day, the CPU 20 will request that the data stored in the memory unit 72 be transferred over bus 24 (Fig. 1) and the communication channel 26 to the CPU. As part of this operation, the compressed data is restored to its original form. Other operations of the terminal include a recall operation in which the previous terminal transactions associated with the employee are displayed on the display 34 (Figs. 2 and 3) upon the actuation of the transaction key 40 (Fig. 2) used in conjunction with the operation of the shift key 48. Depressing the transaction key 42 and the shift key 48 will also display the work schedule of the employee which is obtained from the CPU 20. In case the employee's department number has to be changed, depression of the transaction key 44 will occur after the new department number has been entered into the device by the employee using the keys 50 of the keyboard. Referring now to Fig. 5, there is illustrated an employee transaction record generally indicated by the numeral 106 and generated as a result of the operation of the keyboard 32 (Figs. 2 and 3) by an employee. The transaction record is stored in a circular buffer 108 (Fig. 9) located within the RAM memory unit 72. The buffer 108 may comprise a circulating shift register. Included in the transaction record 106 is an 8-bit ID number index field 109 used by the microcontroller 68 in locating the employee I.D. number in a I.D. number table 110 (Fig. 8) stored in the RAM memory unit 72 (Fig. 4). Also included in the transaction record 106 is a two- bit function field 112 and a six-bit minutes field 114. Another record that may be stored in the circular buffer 108 (Fig. 9) as the result of a keyboard operation by the employee comprises a date/hour record generally indicated by the numeral 116 (Fig. 6) which includes a date/hour indicator flag 118, a date field 120 and a hour field 122. If the date has not changed but the hour has changed since the last operation of the terminal device, an hour record generally indicated by the numeral 124 (Fig. 7) is stored in the buffer 108 and includes an hour indicator flag 126 and an hour field 128. Referring now to Fig. 8, there is illustrated the employee I.D. number table 110 which includes an index portion 130 and a number portion 132 in which a 40 bit employee I.D. number is stored. Associated with the table 110 is the circular buffer 108 (Fig. 9) located in the RAM memory unit 72 (Fig. 4) which includes a plurality of storage locations 134, a start of buffer pointer 136 and an end of buffer pointer 138. Included in the pointers 136 and 138 are date 140 and hour 142 storage locations. The pointer 136 also includes a sequence number location 200 in which is located a counter for outputting a plurality of sequence numbers. The pointers 136 and 138 will circulate through each of the storage locations 134 following the path 144 in a manner that is well known in the art. Referring now to Figs. 10A and 10B, there is shown a flow diagram of the steps which occur in storing the transaction data in the buffer 108 as a result of an employee operating the keyboard 32 (Figs. 2 and 3) in the manner described previously. At the start (block 145) of a terminal operation, an employee will enter his I.D. number (block 146) by indexing the numerical keys 50 of the keyboard 32 (Figs. 2 and 3) or by moving a magnetic striped card through the slot 36, and will then actuate one of the function or transaction keys 40-44 inclusive. The microcontroller 68 will then search the I.D. table 110 (Fig. 8) (block 148) for the employee I.D. number. If the number is not in the table (block 150), the microcontroller will insert the new I.D. number (block 152) and retain the index (block 154) to the location of the inserted I.D. ' number. If the number is found in the table 110, the index is retained (block 154) and the current date field 120 (Fig. 6) found in the storage location 140b (Fig. 9) located in the end of buffer pointer 138 is compared (block 156) with the current date being outputted by the time of day (TOD) circuit 76 (Fig. 4). If the date in the location 142b is not current, the new current date field 120 and hour field 122 (Fig. 6) are stored (block 158) in the storage locations 140b, 142b in the end of buffer pointer 138 (Fig. 9), the date/hour record 116 (Fig. 6) is stored in the storage location 134 in the buffer 108 pointed to by the end of buffer pointer 138, and the end of buffer pointer 138 is advanced (block 160) (Fig. 10B) to the next storage location 134 of the buffer 108. If the date field 120 (Fig. 6) stored in the date location 140b (Fig. 9) of the pointer 138 is the same as the current date (block 156), the microcontroller 68 will compare the hour field 128 (Fig. 7) stored in the hour location 142b of the pointer 138 with the current hour (block 162). If the hours do not match, the microcontroller 68 will store the current hour in the storage location 142b in the pointer 138 (block 164), store the hour record 124 (Fig. 7) in the storage location 134 of the buffer 108 (Fig. 9) pointed to by the pointer 138 and then advance (block 166) (Fig. 10B) the pointer 138 to the next available storage location 134 in the buffer 108. The microcontroller 68 will next store (block 168) the transaction record 106 (Fig. 5) in the storage location 134 of the buffer 108 pointed to by the pointer 138 and advance the pointer 138 (block 169) to the next available storage location 134 in the buffer 108, thus ending (block 170) the operation. It will be seen that if the date/hour record 116 (Fig. 6) of the previously entered employee transaction record has not changed, such redundant data will not be stored with the non-redundant transaction ' record 106 (Fig. 5) in the buffer 108, thus saving storage space in the buffer 108. When the CPU 20 (Fig. 1) requests that the transaction data stored in the buffer 108 be transmitted to the processor, the microcontroller 68, at the start (block 171) (Fig. 11A) of operation, will examine the record (block 172) in the buffer 108 pointed to by the start of buffer pointer 136 (Fig. 9) and check (block 174) to see if the record is a date/hour record 116 (Fig. 6). If the record is a date/hour record, the microcontroller will move (block 176) the record to the start of buffer pointer 136 date 140a and hour 142a storage locations (Fig. 9) and then advance (block 178) the pointer 136 to the next available storage location 134 in the buffer 108. If the record pointed to by the pointer 136 is not a date/hour record 116 (Fig. 6), the microcontroller 68 will check (block 180) to determine if the record is an hour record 124 (Fig. 7). If it is an hour record that is pointed to by the pointer 136, the microcontroller 68 will move (block 182) the record to the start of buffer pointer 136 hours storage location 142a and advance (block 184) the pointer to the next storage location 134 in the buffer 108. If the record being pointed to by the pointer 136 in the buffer 108 is not an hour record, the microcontroller 68 will check (block 186) to see if the record is an employee transaction record 106 (Fig. 5). If the record is an employee transaction record, the microcontroller 68, using the index field 109 found in the record 106 (Fig. 5), will retrieve (block 188) the employee I.D. number from the employee table 110 (Fig. 8). The microcontroller 68 will also retrieve the transaction data (block 190) from the transaction field 112 (Fig. 5) of the record, the data from the date 120 and hour 122 fields (Fig. 6) (block 192) (Fig. 11B) stored in the start of buffer pointer 136 date 140a and hour 142a storage locations (Fig. 9), the minutes (block 194) from the minutes field 114 of the record 106 (Fig. 5), transfer the assembled data (block 196) to the CPU 20 (Fig. 1), advance the sequence number in the storage location 200 (Fig. 9) of the pointer 136 and advance (block 198) the pointer 136 to the next storage location 134 in the buffer 108. The microcontroller 68 will then check (block 202) to determine if the start of buffer pointer 136 is at the same position as the end of buffer pointer 138. If the pointers are not on the same location, the transfer operation is again repeated until all the data stored in the buffer 108 is transferred to the CPU 20. As part of the transfer operation, the pointer 136 will insert a sequence number from the storage slot 200 (Fig. 9) in the data message being read out of each storage location 134 of the buffer 108 (Fig. 9) for use by the CPU 20 in keeping track of the messages received from the terminal. When the start of buffer pointer 136 is at the same location as the end of buffer pointer 138, the microcontroller will terminate (block 202) the transfer operation. It will be seen from this description that there is provided a low cost apparatus for compressing data for storage in a memory unit while still retaining the full informational content of the data, thus allowing all of the compressed data to be recovered. This construction allows more data to be stored within the capacity of an existing memory.

Claims: CLAIMS : 1. In a data terminal device (22) which generates a plurality of data records, a method for processing each said data record characterized in that a first data portion of the data record is compared with data stored in a first storage area (138) of a storage means (72), data forming at least part of said first data portion and not found in said first storage area as a result of such comparison is stored in said first storage area (138) and in a second storage area (108) of said storage means, and a second data portion of the data record is stored in said second storage area (108) only. 2. A method according to claim 1, characterized in that a third data portion forming part of said first data portion is compared with data • stored in a third storage area (140b) forming part of said first storage area (138); said first data portion is stored in said first storage area (138) and in said second storage area (108), and said second data portion is stored in said second storage area, if said third data portion is not the same as the data stored in said third storage area (140b); and a fourth data portion forming part of said first data portion is compared with data stored in a fourth storage area (142b) forming part of said first storage area (138) if said third data portion is the same as the data stored in said third storage area (140b), said fourth data portion being stored in said fourth storage area (142b) and in said second storage area (108), and said second data portion being stored in said second storage area, if said fourth data portion is not the same as the data stored in said fourth storage area, and said second data portion being stored in said second storage area (108) if said fourth data portion is the same as the data stored in said fourth storage area (142b). 3. A method according to either claim 1 or claim 2, characterized in that said first data portion comprises data representing the date and the hour when an operator operates data entry means (30, 32) included in the data terminal device (22), and said second data portion comprises data representing the identity of said operator, the type of transaction represented by the operation of said data entry means (30, 32), and the minute when said data entry means is operated. 4. A method according to claims 2 and 3, characterized in that said third data portion and said fourth data portion respectively represent the date and the hour when said data entry means (30, 32) is operated by said operator. 5. A method according to claim 4, characterized by the further steps of reading data from part of said second storage area (108); checking if the data read is date and hour data; if the data read is date and hour data, storing this data in a fifth storage area (136) of said storage means (72) and thereafter retrieving the data stored in said fifth storage area together with information represented by said second data portion; if the data read is not hour and date data, checking if this data is hour data; if the data read is hour data, storing this data in said fifth storage area (136) and thereafter retrieving the data stored in said fifth storage area together with information represented by said second data portion; and if the data read is not hour data, checking if the data read is said second data portion and, if it is, retrieving the data stored in said fifth storage area (136) together with information represented by said second data portion. 6. A method according to any one of the preceding claims, characterized in that said second data portion is stored in a circular buffer (108). 7. A data terminal device (22) including data storage means (72) and data entry means (30, 32) operable to generate transaction data identifying an operator of said data entry means and identifying the type of transaction represented by the operation of said data entry means, characterized by time of day means (76) arranged to output data representing the date, the hour and the minute, and processing means (68) arranged to carry out the following operations in response to operation of said data entry means: comparison of the current date data with date data stored in a first storage area (138) of said storage means (72); storage of the current date and hour data in said first storage area (138) and in a second storage area (108) of said storage means (72), and storage of said transaction data and the current minute data in said second storage area, if the compared date data are not the same; comparison of the current hour data with hour data stored in said first storage area (138) if the compared date data are the same; storage of the current hour data in said first storage area (138) and in said second storage area (108), and storage of said transaction data and the current minute data in said second storage area, if the compared hour data are not the same; and storage of said transaction data and the current minute data in said second storage area (108) if the compared hour data are the same.

Inventors: MATHES GENE RAYMOND, PROTHEROE ROBERT LLEWELLYN, MATHES, GENE, RAYMOND, PROTHEROE, ROBERT, LLEWELLYN
Applicants: NCR CO, NCR CORPORATION
Application year: 1986
Main classification: G06F15
IPC codes: G06F17, G07C1, H04L23