CN1119865C - Letter compressing method - Google Patents

Letter compressing method Download PDF

Info

Publication number
CN1119865C
CN1119865C CN 98104355 CN98104355A CN1119865C CN 1119865 C CN1119865 C CN 1119865C CN 98104355 CN98104355 CN 98104355 CN 98104355 A CN98104355 A CN 98104355A CN 1119865 C CN1119865 C CN 1119865C
Authority
CN
China
Prior art keywords
sign indicating
indicating number
letter
tail
symbol
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN 98104355
Other languages
Chinese (zh)
Other versions
CN1224953A (en
Inventor
莫自治
赖勇成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
DABA ELECTRONIC Co Ltd
Original Assignee
DABA ELECTRONIC Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by DABA ELECTRONIC Co Ltd filed Critical DABA ELECTRONIC Co Ltd
Priority to CN 98104355 priority Critical patent/CN1119865C/en
Publication of CN1224953A publication Critical patent/CN1224953A/en
Application granted granted Critical
Publication of CN1119865C publication Critical patent/CN1119865C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Machine Translation (AREA)

Abstract

The present invention relates to a letter compressing method which is characterized in that a letter is stored in a specific position and a storage unit; symbols of 26 English letters are aggregated by an encoding method; the symbols are cut to two halves respectively marked as a head code and a tail code; the head code is stored in the specific position, and the tail code is stored in the storage unit for reducing the storage space; then, 16 letters can be stored in 10 bytes by matching with the special design of a data structure. Therefore, the 26 English letters can effectively reduce the storage space in an equivalent five-position encoding mode, and small storage space can store more telephone identification codes.

Description

The method of letter compression
The present invention relates to a kind of method of letter compression, relate in particular to a kind of method that is applied to the letter compression of stored telephone identification code (CallerID) in the telephone set.
Because the demand in market, a kind of telephone set of tool telephone identifying code are popularized gradually.Telephone identifying code generally includes information such as caller's name (or code), the time and date of sending a telegram here, and when phone was dragged on, the user can learn incoming call for Whom in advance, connect or do not connect this phone with decision.Such way can make receiving calls that the user more feels at ease, and certainly, in the generation that prevents illegal thing, has more its positive effect.
Because a people's name is usually within 16 letters, again because ASCII character system uses 8 coding, in order to compile out the sign indicating number of representative 256 distinct symbols, wherein English capitalization is to 3AH from sexadesimal system 21H, so depositing telephone identifying code name memory space partly is to be designed to 16 bytes (Bytes), but such practice obviously remains to be improved.
See also Fig. 1, in the telephone set of tool telephone identifying code, the data structure of the telephone identifying code of prior art is divided into three partly usually.First 11 is 2 bytes partly, is used for the resting period, for example 10: 30, then leaves first partly the data in and is " 1030 ".Second 12 also is 2 bytes partly, in order to deposit the date, for example November two No. ten, then is " 1120 ".The 3rd partly 13 sizes be 16 bytes, in order to depositing caller's name code, for example " AB...N " then exists the 3rd partly 13 for sexadesimal system 21,22 ..., 2E; Wherein first partly and second partly system is with binary-coded decimal (BCD) expression, and the 3rd partly 13 represent with ASCII character.
In fact, the 3rd 13 name code partly get final product because be made up of capitalization English letter, and English alphabet has 26, so be that codified is finished with five, does not need to use eight.But the addressing of memory normally is unit with the byte, if the saving memory space, with per five be unit, will exist with eight (equaling a byte) through five coded datas " then " serve as in the memory of addressing unit, read and write data and to handle the complexity that but becomes many.
The object of the present invention is to provide a kind of method of letter compression, it can effectively reduce memory space in the mode of five codings of equivalence with 26 English alphabets, makes less memory space can store more telephone identifying code.
The object of the present invention is achieved like this:
A kind of method of letter compression, in order to store a letter, this letter system is included in the assemble of symbol, is characterized in may further comprise the steps:
Step 1 is provided with First Five-Year Plan position coding, and first is that the head sign indicating number is a certain bits, and second to the 5th is that the tail sign indicating number is a memory cell, and described assemble of symbol just is arranged in the tail sign indicating number, and four tail sign indicating numbers can be formed 16 kinds of sign indicating numbers;
Step 2, head sign indicating number represent that with " 0 " and " 1 " head sign indicating number " a 0 " pairing tail sign indicating number is that assemble of symbol is " A, B, C, D, E, F, G, H, I, J, K, L, M "; Head sign indicating number " 1 " pairing tail sign indicating number is " N, O, P, Q, R, S, T, U, V, W, X, Y, Z ";
Step 3 is compiled the tail sign indicating number of assemble of symbol " A, B, C, D, E, F, G, H; I, J, K, L, M " respectively and to be sexadesimal system " 0,1,2,3,4; 5,6,7,8,9, A, B, C ", and in like manner the tail sign indicating number of assemble of symbol " N; O, P, Q, R, S, T, U, V; W, X, Y, Z " also is " 0,1,2,3,4; 5,6,7,8,9, A, B, C ".
In the method for above-mentioned letter compression, wherein, the word preface of described letter by assemble of symbol A} is 0, and B} is 1 ...., to { Z} 25 represents; The word preface that this is alphabetical is the value of decision head sign indicating number divided by 13 merchant, and its remainder determines the value of this memory cell.
In the method for above-mentioned letter compression, wherein, described size in order to the memory cell of storing a letter is to be four positions.
In the method for above-mentioned letter compression, wherein, the tail code memory unit of described four positions forms 16 positions, form the memory space of one 10 byte-sized, and the memory space of this 10 byte-sized holds 16 letters at most.
The present invention, then sets a certain bits and is " 0 " if stored English alphabet is the letter of first half because English symbol set is cut apart half, otherwise then " 1 "; Secondly determine the value of a memory cell (4 positions get final product) according to the word preface in stored two subclass of English alphabet after cutting apart half, therefore, store a letter and only need 5 positions, so the space of stored telephone identification code is greatly reduced.
Embodiment by following method to the present invention's letter compression can further understand purpose of the present invention, characteristics and advantage in conjunction with the description of its accompanying drawing.Wherein, accompanying drawing is:
Fig. 1 is the telephone identifying code data structure of prior art.
Telephone identifying code data structure in the method for the letter compression that Fig. 2 is and the present invention proposes.
See also Fig. 2.As previously mentioned, English alphabet in telephone identifying code 30 names is in fact encoded with five (bit) and is got final product, but if pure order of shining the letter arrangement is encoded, on the contrary can more apparent complexity when handling, so this propose a kind of can five codings, coding method that again can be not complicated during processing is as listed head sign indicating number/tail (Header/Tailer) table of comparisons.The first half " A, B, C, D, E, F, G, H, I, J, K, L, M " of English alphabet is invested the head sign indicating number of " 0 ", and the head sign indicating number of latter half of English alphabet " N, O, P, Q, R, S, T, U, V, W, X, Y, Z " then is " 1 ".Secondly arrive " C " in that A is compiled respectively to sexadesimal system " 0 " to the tail sign indicating number of M, in like manner " N " to arrive the tail sign indicating number of " Z " also be that " 0 " arrives " C ".
First part and second time and date partly need not to add to handle, so there is no change because itself be binary-coded decimal (BCD).Different places is to plan that the head sign indicating number part 31 of 16 certain bits is in order to store the head sign indicating number (Header) of 16 letters respectively; Simultaneously with 16 memory cell, 4 Bits of each memory cell can represent 16 kinds of sign indicating numbers at most, represent to be divided into 13 English alphabets (A~M or the N~Z) of half.
That is, when central processing unit (CPU) a certain English alphabet write memory of telephone identifying code name the time, must judge earlier that this English alphabet be to belong to preceding 13 letters or be 13 letters in back.If preceding 13 letters then write " 0 " in the certain bits, word preface (0 to 12) that again should letter writes a memory cell; Otherwise, if belong to 13 letters in back, then " 1 " is write in this certain bits, again should letter write this memory cell above the word preface (0 to 12) of " M ".This memory cell is four, adds this certain bits, totally five.Store letter with five, so memory space is greatly reduced.
When writing data, (hexadecimal is 21 can earlier the ASCII character of input alphabet to be deducted the ASCII character of " A ", decade is 33), can obtain this alphabetical word preface, when for example importing " A ", " A " ASCII character own is subtracted each other, the word preface is 0, the ASCII character of " Z " (decade is 58) again for example deducts the ASCII character (decade is 33) of " A ", get final product word preface 25.Again with this word preface divided by 13, the quotient of gained is head sign indicating number (Header), remainder is tail sign indicating number (Tailer), for example the word preface of " A " is 0, divided by 13, can get the head sign indicating number is 0, and the tail sign indicating number also is 0, and the word preface of " Z " is 25, divided by 13, can get head sign indicating number 1, tail sign indicating number 12 (hexadecimal is C).Certainly, if do not do in fact with division, also can do with subtraction, principle is then identical.
And when sense data, can in regular turn the data of head sign indicating number part 31 and tail sign indicating number part 32 be read one by one.When whenever reading a stature sign indicating number and a tail sign indicating number, the head sign indicating number be multiply by 13, add the tail sign indicating number, the ASCII character of adding " A " promptly is reduced to the ASCII character of original letter.
In Fig. 2, in order to clearly demonstrate, for the name example that is " JOHNSONYKK ".From the beginning sign indicating number/tail sign indicating number the table of comparisons can get, and its sign indicating number is that " 01011111100 " tail sign indicating number then is " 9170510BAA " (with hexadecimal representation).Because present embodiment is to be example to store 16 letters, not the part of foot 16 letters then a head sign indicating number/tail sign indicating number mend hexadecimal " 0 " respectively and reach " F ", so really be stored in the data of memory be, the head sign indicating number is 31 " 6F00 " partly, and the tail sign indicating number is 32 " 9170510BAAFFFFFF " partly.For assorted petty tail sign indicating number discord head sign indicating number is equally mended " 0 "? because if the tail sign indicating number also is " 0 ", then when central processing unit reads back these data, can judge by accident and be English alphabet " A ", in order to prevent erroneous judgement, thus tail sign indicating number benefit hexadecimal " F ", and do not mend " 0 ".
In fact, the present invention also can be applicable to 8 letters of storage, 24 letters, 32 letters etc., if 8 letters of storage, then only needing 5 bytes (Bytes), 24 letters of storage then only to need 15 bytes, 32 letters then is 20 bytes ....Can seem than general storage, each byte is deposited a letter, and compressible is 5/8ths times memory space.
On using, the present invention be with letter commonly used ' A ', ' B ', ... ' Z ' } be an assemble of symbol, half is encoded to get it, certainly can be optionally, change into other symbol, or add some symbols commonly used (with present embodiment, in fact when compiling into six symbols).
Above-mentioned mathematical operation is that the arithmetic logic unit (ALU) that can utilize central processing unit is reached, and the technology of central processing unit is to be a prior art, so the present invention seldom describes.By above-mentioned diagram and explanation, we utilize the particular design of coding and data structure as can be known, can make telephone identifying code (CallerID) store name letter memory space partly and be reduced to 5/8ths times, in other words, same memory space can write down more telephone identifying code.

