APPARATUS AND METHOD FOR COMPRESSING DATA

Abstract: A method and apparatus for compressing data messages (36) relating to merchandise transaction and generated by a data terminal device (20). The data messages (36) are compressed into data records (46) which are stored in a storage device (32). A counter (58) controls the operation of a sequencing device (60) which controls the production of timing control signals (TC) effective to delete known redundant data in the input message (36) and to provide a start-of-record character (SOT<uA>u, SOT<uB>u) dependent on the information content of a predetermined non-redundant character (QUAL CODE) in the input message (36), and determining the start of the compressed data record (46). Other non-redundant data which can be determined from the corresponding data in a previous message are also deleted.

Description: Apparatus and Method for Compressing Data Technical field This invention relates to data compression apparatus of the kind for compressing data messages each including redundant and non-redundant characters, including input means adapted to provide said messages in serial form, eliminating means adapted to eliminate said redundant characters and storage means arranged to store compressed data records representing said data messages. The invention also relates to methods of the kind for compressing data messages each including re¬ dundant and non-redundant characters, including the step of eliminating the redundant characters of said messages to provide compressed data records represent¬ ing said data messages. Background of the invention In modern day on-line merchandising systems, a plurality of data terminal devices are each connected to a shared central processing unit (CPU) or other type of data collector for transmission thereto of data gen¬ erated by the terminal device for processing to provide a basis for inventory and other business controls. During those periods where the CPU or the communication network to the CPU is inoperative for any reason it is the present practice to terminate the terminal opera¬ tion or to provide a hard copy at the terminal from which the data can be recovered and transmitted to the CPU upon the recovery of the CPU to an operating condi- tion. To ensure the capture of data during periods when the CPU is inoperative, the hard copy backup oper¬ ation is maintained as a normal part of the terminal operation when the CPU is operational. This requirement becomes an appreciable cost of terminal operation. If each data terminal were to include a memory unit to store the data generated dur¬ ing the time the CPU is disabled the amount of data to be stored under these conditions could be so great as to make the in-terminal storage prohibitively expen- sive. This problem has been recognized in the prior art in which various methods and apparatuses have been devised to compress the data in order to store it economically. Thus, according to U.S. Patent Specification No. 4,031,515, corresponding item words in .successive data records are compared and if it is detected that the same item word is included in a record and the immediately succeeding record, then the corresponding word in the succeeding record is omitted or simplified. According to U.S. Patent Specification No. 4,034,350, successive data records are compared on a digit-by- digit basis and the various digits of the data words of a succeeding record which are identical with the corresponding digits of the corresponding data word of an earlier data record are omitted. The systems disclosed in the above-mentioned U.S. Specifications have the disadvantage, that storage means is needed to provide for the storage of data to be compared with current data. It is an object of the present invention to provide data compression apparatus and a method of compressing data messages wherein the aforementioned disadvantage is alleviated. Disclosure of the invention According to one aspect of the present inven¬ tion, there is provided data compression -apparatus for compressing data messages each including redundant and non-redundant characters, including input means adapted to provide said messages in serial form, eliminating means adapted to eliminate said redundant characters and storage means arranged to store compressed data records representing said data messages, characterized in that said eliminating means includes counter means adapted to generate consecutive counts representing the position of successive characters in the current data message, and timing ' control means adapted to receive said consecutive counts and to provide timing control signals adapted to control the storage in said storage means of non-redundant information representing said non-redundant characters and included in said compres- sed data records, and to inhibit the storage in said storage means of information corresponding to said re¬ dundant characters. Data compression apparatus according to the immediately preceding paragraph has the advantage of avoiding any need to provide auxiliary storage means for storing a previous message which is to be compared with the current message. According to another aspect of the present invention, there is provided a method for compressing data messages each including redundant and non-redun¬ dant characters, including the step of eliminating the redundant characters of said messages to provide com¬ pressed data records representing said data messages, characterized by the steps of generating consecutive counts representing the position of successive charac¬ ters in the current data message and utilizing the generated counts to control the storage of non-redun¬ dant information representing said non-redundant char¬ acters and inhibiting the storage of information corresponding to said redundant characters. Brief description of the drawings ' One embodiment of the present invention will now be described by way of example with reference to the accompanying drawings, in which: Fig. 1 is a block diagram of a data terminal including data compression apparatus according to the BUR_ __O Pl i T " invention and showing only those logic elements in¬ volved with the transmission of data from the terminal to a central processing unit (CPU) ; Fig. 2 is a block diagram illustrating the functional portions of a typical data message generated as the result of one type of merchandise transaction; Fig. 3 is a diagram illustrating the message format comprising the header portion of Fig. 2; Fig. 4 is a diagram illustrating the message format comprising the merchandise portion of Fig. 2; Fig. 5 is a diagram illustrating the message format comprising the tax portion of Fig. 2; Fig. 6 is a diagram illustrating the message format comprising the closing portion of Fig. 2; Fig. 7 is a more detailed diagram of the mes¬ sage format comprising the header portion of Fig. 3 showing the number of binary bits contained within each field in the message format together with a correspon¬ ding count of the M16 counter prior to data compres- sion; Fig. 8 is a diagram of the compressed data record produced as the result of a compression opera¬ tion of the header portion of Fig. 7; Fig. 9 is a detailed block diagram of the data compression unit; Fig. 10 is a block diagram of the clock gen¬ erator disclosed in Fig. 9; Fig. 11 shows the waveform of the clock pul¬ ses generated by the clock generator of Fig. 10; Fig. 12 shows the table of the electronic journal codes, the Qual codes and their coded repre¬ sentation; Fig. 13 shows .the constructioh of _he ID table located in the data compression unit of Fig. 9; Fig. 14 illustrates the manner in which Figs. 15A and 15B are to be arranged; Figs. 15A and 15B taken together disclose a block diagram of the Sequencer shown in Fig. 9; /^ " BU ( , _ Fig. 16 illustrates the manner in which Figs. 17A and 17B are to be arranged; Figs. 17A and 17B taken together form a block diagram of the Media register disclosed in Fig. 9; Figs. 18A-18F taken together show in flow diagram form the operation of the preferred embodiment; and Fig. 19 is a state diagram of the operation of the preferred embodiment. Best mode for carrying out the invention Referring to Fig. 1, there is shown a block diagram of the data transmission system found within a data terminal device in which the present invention is utilized. Included in the data terminal device 20 is a data compressor 22 coupled to a communication bus 24 over which a stream of data bits is transmitted from the terminal 20 to a central processor (not shown) through a communication control unit 28 and over com¬ munication bus 26 in a manner that is well-known in the art. When the central processor notifies the com¬ munication control unit 28 that it is in a disabled . condition, therefore unable to accept any further data from the terminal 20, the communication control unit 28 generates control signals over line 30 to the data compressor 22 notifying the compressor of such a con¬ dition and enabling the compressor 22 to accept all data transmitted over bus 24. After compressing the data received over bus 24, the data compressor 22 will transmit the compressed data to a RAM (random access memory) storage unit 32. When the central processor is again enabled to receive and process the data from the data terminal' 20", the— compressed data is transmitted from the storage unit 32 to a data expander 34 which expands the compressed data to its original form, the expanded data being displayed or printed and transmitted to the communication control unit 28 for transmission to the central processor over bus 26. Referring now to Figs. 2-8 inclusive, there is shown details of the blocks of data in the form of a message generated as a result of the operation of the data terminal 20 in a merchandise transaction. As dia¬ grammed in Fig. 2, the format of a typical message 36 consists of a header portion 38 which defines the type of message that is being generated together with vari- ous types of housekeeping data required to identify the environment in which the message is being generated, a merchandise portion 40 which includes data pertinent to the identity of the merchandise purchased, a tax portion 42 and a closing portion 44 which includes a total of the merchandise purchased. While Fig. 2 is illustrative of a typical message format found in present-day merchandise transactions, it is obvious that other combinations of merchandise and non-merchan¬ dise portions can also be included. Referring now to Figs. 3-6 inclusive, there is shown in more detailed form the data included in the message 36 (Fig. 2). As shown in Fig. 3, the header portion 38 includes, starting at the left end of the message format, a control character &0; a message count MSG CNT which is a consecutive number; a second control character C#; the store number, the number of the data terminal 20 in which the data is generated; the trans¬ action count which is a consecutive number identifying the transaction operation; a media count identifying the number of record slips generated; a Qual code which identifies the transaction as a cash, charge or other type of transaction; a sequential character identifying whether this is the only one or one of a number of transaction operations which make up a single overall transaction; the operator ID and a control character D indicating the end of the header portion. The merchandise portion 40 of the message 36 is shown in Fig. 4 which includes a format character fU O ^ l indicating the type of merchandise message format; a control character F which functions to separate the fields in the message format; the department number in which the transaction is being performed; a second con- trol character F; the identification of the merchandise being purchased; a third control character F; a field- length character, SKU; the control character F, the quantity of merchandise being purchased; another con¬ trol character F; the price of the merchandise being purchased; another control character F, an item code character indicating either a taxable or non-taxable transaction and a control character E indicating the end of the merchandise portion 40 of the message 36 (Fig. 2). Fig. 5 discloses the tax portion 42 (Fig. 2) of the message 36, which portion includes a tax code which may indicate a special tax being applied on the merchandise purchased; a number of control separator characters E, 9, and F; the amount of tax applied to the merchandise purchased; and a control-character E indicating the end of the taxed portion -42. Fig. 6 illustrates the closing portion 44 (Fig. 2) of the mes¬ sage 36 which includes the control characters D, E and C, the latter indicating the end of the message 36; and the total amount of the merchandised items pur¬ chased and which are described in the merchandise por¬ tion 40 of the message 36. If more than one type of merchandise item is purchased during this transaction operation, it is obvious that the message 36 will in- elude a merchandise portion 40 and a tax portion 42 for each type of merchandise item purchased, the total amount in the closing portion 44 will then reflect the total amount of all merchandise " items purchased by the customer. In the present embodiment, the data compres¬ sor 22 (Fig. 1), upon receiving the message 36 (Fig. 2), will remove all information which is static or basic to the system during a specified time period. Thus, the date, the store number, the terminal number, and the format characters, the latter in the merchandise por¬ tion 40, will be removed. The data compressor 22 will also remove all information which is the same or common to a previous transaction message if a positive asso¬ ciation can always be made. An example of this type of operation is found in the operator ID and the type of transaction being performed. The data compressor 22 will also remove information which has a fixed re¬ lationship to a previous transaction message. An exam¬ ple of this is the transaction number which is always one more than the previous transaction number. The data compressor will also remove all information which can have an assumed value; it will record only if the information is different than the fixed assumed value. Examples of this type of data compression involve the quantity of merchandise items purchased which is assum¬ ed to be one, the type of transaction being performed and format control. The data compressor 22 will also abbreviate where appropriate. An example of this is in the operator ID where only the most significant bits of data are retained. The data compressor 22 will further remove information which is calculable from base information already collected. An example of this can be found in the transaction totals located in the closing portion 44 (Fig. 2) of the message 36 and the tax amounts which are found in the tax portion 42 of the message 36 (Fig. 2) based on the purchased amounts. Thus, in processing the message 36 (Fig. 2), the tax portion 42 and the closing portion 44 may be dropped. Other areas in which the data compressor 22 can reduce data ' include system redundant information and information not re- quired to the desired end result. An example of the former may be found in the item price field in the merchandise portion 40 (Fig. 4); since the item code is known, the price can be found in price look-up ta¬ bles if they are available. An example of the latter type of information concerns "no sales" transactions. In all of these situations, if the information is an exception to these rules, the data will be retained. Using these procedures, it has been found that the data compressor 22 of the present embodiment can effect an overall data reduction of 5 to 1. Referring now to Fig. 7 there is shown a de- tailed diagram of the format of the header portion 38 of the message 36 (Fig. 2) showing the number of 8-bit bytes of data assigned to each field in the message portion together with the output count of a 16-stage 4-bit binary counter found in the data compressor 22 and used to keep track of the character position in the header portion being received by the compressor 22. Fig. 8 shows the compressed data record 46 of the head¬ er portion 38 (Fig. 7) after being compressed by the data compressor 22. As indicated, the header portion is. reduced from 176 binary bits to a possible 8 to 20 binary bits. Since the header portion 38 (Fig. 2) con¬ tains a greater amount of data that can be compressed than the merchandise portion 40, the explanation of the operation of the data compressor 22 will be limi- ted to the header portion 38 (Fig. 2) of the message 36 recognizing that a similar operation utilizing the same compression apparatus can be applied to the mer¬ chandise portion 40. As shown in Fig. 7, the header portion 38 of the message 36 includes, in addition to the fields des¬ cribed previously with respect to Fig. 3, an initial control character IC which indicates the start of the message 36. Comparing the message formats of Fig. 7 and Fig. 8, it will be seen that the compressed data record 46 consists of a format control character field 47, containing either a 4-bit format character SOT. or SOT_, each indicating the start of a transaction, mes- sage. In the case of a string of character fields 47 where SOT, or SOT-, may fall therein, it is implied that the format control character located therein ter¬ minates the last transaction message and starts the next transaction message. The next field 49 in the compressed data record 46 is entitled electronic jour¬ nal code representing the Qual code found in the head¬ er message 38 (Fig. 7), which code can be either 0 or 8 bits long. As will be described more fully herein- after, if the electronic journal code field 49 is 0 bits and the format control character is an SOT., it is then assumed that the Qual code and the format code (found in the merchandise portion 40, Fig. 4) will rep¬ resent a cash transaction together with a standard merchandise format. If the format control character is SOT„, it will then assume that the transaction is a standard "charge" transaction with a standard merchan¬ dise format. If the electronic journal code consists of a predetermined 4-bit character together with a SOT Δ ' then it will be assumed that the transaction is a "cash" transaction; a "charge" transaction is implied if the control character is SOT β . The format code will be specified by a single 4-bit character located in the electronic journal code field. If the- transaction code is other than a (cash) or (charge), the electronic journal code field 49 will contain the specific two 4-bit characters specifying the code. In a typical merchandising operation, there may be up to 30 differ¬ ent transaction codes. Referring again to Fig. 8, the compressed data record 46 which is stored in the RAM storage unit 32 (Fig. 1) contain an operator ID field 51 in which may be recorded 0 bits indicating .that the -operator- s - • the same as in the previous header portion 38, or a 4-bit character, indicating the specific operator ID. The record 46 is completed with the generation of a 4-bit record separator character EO located in the OM record separator field 53 indicating the end of the compressed data record if a merchandise field is to follow. If a new header portion 38 is to start, one of the format control characters SOT A- or SOT_B will be stored in the field 53. As will be described more ful¬ ly hereinafter, the total number of bits found in the compressed data record 46 provide an indication as to whether new data pertaining to the operator I.D. or the electronic journal code or to both is present. Referring now to Fig. 9 there is shown the logic of the data compressor 22 (Fig. 1) for compres¬ sing data received serially in a bit-by-bit format from the transmission bus 24 (Fig. 1). Included in the data compressor 22 is a bus monitor unit 48 including the necessary interface and control logic to properly interface the data compressor to the system terminal communication bus 24. The bus monitor 48 also includes a status decoder 50 connected to the communication con¬ trol unit 28 (Fig. 1) over line 30 for receiving sig- nals indicating whether the central processor is capa¬ ble of receiving data from the terminal 20. The bus monitor 48 also includes an 8-bit register 52 for stor¬ ing an 8-bit character received from the communication bus 24 and an interrupt flip-flop 54 which outputs an interrupt signal INT upon the storing of an 8-bit character in the register 52. The interrupt signal INT is outputted over line 56 from the flip-flop.54 to a 16-stage (4-bit bi¬ nary) M16 counter 58 (Fig. 9) which is used to keep track of the position of each character in the header portion 38 of the message 36 as being received by the bus monitor 48. The counter 58 essentially counts the number of interrupt signals generated by the flip-flop 54 and is enabled upon the sensing of a valid message 36 by a character decoder 82. The output counts M16-0- M16-15 of counter 58 are outputted to a sequencer 60 and a timing control logic unit 62 for controlling the various operations of the data compressor. As shown in Fig. 7, the output counts of the M16 counter 58 occur after the character or characters in each field of the header portion 38 have been inputted into the register 52. For example, after the SEQ character has been loaded into the register 52 resulting in the outputting of an interrupt signal from the flip-flop 54, the M16 counter 58 will output count 14 designated as M16-14 over line 64 to the sequencer 60 and the timing con- trol 62 unit, the latter outputting a control signal TC for initiating a logic operation of the data com¬ pressor at this time. The timing control 62 receives a series of clock pulses T1-T8 from a clock generator 66 (Fig. 9). As shown in Fig. 10, the clock generator 66 comprises an oscillator 68 outputting a series of clock pulses to a three-stage binary counter 70 whose output is fed into a 3 to 8 decoder 72 which outputs the clock pulses T1-T8. The waveform of these clock pulses are shown in Fig. 11 which also includes the interrupt pulse INT outputted from the flip-flop 54 which occurs from T1-T4 clock time if the decoder 50 indicates the CPU is disabled and an 8-bit character is ready in register 52. In response to the generation of the inter- rupt signal INT, the 8-bit character stored in the register 52 is outputted in parallel, under the control of the timing control unit 62, over cable 74 to a media register 76, a transaction register 78, an electronics journal (EJ) table 80, a character decoder 82 and a multiplexer 84. The media register 76 is shown in more detailed form in Fig. 17A and 17B, and is a 16-bit par¬ allel in-parallel out register in which the media count or data (Fig. 7) from the most current-header portion 38 (Figs. 2 and 7) being compressed is stored. As shown in Figs. 17A and 17B, the character bits indica¬ ted as P10-P17, are inputted over cable 74 to a series of flip-flops 86A and 86B for storage therein. As fur- ther shown in Fig. 7, the media data comprises two characters of information. After the first character has been loaded into the register 52, the flip-flop 54 will output the interrupt signal INT over line 56 re- suiting in the M16 counter 58 outputting the count M16- 11. This signal will appear as timing control signal TC-11 (Fig. 17A) which, together with the interrupt signal INT and a second timing control signal TC-4 gen¬ erated in the sequencer 60, are fed to an AND gate 88 which enables the first character of the media data to be loaded into the flip-flops 86A. The same condition occurs when the second character of the media data is loaded into the register 52 and the M16 counter outputs . the count M16-12 as a result of the generation of the interrupt signal from the flip-flop 54. Since the media data of the last message 36 compressed by the data compressor 22 is the only media data required prior tσ the time the central processor is enabled to accept data from the terminal device, the data stored in the media register 76 will be outputted at the ap¬ propriate time over cable 92 containing 16 conductors to a multiplexer 94 for subsequent transmission to the data expander 34 (Fig. 1). The transaction register 78 (Fig. 9) is a 16-bit parallel in-parallel out register similar in construction to that of the media register 76 and in which the transaction number of the first compressed header is stored. Since the transaction number of each succeeding message is one more than the previous com- pressed message, by storing the transaction number of the first compressed header in the transaction regis¬ ter 78, the data expander 34 (Fig. 1) can recreate the transaction number of each succeeding-compressed"-mes- - - - - sage stored in the storage media 32 (Fig. 1) by adding one to the previous transaction number. The transac¬ tion register 78 includes a flip-flop 79 which when set upon the storing of the first transaction number will prevent the entry of any succeeding transaction number until reset upon the ending of a compression operation. The electronics journal (EJ) table 80 (Fig. 9) comprises a storage unit and associated programmable logic arrays including the EJ flip-flop 81 for output¬ ting an electronics journal code for the Qual code (Fig. 7) located in the header portion 38 (Fig. 2). The configuration of the EJ table is shown in more de¬ tail in Fig. 12 in which the various Qual codes found in a merchandising operation are listed in column 83 with their corresponding EJ code (column 85) together with a corresponding format control character SOT A (column 87) and SOT., (column 894-. The Qual code de¬ fines the type of transaction which is involved in the current terminal operation. Thus, if the Qual code is 01, the transaction is a cash transaction. If the Qual code is 03, the transaction is a charge transaction. Since 90% of all the transactions comprise either of these two types of transaction codes, the storing of the character SOT,, in the field 47 (Fig. 8) of the com¬ pressed data record 46 together with no bits in the electronics journal code field 49 indicates that it is a cash transaction. If the format control character stored is an SOT_, the combination indicates that the transaction will be a charge transaction. If the Qual code is other than these two Qual codes, 01 or 03, the specific 8-bit electronics journal code listed (column 85) in Fig. 12 will be stored in the electronic journal code field 49 in the compressed data record 46 (Fig. 8) allowing the data expander 34 (Fig. 1) to reconstruct from the compressed data record 46 the original Qual code of the data message 36. The storing of one of the characters SO , or SOT„ in the field 49 of the com¬ pressed data record 46 (Fig. 8), also notifies the data expander 34 the start of a compressed data message, thereby eliminating the need for storing control char¬ acters such as 1C and ID in the position shown in the header portion 38 in Fig. 7. / ^_ ( . _ The character decoder 82 (Fig. 9) continu¬ ously monitors the output of the register 54 for. the occurrence of characters 01, 1C or ID. The character 1C indicates the start of the header portion 38 while ID indicates the end of the header portion. The char¬ acter 01 is found in the message count field (MSG CNT) (Fig. 7) indicating that it is the first message of a number of messages concerned with the same merchandise transaction being performed by the data terminal device 20 (Fig. 1). Included in the character decoder 82 is an IC flip-flop 98 which when set will output a pulse to initiate the operation of the binary counter 58, an ID flip-flop 100, and an 01 flip-flop 102, whose out- puts are transmitted to the sequencer 60 and the M16 counter 58 (Fig. 9). The output of the shift register 52 in the Bus Monitor 48 is also transmitted through the multi¬ plexer 84 to an ID table 104 in which the operator ID of the current .header 38 is compared with the previous operator IDs stored in the table to determine if the operator ID of the current header portion 38 is the same as the operator ID of the previous message. If it is the same, the operator ID field in the compressed data record (Fig. 8) will contain no bits, which noti- fies the data expander 34 that the operator ID of the current compressed data record is the same as that of the previous compressed data record. If the operator ID is not the same as the previous operator ID, four bits of data identifying the current operator ID will be stored in the compressed data record 46 and in the ID table 104. The ID table 104 is a 256 x 8 static RAM memory unit which is used to store the operator ID characters read from the header portion,.38 and also a.. .. corresponding 4-bit character which is to be stored in the compressed data record (Fig. 8). The use of a 4-bit ID character allows (for up to) sixteen unique operator ID characters which is sufficient to cover this area of the merchandising operation. As shown in more detail in Fig. 13, the ID table 104 includes a plurality of storage fields to accommodate sixteen records 103, each field includes an AF flip-flop 105 (Fig. 9) indicating the storage of an operator ID in that field and a PTF flip-flop 107 indi¬ cating the last field in which an operator ID is stor¬ ed, the record 103 comprising eight bytes of data wherein each byte is equivalent of two 4-bit characters. Also included in the ID table is a temporary file por- tion 106 in which the seven operator ID characters from the header portion 38 being currently processed are stored. Associated with the ID table 104 is a WC (Word) counter 108, an ID register 110, a ID TA counter 112 and a comparator unit 114. The WC counter 108 is a " 4-bit binary counter which supplies the word address (column 105B) (Fig. 13) of the operator ID characters stored in the temporary file 106 and for the storage of the operator ID in the ID table 104. The counter 108 is operated by the interrupt signal INT generated over line 56 from the flip-flop 54 and outputs its count to the sequencer 60 and also to a multiplexer 116 over line 118 for transmission to the ID table 104. The counter 108 receives the output of the M16 counter 58 over line 120 for use in generating its output in a manner that is well-known in the art. The ID register 110 (Fig. 9) is an 8-bit parallel in-parallel out register required for the tem¬ porary storage of data read out of the ID table 104 during the operation of comparing the operator ID of the current header portion 38 with the operator's ID stored in the ID table 104. The IDTA counter 112 is an 8-bit binary address counter which generates the address, (column 105A) (Fig. 13) together with the output of the WC counter 108 (column 105B) (Fig. 13) for accessing the ID table 104. The comparator 114 compares eight bits of data representing the current operator ID stored in the temporary file 106 (Fig. 13) against eight bits representing a previous operator ID originally stored in the ID table 104, and which are now buffered in the ID register 110. The comparator 114 includes a CF flip-flop 122 which outputs signals CF, CF to the sequencer 60 upon finding a coincidence between the operator ID stored in the ID register 110 and the last operator ID character stored in the ID table 104. If a comparison is not found, a NCF flip- flop 124 is set, generating a signal to the sequencer 60 resulting in the timing control logic 62 generating the appropriate control signals TC to a read/write logic unit 126 which will write in the current opera¬ tor ID characters in the ID table 104. Other elements included in the data compres- sor logic include a character encoder 128 which out¬ put ' s the correct bit configuration for the record separator character "EOR " which is the last character in the compressed data record 46 shown in Fig. 8, the character being transmitted through a multiplexer 130 for transmission of the character into the storage media 32, Figs. 1 and 9. The storage unit 32 in the present embodiment may comprise a IK x 4 static RAM memory which is used to store the compressed header records. Also inputted into the multiplexer 130 for storage in the storage unit 32 is the electronic jour¬ nal code and its associated SOT character outputted from the EJ table 80 (Fig. 13) and the operator ID outputted from the ID register 110. The operation of the RAM memory unit 32 is under the control of a 10-bit binary address counter 134 which generates the address for accessing the RAM memory unit 32 in a manner that is well-known in the art. Also included in the data compressor 22 is a conventional power supply 140 (Fig. 9) which outputs a pair of signals, power up and power down, over line 142 to the sequencer 60. Referring to Figs. 15A and 15B there is shown in detail the logical elements of the sequencer 60 (Fig. 9) which includes four conventional LS 107 J-K flip-flops 144 whose outputs are transmitted to a con¬ ventional 4-16 output 74154 multiplexer 146 which out¬ puts in sequence ten control signals S0-S10 for trans- mission to the timing control 62 over cable 148 which effects the outputting in a predetermined sequence of the timing control signals TC for operating the data compressor in states 0-10 as illustrated in Fig. 19 and in a manner that will be described more fully herein- after. The outputs of the multiplexer 146 are labeled in Fig. 15A in hexadecimal code which is the code used to represent the data characters on the present system. As further shown in Figs. 15A and 15B, the sequencer 60 includes an array of logical gates which operate in a well-known manner and which receive signals from the logic blocks disclosed in Fig. 9 for enabling the or¬ derly operation of the data compressor 32. The iden¬ tification of the various input signals to the sequen¬ cer 60 will be described more fully in conjunction with the description of the operation of the data compressor 22 (Fig. 1) with respect to the flow diagrams shown in Figs. 18A-18F inclusive. The flow diagrams of Figs. 18A-18F inclusive will now be described in conjunction with the state diagram of Fig. 19 which illustrates the operation of the data compressor 22 with respect to the presence of the various counts of the M16 counter 58, the presence of clock pulse T8 and various other control signals generated as part of the orderly operation of the data compressor 32. Referring to Fig. 18A, the data compressor 22 will be in an idle state (block 150) (state 1, Fig. 19) with the bus monitor 48 (Fig. 9) monitoring the status decoder 50 (block 152) to see if a signal has been re- ceived from the communication control unit 28 (Fig. 1) indicating that the central processor has been dis¬ abled. The compressor 22 will stay in this loop as _ O .WI long as the decoder 50 indicates that the central pro¬ cessor is still receiving data from the terminal. When the status decoder 50 indicates that the central pro¬ cessor has been disabled, it will generate an interrupt which notifies the compressor (block 156) of such a condition. The compressor 22 will then monitor the output of the register 52, checking for the presence of the character IC (block 158) which indicates the start of the header portion 38 (Fig. 2) of the message 36. If the character sensed is not IC, the compressor will go back to point A (block 154) until it detects the character IC. This detection occurs in the char¬ acter decoder 82 (Fig. 9) which sets the IC flip-flop 98 outputting the control signal IC to the M16 counter 58 which outputs count 1 (Fig. 8). The compressor will then check for the next interrupt (block 160) indica¬ ting that the control character 00 is now stored in the register 52. The compressor 22 will ignore the character 00 and check for the next interrupt (block 162) indicating that the next character, MSG CNT is stored in the register 52. The compressor will check the MSG CNT character for a 01 indicating that it' is the first message of the current transaction operation (block 164). If the character is not 01, but some other number indicating that another message 36 having the same header portion 38 of the same transaction has already been compressed by the compressor 22 and there¬ fore this header portion 38 is redundant and can be ig¬ nored, the compressor will go into state 2 (Fig. 19) and check the interrupts (block 166) until it detects the character ID (block 168) indicating the end of the header portion 38 of the current message. The compres¬ sor will then leave state 2 (Fig. 19) and return to --.-.- . , - point A (block 154) in state 1 to check for the header portion 38 of the next message 36 (Fig. 2). If the compressor 22 detected the character 01 in the MSG CNT field, the compressor will go to state 3 (Fig. 19) by checking for the next interrupt signal (block 170). Upon detecting the next interrupt signal indicating the next character is being outputted by the register 52 over cable 74 (Fig. 9), the com- pressor will increment the M16 counter 58 by 1 (block 172) and this sequence of events will be repeated until the counter reaches the count of 9 (block 174). Refer¬ ring to Fig. 7, it will be seen that by incrementing the M16 counter to a count of 9, the control field character Cj3T, the store number characters, and the ter¬ minal number characters will be ignored, since this data can be determined without referring to the message 36 and is the same for each header portion 38 generated by the terminal device 20. At count 9, the compressor will check (block 176) to see if the TRS flip-flop 79, located in the transaction register 78 (Fig. 9), has been set indica¬ ting that the first transaction character has been stored in the transaction register 78. If the flip- flop 79 has not been set, the compressor will store the most significant transaction character (block 178) in the transaction register 78 (Fig. 9) and then wait for the next interrupt (block 180) at which time the M16 counter 58 will output count 10. Upon receiving the next interrupt which indicates that the second trans-' action character is being outputted from the register 52 (Fig. 9), the compressor 22 will store the second or least significant transaction character (block 182) in the transaction register 78; wait for the next inter- rupt (block 184) and then set the TRS flip-flop 79 (block 186). The setting of the.TRS flip-flop 79 flags the compressor that the transaction number of the first message compressed by the data compres"sor~ 32 is -already stored in the transaction register 78, and that all the transaction numbers of all subsequent messages can be ignored, since the data expander 34 (Fig. 1) need only know the transaction number of the first message com- pressed to determine the transaction numbers of each of the subsequent messages compressed by the data compres¬ sor since the numbers are in consecutive order. Thus, in the case of the second message transmitted to the data compressor 22, the compressor upon checking the TRS flip-flop 79 to see if it is set (block 176) and finding that it is set will then wait for the next in¬ terrupt (block 177) indicating the presence of the least significant transaction character in the register 52. The compressor 22 will ignore this interrupt and then check for the next interrupt (block 184) indica¬ ting the storage of the first or most significant media character in the register 52. The M16 counter 58 will output count 11 at this time. Since the TRS flip- flop 79 is already set, the compressor will enter state 4 (Fig. 19), which occurs when the M16 counter 58 (Fig. 9) is at count 11 and clock pulse T8 (Fig. 11) has been generated (Fig. 19). At count 11, the compressor 22 will store (block 188) the most significant media char- acter in the media register 76 (Fig. 9) and then wait for the next interrupt (block 190). Upon the occurrence of the next interrupt which increments the M16 counter 58 to output count 12, the compressor 22 will store the least significant media character (block 192) in the Media register 76 (Fig. 9) and wait for the next interrupt (block 194) which indicates that the Qual code character/ is being outputted from the register 52 (Fig. 9). The compres¬ sor 22 will read the EJ table 80 (Fig. 12) (block 196) using the Qual code character (column 83) as an address and store the corresponding format control character SOT A or SOT B (block 198) in the field 47 (Fig. 8) of the compressed data record 46 (Fig. 8) " stored in the storage unit 32 (Fig. 9), increment (block 200) the address counter 134 (Fig. 9) and check the Qual code character for either a 01 or 03 (block 202). As des¬ cribed previously, if the Qual code character is either 01 or 03, the storing of the format control character SOTA. or SOT-B, with no bits located in the electronic journal code field 49 of the compressed data record 46 (Fig. 8) enables the expander 34 (Fig. 1) to reconstruct from the compressed data the proper Qual code. If the Qual code character was not 01 or 03, the compressor 22 will store the most significant EJ character (block 204) in the RAM storage unit 32 (Fig. 1) ,. increment (block 206) the address counter 134 (Fig. 9), store the least significant EJ character (block 208) in the stor¬ age unit 32 and again increment (block 210) the address counter 134 (Fig. 9). The incrementing of the address counter 134 will result in the EJ flip-flop 81 output¬ ting a signal EJ to the sequencer 60. As shown in Fig. 19, the generation of the signal EJ together with the count 13 of the M16 counter 58 results in the compres¬ sor entering state 5 at Point C (Fig. 18B and 18C). Referring to Fig. 18C, it will be seen that the compressor 22 upon entering state 5, will wait for the next interrupt (block 212) indicating that the next character SEQ (Fig. 7) in the header portion 38 is now being outputted by the register 52. The output -of the M16 counter 58 will at this time be at count 14. The compressor 22 resets (block 214) the WC counter 108 (Fig. 9); increment the WC counter (block 216) and waits for the next interrupt (block 218) at which time the M16 counter 58 will output count 15. The genera¬ tion of this next interrupt indicates that the most . significant operator ID character is now being output- ted from the register 52 (Fig. 9) over cable 74 through multiplexer 84 to the temporary file 106 (Fig. 13) of the ID table 104 (block 220). The compressor 22 then increments the WC counter 108 (block 222) and waits for the next interrupt signal to occur (block 224) which increments the M16 counter 58 to output count 16. When this interrupt signal occurs, the compressor will check the character being outputted from the register B 52 to see if it is an ID character (Fig. 7) indicating the end of the header portion 38 (block 226). If the character is not an ID character, the compressor will go back to block 222 and store that character which in this case would be the next operator ID character. The word counter 108 is then incremented to provide the address of the next operator ID character for storage in the temporary file 106 (Fig. 13). This sequence of events will continue until all seven operator ID char- acters are stored in the temporary file 106, at which time, the compressor will detect the end of header character ID, and then reset (block 228) the WC counter 108 and the IDTA counter 112 (Fig. 9) preparatory to comparing the operator ID character now stored in the temporary file 106 with the last operator ID stored in the ID table 104 (Fig. 13). In addition to counters 108 and 112, the CF flip-flop 122 and the NCF flip-flop 124 located in the comparator 114 (Fig. 9) will be reset. Referring to Fig. 13, it will be seen that the first bit in the 0 word location in the first field in the ID table 104 is labeled AF, which is the output of the flip-flop 105 (Fig. 9) and which is set to a logical one whenever its associated record field has stored therein an operator ID. The first bit in the eighth or last word location of the same field is la¬ beled PTF and is the output of the flip-flop 107 (Fig. 9) and is set to a logical one if this is the last field in the ID table 104 in which the seven 8-bit characters of an operator ID is stored. The function of the flip- flops 105 and 107 will be disclosed more fully herein¬ after in checking if the operator ID of the current header portion 38 is the same as the previous header • portion 38. Referring to Fig. 18D, the compressor 22 will read (block 230) the first record 103 in the ID table 104 (Fig. 13) and the AF flip-flop in that field is checked to see if it is set (block 232). At this time, the compressor will enter state 6 (Fig. 19). If the AF flip-flop 105 in the first field is not set, indicating an empty record, and which normally occurs when the first header portion 38 is processed by the compressor 22, the compressor 22 will set (block 234) the AF flip- flop 105 (Fig. 9) in that field and increment (block 236) the WC counter 108 and the IDTA counter 112 (Fig. 9) whose outputs will provide the address of the first character or word location in the first record 103 of the ID table 104 (Fig. 13). The co'mpressor 22 will check the output count of the WC counter 108 (block 238) to see if it is at 8, indicating that the seven characters of the operator ID have been stored in the first field or the ID table 104. At this time the com¬ pressor enters state 8 (Fig. 19). If the WC counter 108 is not at count 8, the compressor will store (block 242) the operator ID character in the field lo¬ cation whose address is the output count of the count- ers 108 and 112, and increment (block 244) the WC counter 108 and the IDTA counter 112 to provide the address of the next field location. This process will continue until all seven character ' s of the operator ID are stored in the first field of the ID table 104. At this time, the output of the WC counter 108 is at 8 (block 238) and.the compressor will read (block 240) the ID table to output the operator ID character to -the ID register 110 for storage in the field location 51 of the compressed data record 46 (Fig. 8) located in the RAM memory 32 (Fig. 9). If the compressor 22 upon reading the first record in the ID table (block 230) finds that the AF flip-flop 105 (Fig. 9) in that field is set (block 232) indicating an occupied field, the compressor 22 will increment the WC counter 108 and the IDTA counter 112 (block 246) and check the output of the WC counter 108 for the presence of an 8 count (block 248) which would indicate that the operator ID characters of the current header portion 38 have-been compared with the operator ID characters stored in the first field of the ID table 104. At this time, the compressor enters state 7 (Fig. 19). If % the output count of the WC counter 108 is not 8, the compressor 22 will output the current operator ID characters stored in the temporary file 106 to the ID register 110 from which the characters are then transmitted to the comparator 114 which compares (block 250) the current operator ID characters with the char¬ acters stored in the first field location of the ID table 104 (Fig. 13). If the comparator 114 finds that the operator ID characters are identical, the compres¬ sor will check to see if the NCF flip-flop 124 (Fig. 9) is set (block 258). If the NCF flip-flop 124 is not set, the compressor will set the CF flip-flop 122 (block 260) and increment the WC counter 108 and the IDTA counter 112 (block 256) and then check the output count of the WC counter 108 for the presence of an 8 count (block 248). If, in comparing the operator ID characters of the current header portion 38 with the operator ID characters stored in the ID table 104, the comparator 114 finds that the operator ID's do not compare, the comparator 114 will set the NCF flip-flop 124 (block 252), reset (block 254) the CF flip-flop 122 and then the processor will increment the WC counter 108 and the IDTA counter 112 (block 256). This sequence of operations will continue until the output of the WC counter 108 is equal to 8, at which time the compressor will read the next record in the ID table 104 (block 268) (Fig. 18F) for comparing the operator ID charac¬ ters stored in that record with the- current operator ID characters stored in the ID register 110 (Fig. 9). At this time the compressor enters state 10 (Fig. 19). The compressor 22 will then check the output of the comparator 114 to see if the CF flip-flop 122 is set (block 270). If the flip-flop 122 is not set, the signal NCF from the flip-flop 124 will be outputted to the sequencer 60 indicating that there is no comparison between the current header operator ID character and the operator ID record stored in ID table (Fig. 13). The compressor 22 resets (block 272) the PTF flip-flop 107 (Figs. 9 and 13) of the record field in the ID ta¬ ble 104 just compared. The resetting of the PTF flip- flop 107 indicates that the operator ID characters of the current header portion 38 are not equal to the previous field in the ID table just compared. The com¬ pressor 22 then resets (block 274) the WC counter 108 in preparation for comparing the operator ID charac¬ ters of the current header portion 38 with the operator ID characters found stored in the next record field in the ID table 104 (Fig. 1) and will return to state 6 (Fig. 19). This operation of the comparator 114 will continue until the compressor finds a comparison (block 270) (Fig. 18F) between the operator ID characters of the current header portion 38 and one of the operator ID character records 103 in the ID table 104 or it . finds a record in which the AF flip-flop 105 (Figs. 9 and 13) is not set (block 232). This condition indi- cates this record portion 103 of the ID table 104 is empty and none of the previously compared records com¬ pare with the operator ID of the current header portion 38. The current operator ID is then stored in the emp¬ ty record portion 103 of the ID table 104 and the AF flip-flop 105 will be set (block 234) (Fig. 18D) indi- eating the last field in the ID table 104 in which an operator ID is stored. If a comparison is found between the current operator ID characters (block 270) (Fig. l8F) and ne - of the records 103 in the ID table 104, the compressor 22 must determine ' if that record contains the operator ID characters of the last header portion 38 processed, in which case the operator ID field 51 in the com- pressed data record 46 (Fig. 8) is left blank. As des¬ cribed previously, this condition allows the expander 34 (Fig. 1) to reconstruct from the previous header portion the operator ID of the current header portion. If no comparison is found with any of the records 103 in the ID table 104, the compressor 22 will store in the operator ID field 51 of the compressed data record 46 (Fig. 8) four data bits representing the operator ID of the current header portion 38 and the seven charac- ters of the current operator ID in the first unoccupied record 103 of the ID table 104. After finding a com¬ parison (block 270), the compressor 22 will check to see if the PTF flip-flop 107 is set (block 276). If the PTF flip-flop 107 is set, indicating that this record portion 103 in the ID table 104 contains the operator ID characters from the last processed header portion 38, the compressor 22 will skip the operator ID field 51 in the compressed data record 46 (Fig. 8) (block 278) and store the end of word character EOR in the memory unit 32 (Fig. 9) outputted from the charac¬ ter encoder 128. The. compressor 22 then increments (block 280) the address counter 134 (Fig. 9) before re- __ - *" turning into the idle state one (Fig. 19) preparatory to compressing the next portion of the message 36 re- ceived by the bus monitor 48. If the compressor 22 in checking the PTF flip-flop 107 (block 276) finds the flip-flop in a re¬ set condition (PTF is a logical one) indicating that the matched operator ID's are not equal to the last header portion 38 processed, the compressor 22 will store (block 262) (Fig. 18E) the last four bits of the operator ID outputted from the ID register 110 and the end of word character EOR p outputted from the charac¬ ter encoder 128 in the compressed data record 46 (Fig. 8) located in the RAM memory 32. The compressor then sets (block 264) the PTF flip-flop 107 and increments (block 266) the address counter 134 (Fig. 9) before returning to the idle state (point A) preparatory to compressing the next character outputted from the regis¬ ter 52. Referring to Fig. 8, it will be seen that if the total number of bits in the compressed data record 46 is 8, the expander 34 (Fig. 1) will know that there are no bits in fields 49 and 51 and therefore knows that the transaction was a normal cash or charge trans¬ action depending on the format control character (SOT or SOT-.) present and further that the operator ID is the same as the operator of the previous transaction. If the number of bits is 12, a new operator ID is spe¬ cified. If the number of bits is 16, a new electronic journal code is specified and if the number of bits is 20, a new format code ' and operator ID is specified. While the present embodiment of the data com¬ pressor 22 has been described with respect to the off¬ line operation of the terminal upon the disabling of the central processor to receive any more data from the terminal, it is obvious that the data compressor can be used in those situations where the total amount of compressed data generated during a day's operation of the terminal can be stored within a memory unit contained in the terminal itself, thereby eliminating any need or expense of the central processor. As shown in Fig. 8, the data compressor can compress the origi¬ nal header portion 38 consisting of up to 176 bits of data to a compressed data record 46 of from 8 to 20 bits, thereby realizing a reduction of up to 8 to 1 in this portion of the message. As was described pre¬ viously, the compression of the data in the manner dis¬ closed would also result in the elimination of the tax portion 42 (Fig. 2) and the closing portion.44 of the" message 36 thereby providing a further reduction in the amount of data required to be stored in the memory unit 32. B _ ry- r* -?

Claims: CLAIMS 1. Data compression apparatus for compressing data messages each including redundant and non-redundant characters, including input means adapted to provide said messages in serial fo.rm, eliminating means adapted to eliminate said redundant characters and storage means arranged to store compressed data records rep¬ resenting said data messages, characterized in that said eliminating means includes counter means (58) adapted to generate consecutive counts representing the position of successive characters in the current data message (36), and timing control means (60, 62) adapted to receive said consecutive counts and to provide tim¬ ing control signals (TC) adapted. to control the storage in said storage means (32) of non-redundant informa- tion representing said non-redundant characters and in¬ cluded in said compressed data records, and to inhibit the storage in said storage means (32) of information corresponding to said redundant characters. 2. Data compression apparatus according to Claim 1, characterized in that said eliminating means includes encoding means (80, 128) coupled to said input means (48) and to said timing control means (60, 62) and responsive to a first one of said non-redundant char¬ acters (QUAL CODE) in each data message to provide a start-of-record character (SOT,, SOT β ) determined by the information content of said first one of said non- redundant characters (QUAL CODE) and identifying the start of a compressed data record (46) corresponding to the data message (36). 3. Data compression apparatus according to Claim 2, characterized in that said eliminating means includes a storage device (104) arranged to store at least a sec¬ ond one of said non-redundant characters (OP ID) of 3. ( concluded ) one of said data messages (36), comparison means (114) adapted to compare said second one of said non-redun¬ dant characters (OP ID) of the current message (36) with the or each stored second one of said non-redun¬ dant characters (OP ID) and in the event of every com- parison being invalid to control the storage of the second one of said non-redundant characters (OP ID) of the current data message in said storage device (104) and the storage of an abbreviated representation (51) thereof in the relevant compressed data record (46) in said storage means (32). 4. Data compression apparatus according to Claim 3, characterized in that said comparison means (114) is adapted in the event of detecting a valid comparison between the second one of said non-redundant characters (OP ID) of the current data message (36) and the sec¬ ond one of said non-redundant characters of the last processed data message (36) to inhibit the storage of the second one of said non-redundant characters (OP ID) of the current data message (36) in said storage means (32) and said storag_ device (104). 5. Data compression apparatus according to Claim 4, characterized in that said data messages (36) include respective third ones of said non-redundant characters (TRANS NO.) each differing from that of the immediately preceding data message by a constant value, and in that there is provided a further storage device (78) enabled by said timing control means (60, 62) to store a se¬ lected one of said third one of said non-redundant char¬ acters (TRANS NO.), and disabling means (79) responsive to the storage of said selected third one of said non- redundant characters (TRANS NO.) to inhibit the storage of the third one of said non-redundant' characters of subsequent data messages (36). 6. Data compression apparatus according to Claim 4, characterized in that said encoding means (80, 128) is adapted in response to said timing control means (60, 62) being supplied with a further predetermined one of said consecutive counts to provide an end-of-record character (E0R_r) identifying the end of the compressed data record (46), for storage in said storage means (32). 7. A method for compressing data messages each in¬ cluding redundant and non-redundant characters, includ¬ ing the step of eliminating the redundant characters of said messages to provide compressed data records representing said data messages, characterized by the steps of generating consecutive counts representing the position of successive characters in the current data message (36) and utilizing the generated counts to control the storage of non-redundant information representing said non-redundant characters and inhibit¬ ing the storage of information corresponding to said redundant character. 8. A method according to Claim 7, characterized by the steps of generating a start-of-record character (SOTA., SOT_B in accordance with a first one of said non-redundant characters (QUAL CODE), and storing said s start-of-record character (SOT A,., S0T_o as the first character of the compressed data record (46). 9. A method according to Claim 8, characterized in that said step of generating a start-of-record charac¬ ter (SOT A., SOT D -5) includes the steps of storing a plu- rality of start-of-record characters (87, 89) with re- spective corresponding characters (83) representing said first one of said non-redundant characters, (QUAL CODE); addressing the stored start-of-record characters (87, 89) utilizing the first one of said non-redundant char- 9. (concluded) acters of said data messages (36); and storing only the addressed start-of-record character (SOT., SOT-,) to represent the information content of the first one of said non-redundant characters (QUAL CODE) when said first one of said non-redundant characters is of a pre¬ determined class. 10. A method according to Claim 9, characterized by the step of comparing a second one of said non-redun¬ dant characters (OP ID) of the current data message (36) with the second one of said non-redundant charac- ters (OP ID) of the or each preceding data message (36); and storing an abbreviated representation (51) of the second one of said non-redundant characters of the current data message (36) as a part of the relevant compressed data record (46) if no valid comparison is found. 11. A method according to Claim 10, characterized in that sai.d step of comparing includes the steps of stor¬ ing the second one of said non-redundant characters (OP ID) of at least the first data message (36); comparing the second one of said non-redundant characters (OP ID) of each succeeding data message (36) with the previous¬ ly stored second non-redundant characters (OP ID); and when no comparison is found storing the second one of said non-redundant characters (OP ID) of the current data message (36). 12. A method according to Claim 11, wherein said data messages include respective third ones of said non- redundant characters (TRANS NO.) each differing from that of the immediately preceding data message by a constant value, characterized by the step of storing the third one of said non-redundant characters (TRANS NO.) of the first data message (36) and inhibiting the 12. ( concluded ) storage of the third one of said non-redundant charac¬ ters (TRANS NO.) of subsequent data messages (36). 13. A method according to Claim 12, characterized by the steps of generating an end-of-record character (EOR_) identifying the end of the compressed data re¬ cord (46) and storing said end-of-record character (E0R p ) as the last character of said compressed data record (46) .

Inventors: GIRARD D, PAUGSTAT J
Applicants: NCR CO, NCR CORP
Application year: 1979
Main classification: G06F5
IPC codes: G06F5, G06F7, H03M7