Claims (4)

1. the method for a letter compression, in order to store a letter, this letter system is included in the assemble of symbol, it is characterized in that may further comprise the steps:
Step 1 is provided with First Five-Year Plan position coding, and first is that the head sign indicating number is a certain bits, and second to the 5th is that the tail sign indicating number is a memory cell, and described assemble of symbol just is arranged in the tail sign indicating number, and four tail sign indicating numbers can be formed 16 kinds of sign indicating numbers;
Step 2, head sign indicating number represent that with " 0 " and " 1 " head sign indicating number " a 0 " pairing tail sign indicating number is that assemble of symbol is " A, B, C, D, E, F, G, H, I, J, K, L, M "; Head sign indicating number " 1 " pairing tail sign indicating number is " N, O, P, Q, R, S, T, U, V, W, X, Y, Z ";
Step 3 is compiled the tail sign indicating number of assemble of symbol " A, B, C, D, E, F, G, H; I, J, K, L, M " respectively and to be sexadesimal system " 0,1,2,3,4; 5,6,7,8,9, A, B, C ", and in like manner the tail sign indicating number of assemble of symbol " N; O, P, Q, R, S, T, U, V; W, X, Y, Z " also is " 0,1,2,3,4; 5,6,7,8,9, A, B, C ".
2. the method for letter compression as claimed in claim 1 is characterized in that: the word preface of described letter by assemble of symbol A} is 0, and B} is 1 ...., to { Z} 25 represents; The word preface that this is alphabetical is the value of decision head sign indicating number divided by 13 merchant, and its remainder determines the value of this memory cell.
3. the method for letter compression as claimed in claim 1 is characterized in that: described size in order to the memory cell of storing a letter is to be four positions.
4. the method for letter compression as claimed in claim 1 is characterized in that: the tail code memory unit of described four positions forms 16 positions, form the memory space of one 10 byte-sized, and the memory space of this 10 byte-sized holds 16 letters at most.
CN 98104355 1998-01-26 1998-01-26 Letter compressing method Expired - Fee Related CN1119865C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 98104355 CN1119865C (en) 1998-01-26 1998-01-26 Letter compressing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 98104355 CN1119865C (en) 1998-01-26 1998-01-26 Letter compressing method

Publications (2)

Publication Number Publication Date
CN1224953A CN1224953A (en) 1999-08-04
CN1119865C true CN1119865C (en) 2003-08-27

Family

ID=5218231

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 98104355 Expired - Fee Related CN1119865C (en) 1998-01-26 1998-01-26 Letter compressing method

Country Status (1)

Country Link
CN (1) CN1119865C (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1297934C (en) * 2003-07-15 2007-01-31 蔡长林 Hidden cipher coding and identifying method

Also Published As

Publication number Publication date
CN1224953A (en) 1999-08-04

Similar Documents

Publication Publication Date Title
US4939639A (en) Method of facilitating computer sorting
CN100495318C (en) Compression and uncompression method of integer data and device thereof
US4782325A (en) Arrangement for data compression
CN110147536B (en) Data processing method, device and equipment based on file mapping
JPS6122808B2 (en)
GB1315060A (en) Data processor
KR940003198B1 (en) Coard convert apparatus
US5444445A (en) Master + exception list method and apparatus for efficient compression of data having redundant characteristics
CN106649217A (en) Data matching method and device
CN1119865C (en) Letter compressing method
CN109831544B (en) Code storage method and system applied to email address
CN105938469A (en) Code storage method, data storage structure of texts and method for compressed storage of texts and statistics output
CN112016270A (en) Chinese-sensible code logistics information coding method, device and equipment
CN101201829B (en) Chinese character library system as well as character code display method thereof
Ryabko Fast and efficient coding of information sources
CN115510811A (en) Character string encoding and decoding methods, encoding device and decoding device
JPH0695727B2 (en) Image data compression device
CN113779932A (en) Digital formatting method, device, terminal equipment and storage medium
JPS60105040A (en) Sentence retrieving system
CN109660262A (en) A kind of character coding method and system applied to E-mail address
CN111614613A (en) Data compression method
Cox Speaking Stata: On numbers and strings
CN109829335A (en) A kind of method and system applied to the desensitization of E-mail address sensitive information
CN113037292A (en) Data compression method and data decompression method of structured database and communication equipment
KR20000001285A (en) Method for formatting and transforming date of computer for solving millenium bug

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
PP01 Preservation of patent right

Effective date of registration: 20060510

Pledge (preservation): Preservation

PD01 Discharge of preservation of patent

Date of registration: 20070515

Pledge (preservation): Preservation

C19 Lapse of patent right due to non-payment of the annual fee
CF01 Termination of patent right due to non-payment of annual fee