Summary of the invention
In order to solve in the prior art, storage adopts the user data of GSM7 and UCS280 coding to take the bigger problem in SIM phone directory space.The embodiment of the invention provides a kind of storage, read method, Apparatus and system of client identification card phone directory.
The date storage method of a kind of client identification card that the embodiment of the invention provides comprises:
Receive the character to be stored of input;
According to the character to be stored of said input, select coded format, said coded format comprises: GSM7 or UCS2 80 or UCS2 81 or UCS2 82; Said character according to said input, select coded format to comprise: according to the character of said input, selecting coded format is GSM7 or UCS2 80; According to described selection coding lattice is UCS2 80, obtains the minimum value of UCS2 80 characters; According to the minimum value of said UCS2 80 characters, obtain the deviant of said UCS2 80 characters; With UCS2 80 characters of said deviant in 127, select UCS2 81 or UCS2 82 to encode; If the minimum value of described UCS2 80 characters in the represented scope of byte, selects UCS2 81 to encode; If the minimum value of described UCS2 80 characters in the represented scope of two bytes, selects UCS2 82 to encode;
According to selected coded format, the character of said input is encoded, obtain character code;
Said character code is sent to portable terminal, indicate said portable terminal that said character code is stored in the said client identification card of said portable terminal.
A kind of main frame that the embodiment of the invention provides comprises:
Receiving element is used to receive the character to be stored of input;
The coded format selected cell is used for the character said to be stored according to input, selects coded format, and said coded format comprises: GSM7 or UCS2 80 or UCS2 81 or UCS2 82; Said character according to said input, select coded format to comprise: according to the character of said input, selecting coded format is GSM7 or UCS2 80; According to described selection coding lattice is UCS2 80, obtains the minimum value of UCS2 80 characters; According to the minimum value of said UCS2 80 characters, obtain the deviant of said UCS2 80 characters; With UCS2 80 characters of said deviant in 127, select UCS2 81 or UCS2 82 to encode; If the minimum value of described UCS2 80 characters in the represented scope of byte, selects UCS2 81 to encode; If the minimum value of described UCS2 80 characters in the represented scope of two bytes, selects UCS2 82 to encode;
Coding unit is used for according to the selected coded format of said coded format selected cell said character to be stored being encoded, and obtains coded data;
Transmitting element is used for said coded data and store instruction are sent to portable terminal, and said portable terminal is used for according to said store instruction said coded data being stored in the client identification card of said portable terminal.
The date storage method of the another kind of client identification card that the embodiment of the invention provides comprises:
Receive the first coding data that main frame sends, said first coding data is the data that said main frame is encoded the character of user's input to obtain according to first coded format, and said first coded format is GSM7 or UCS2 80;
According to said first coding data, obtain the character of said user's input, according to the character of said user's input, select second coded format, said second coded format is GSM7 or UCS2 80 or UCS2 81 or UCS2 82;
According to said second coded format, said first coding data is transformed second coded data; Said second coded data is the data that the character of said user's input is encoded and obtained according to second coded format;
Said second coded data is stored in the said client identification card.
Another kind of a kind of portable terminal that the embodiment of the invention provides comprises:
Receiving element is used to receive the first coding data that main frame sends, and said first coding data is the data that said main frame is encoded the character of user's input to obtain according to first coded format, and said first coded format is GSM7 or UCS2 80;
The coded format selected cell: be used for according to said first coding data, obtain the character of said user's input, according to the character of said user's input, select second coded format, said second coded format is GSM7 or UCS2 80 or UCS2 81 or UCS2 82;
Coded format conversion unit: be used for said first coding data being converted into second coded data according to said second coded format; Said second coded data is the data that the character of said user's input is encoded and obtained according to second coded format;
Client identification card: be used to store said second coded data.
The storage system of the data of a kind of client identification card that the embodiment of the invention provides comprises:
Main frame is used to receive the character to be stored of input, selects coded format according to said character to be stored,, said coded format comprises: GSM7 or UCS2 80 or UCS2 81 or UCS2 82; Said character according to said input, select coded format to comprise: according to the character of said input, selecting coded format is GSM7 or UCS2 80; According to described selection coding lattice is UCS2 80, obtains the minimum value of UCS2 80 characters; According to the minimum value of said UCS2 80 characters, obtain the deviant of said UCS2 80 characters; With UCS2 80 characters of said deviant in 127, select UCS2 81 or UCS2 82 to encode; If the minimum value of described UCS2 80 characters in the represented scope of byte, selects UCS2 81 to encode; If the minimum value of described UCS2 80 characters in the represented scope of two bytes, selects UCS2 82 to encode; And according to the coded format of selecting said character to be stored is encoded, obtain coded data, send said coded data and store instruction;
Portable terminal is used to receive store instruction, according to said store instruction said coded data is stored in the said client identification card of said portable terminal.
The storage system of the data of the another kind of client identification card that the embodiment of the invention provides comprises:
Main frame is used to receive the character of input, and the character of said input is encoded with first coded format, obtains first coding data, sends said first coding data, and said first coded format is GSM7 or UCS2 80;
Portable terminal; Be used to receive said first coding data,, obtain the character of said user's input according to said first coding data; Character according to said user's input; Select second coded format, said second coded format is GSM7 or UCS2 80 or UCS2 81 or UCS2 82, is converted into second coded data according to the said first coding data of said second coded format; And in the said client identification card with said second coded data storage and said portable terminal; Said second coded data is the data that the character of said user's input is encoded and obtained according to second coded format.
The date storage method of the client identification card that the embodiment of the invention provides, Apparatus and system; Through selecting coded format for user inputs character; It is little to make that the coding of user inputs character takes up room, thereby improves the data storage capacity of client identification card phone directory; In prior art; Except Latin languages such as West Europe can be set to a byte code of GSM7 coded format; Other Languages uses the coding of two bytes of UCS2 80 codings to compare; The embodiment of the invention can also select to take the less UCS2 of memory space 81 codings and UCS2 82 codings, thereby makes the coding of user inputs character can take less memory space, improves the data storage capacity of client identification card phone directory.
The method for reading data of the client identification card that the embodiment of the invention provides comprises:
Send data read command to portable terminal;
Receive the coded data that said portable terminal obtains from the said client identification card of said portable terminal according to said data read command;
Coded format according to said coded data is decoded to said coded data, and said coded format comprises: GSM7 or UCS2 80 or UCS2 81 or UCS2 82, and wherein, according to the character of said input, selecting coded format is GSM7 or UCS2 80; According to described selection coding lattice is UCS2 80, obtains the minimum value of UCS2 80 characters; According to the minimum value of said UCS2 80 characters, obtain the deviant of said UCS2 80 characters; With UCS2 80 characters of said deviant in 127, select UCS2 81 or UCS282 to encode; If the minimum value of described UCS2 80 characters in the represented scope of byte, selects UCS2 81 to encode; If the minimum value of described UCS2 80 characters in the represented scope of two bytes, selects UCS2 82 to encode.
A kind of main frame that the embodiment of the invention provides comprises:
Command sending unit is used for sending data read command to portable terminal;
Coded data acquiring unit: be used for receiving the coded data that said portable terminal obtains from the said client identification card of said portable terminal according to said data read command;
Decoding unit: be used for according to the coded format of said coded data said coded data being decoded, said coded format comprises: GSM7 or UCS2 80 or UCS2 81 or UCS2 82; Wherein, according to the character of said input, selecting coded format is GSM7 or UCS2 80; According to described selection coding lattice is UCS2 80, obtains the minimum value of UCS2 80 characters; According to the minimum value of said UCS2 80 characters, obtain the deviant of said UCS2 80 characters; With UCS2 80 characters of said deviant in 127, select UCS2 81 or UCS2 82 to encode.
The method for reading data of the another kind of client identification card that the embodiment of the invention provides comprises:
Receive the reading command of main frame;
According to said reading command, from said client identification card, obtain second coded data; Said second coded data is the data that user data is encoded and obtained with second coded format, and said second coded format is GSM7 or UCS2 80 or UCS2 81 or UCS2 82;
According to said second coded format, convert said second coded data into first coding data; Said first coding data is the data that said user data is encoded and obtained with first coded format, and said first coded format is GSM7 or UCS2 80;
Said first coding data is sent to said main frame.
Another kind of a kind of portable terminal that the embodiment of the invention provides comprises:
Subscriber identification card is used for the memory encoding data;
Receiving element is used to receive the reading command of main frame;
Information acquisition unit: be used for according to said reading command, from said subscriber identification card, obtain second coded data; Said second coded data is the data that user data is encoded and obtained with second coded format, and said second coded format is GSM7 or UCS2 80 or UCS2 81 or UCS2 82;
Transcoder unit: be used for converting said second coded data into first coding data according to said second coded format; Said first coding data is the data that said user data is encoded and obtained with first coded format, and said first coded format is GSM7 or UCS2 80;
Information transmitting unit: be used for said first coding data is sent to said main frame.
The reading system of the data of a kind of client identification card that the embodiment of the invention provides, said system comprises:
Main frame; Be used to send data read command, the received code data are decoded to said coded data according to the coded format of said coded data; Said coded format comprises: GSM7 or UCS2 80 or UCS281 or UCS2 82; Wherein, according to the character of said input, selecting coded format is GSM7 or UCS2 80; According to described selection coding lattice is UCS2 80, obtains the minimum value of UCS2 80 characters; According to the minimum value of said UCS280 character, obtain the deviant of said UCS2 80 characters; With UCS2 80 characters of said deviant in 127, select UCS2 81 or UCS2 82 to encode;
Portable terminal is used to receive said data read command, from the said client identification card of said portable terminal, obtains said coded data according to said data read command.
The reading system of the data of the another kind of client identification card that the embodiment of the invention provides comprises:
Main frame is used to send reading command, and receives first coding data;
Portable terminal is used to receive said reading command, from the said client identification card of said portable terminal, obtains second coded data; Convert said second coded data into said first coding data, and said first coding data is sent to said main frame; Said second coded data is the data that user data is encoded and obtained with second coded format, and said second coded format is GSM7 or UCS2 80 or UCS2 81 or UCS2 82; Said first coding data is the data that said user data is encoded and obtained with first coded format, and said first coded format is GSM7 or UCS2 80.
The method for reading data of the client identification card that the embodiment of the invention provides, Apparatus and system through data read command, obtain the coded data that the user needs; According to the conversion of decoding accordingly or encode of the coded format of said data, thereby the character that the user can be discerned is shown to the user; In prior art; Only can compare with the scheme that the coded format of UCS2 80 is decoded GSM7; The embodiment of the invention can also support UCS2 81 and UCS2 82 decodings and coding to transform simultaneously, thereby the coded data that will occupy the SIM memory space shows according to user's request.
Embodiment
In order to solve in the prior art; Input character is that other language beyond the Latin language such as West Europe are only supported in the UCS2 coding UCS2 80 coded formats to carry out code storage to cause the big problem of memory space that takies; Adopt the embodiment of the invention can be set to the byte code of GSM7 coded format except common Latin languages such as West Europe; Other Languages not only can be selected UCS2 80 codings for use according to the needs of actual input character, can also select for use to take less UCS2 81 codings of memory space and UCS2 82 codings.UCS2 81 has significantly reduced the memory space of data such as name in SIM with the appearance of UCS2 82 coded systems.
At first introduce the UCS2 coding principle below so that the clearer understanding of those skilled in the art technical scheme of the present invention.Usually; The name that is stored in the SIM telephone directory adopts three kinds of UCS2 coded formats: first kind of UCS2 80 coding generally is used for pure English; Second kind of UCS2 81 coding encoded with the third UCS2 82 and generally is used for the situation of non-English; Its main difference is that the interval range of all characters of UCS2 81 coding requirements in the UCS2 coding is no more than 127, and 82 codings are unrestricted.Introduce one by one below.
But the first clock UCS2,80 coded system reference tables one; First Byte 1 of data be character string ' 80 '; Ensuing Byte s (eight bit byte) is 16 bits UCS2 characters; Numbering is the MSB (high byte) of UCS2 character in preceding byte, the numbering after be the LSB (low byte) of UCS2 character.For example second Byte comprised the MSB of first UCS2 character, and the 3rd Byte comprised the LSB of first UCS2 character, and the Byte that does not use then is changed to ' FF '.
Table 1 80 codings for example
Byte?1 |
Byte?2 |
Byte?3 |
Byte?4 |
Byte?5 |
Byte?6 |
Byte?7 |
Byte?8 |
Byte?9 |
′80′ |
Ch1
MSB |
Ch1
LSB |
Ch2
MSB |
Ch2
LSB |
Ch3
MSB |
Ch3
LSB |
′FF′ |
′FF′ |
Under this kind coding, if SIM maximum storage field is a n byte, the UCS2 character that then can represent is (n/2-1) to the maximum.
For example: " 80 4E 2D, 56 FD FF FF " expression " China ".
But second kind of UCS2 81 coded system reference table two, first character string is ' 81 ', ensuing Byte 2 expression character numbers, the 3rd Byte (Byte 3) is the bit 15 to bit8 of 16 basic pointers; In this basic pointer, bitl6 puts ' O ', and bit7 also is changed to ' 0 ' to bitl; The bit8 of the 4th and later Bytes is if zero, and what then the bit7 of the 4th and later Bytes represented to bitl is exactly corresponding characters in the GSM7 character list; If bit8 is l, what then the bit7 of the 4th and later Bytes represented to bitl is exactly a side-play amount of UCS2 coding, adds that with this side-play amount foregoing basic pointer just can obtain required UCS2 sign indicating number.
Table 2 81 codings for example
Byte?1 |
Byte?2 |
Byte?3 |
Byte?4 |
Byte?5 |
Byte?6 |
Byte?7 |
Byte?8 |
Byte?9 |
′81′ |
′05′ |
′13′ |
′53′ |
′95′ |
′A6′ |
′XX′ |
′FF′ |
′FF′ |
Under this kind coding, if SIM maximum storage field is a n byte, the UCS2 character that then can represent is (n-3) to the maximum, but all USC2 characters can not surpass 127 from plot.This is coded in three kinds of codings and saves the space most, but 127 skew quantitative limitations are arranged, and the plot scope also has restriction, thus under Chinese DeGrain, but just advantageous in language such as Russian (Cyrillic literary composition).
For example:
Russian " И р И a Ac " adopts the Cyrillic literary composition, and 81 corresponding codings are " 810F0898C0B8BDB02090C1 ", and specific explanations is following:
81 presentation code forms are USC281;
0F representes that input character length is 15;
08 expression base address 0400;
98 presentation address are 0418, i.e. Cyrillic literary composition И;
The C0 presentation address is 0440, i.e. Cyrillic literary composition p;
The B8 presentation address is 0438, i.e. Cyrillic literary composition И;
The BD presentation address is 043D, i.e. Cyrillic literary composition H;
The B0 presentation address is 0430, i.e. Cyrillic literary composition a;
20 presentation address are 20, i.e. space, and bit7=0 is so this is the GSM7 coding;
90 presentation address are 0410, i.e. Cyrillic literary composition A;
The C1 presentation address is 0441, i.e. Cyrillic literary composition c.
But the third UCS282 coded system reference table three; First character string is ' 82 '; Ensuing second Byte comprised character number; The 3rd and the 4th Byte form 16 a complete basic pointer, if the bit8 of the 5th and later Byte is zero, what then the bit7 of the 5th and later Byte represented to bit1 is exactly corresponding characters in the GSM7 character list; If the bits8 of the 5th and later Byte is 1, then the bit7 of the 5th and later Byte to the bit1 bit representation be exactly a side-play amount of UCS2 coding, this side-play amount of usefulness adds that the basic pointer of front is exactly required UCS2 sign indicating number.
Table 3 82 codings for example
Byte1 |
Byte2 |
Byte3 |
Byte4 |
Byte5 |
Byte6 |
Byte7 |
Byte8 |
Byte9 |
′82′ |
′05′ |
′05′ |
′30′ |
′2D′ |
′82′ |
′D3′ |
′2D′ |
′31′ |
[0099]Under this kind coding, if SIM maximum storage field is a n byte, the UCS2 character that then can represent is (n-4) to the maximum, but all USC2 characters can not surpass 127 from plot.The same with 82 codings, 81 codings also have 127 skew quantitative limitations, thus under Chinese DeGrain, but just advantageous in language such as Russian (Cyrillic civilian).
For example, the Chinese character "a Ding Yu seven
ㄒ
bottomless three"
80 coding " 4E004E014E024E034E044E054E064E074E084E09 " (continuous)
81 coding " 0A9C80818283848586878889 " (continuous)
82 coding " 0A4E0080818283848586878889 " (continuous)
Three kinds of its contrasts of coding are summed up as shown in table 4 in sum;
Three kinds of codings of table 4 contrast table
? |
80 codings |
81 codings |
82 codings |
Form |
80 CH1msbCH11sbCH2msbCH21sb… |
81 length (1 byte) plots (1 byte) data (each data 1 byte) |
82 length (1 byte) plots (2 byte) data (each data 1 byte) |
Can support maximum UCS2 number of characters, suppose the maximum n of support of SIM byte |
n/2-1 ? |
n-3 |
n-4 |
The UCS2 character content restriction of codified |
Do not have |
1) each UCS2 character and plot deviation are not more than 127; 2) plot is a byte, and expression is limited in scope |
Each UCS2 character and plot deviation are not more than 127 |
From three kinds of codings of top USC2 were introduced, in the prior art, the standard AT command of 3GPP had only used USC2 80 codings, a kind of coding that space utilization efficient just is minimum.
The embodiment of the invention is exactly through expansion AT command, lets " management software that TE2 is last " and " software that MT2 is last " can both support three kinds of codings of UCS2, thereby reaches the purpose of the most efficiently utilizing the SIM data space.Wherein, said TE2 can be portable machine, desktop computer; Operation wireless data card management software, perhaps " mobile phone synchronizing software " above, back literary composition general designation " management software that TE2 is last "; MT2 can be wireless data card, wireless Modem, mobile phone.
Wherein, expand two AT orders:
^CPBR, the command format that reads phone directory is:
^CPBR: < indexl >, < number >, < type >, < text >, < coding >; Wherein,
< index1>is the integer value, the position in the expression phone directory internal memory;
< number>character string type, telephone number;
< type>type of number;
< text>character string type, the expression name;
< coding>encoding scheme, the character code and the appointed language of expression < text>field, promptly last parameter < coding>can the presentation code pattern: 0 expression " GSM7 coding " only is used for the common Latin alphabets such as West Europe that 3GPP defines; 1 expression " three kinds of coded formats of UCS2 ".
^CPBW, the command format of writing phone directory is:
^CPBW: [< index >] [, < number>[, < type>[, < text >, < coding>[, email]]]]; Wherein, < index>is the integer value, the position in the expression phone directory internal memory;
< number>is telephone number, and its character string type comprises: ' 0-9 ', ' # ', ' * ', '+', ' (', ') ', '-'); Wherein, ' (', ') no matter ', '-' three character appear at any position, and handling procedure is all ignored them, can not report an error as forbidden character.
< type>is the type of number, wherein 145 expression international numbers;
< text>is character string type, expression name (not supporting carriage return, quotation marks character).
< coding>is encoding scheme, the character code and the appointed language of expression < text>field; Be that last parameter < coding>can the presentation code pattern: 0 expression " GSM7 coding " only is used for the common Latin alphabets such as West Europe that 3GPP defines; 1 expression " three kinds of coded formats of UCS2 ".
< email>character string type, expression email address.At present, this field is only effective when storage medium is usim card.
In writing the processing procedure of phone directory, according to user's input character, can judge dynamically that current which kind of coding is optimum, priority orders can be:
GSM7→UCS2?81→UCS2?82→UCS2?80
According to different coding, should point out whether overlength of character that the user writes on the pc client interface.Wherein, according to the character of said input, selecting coded format is GSM7 or UCS2 80; Further; Adopt UCS2 81 codings still to adopt UCS2 82 codings can pass through all UCS2 80 characters of traversal; As plot, other UCS2 80 characters calculate deviant, if deviant is in 127 minimum one of numerical value in UCS2 80 characters; Just can use UCS2 81 or 82 codings, otherwise can only use UCS2 80 codings.And according to the numerical value of plot, can further determine with 81 or 82 codings, if the minimum value of promptly described UCS2 80 characters in the represented scope of byte, selects UCS2 81 to encode; If the minimum value of described UCS2 80 characters in the represented scope of two bytes, selects UCS2 82 to encode.
For example:
AT^CPBR=1,50; (this order can send to the order of portable terminal for PC) is for reading 1 to 50 information of phone directory;
^CPBR:1,"9897867576567",129,"810F0898C0B8BDB02090C1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",1
Mentioned order is: read phone directory article one information, telephone number is 9897867576567, and name is " И р И H a Ac "; Wherein, ^CPBR reads the phone directory order; The position that the information of phone directory is read in 1 expression of closelying follow thereafter; The telephone number that " 9897867576567 " read; 129 expressions " telephone number "; " 810F0898C0B8BDB02090C1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF " representes character string type, i.e. name; Last parameter 1 presentation code scheme.
^CPBR:2,"78916783164987163487634",129,"80044D043A0441043F043B0443043004420430044604380438FF",1
Mentioned order is: read phone directory second information;
Its implication is: telephone number is 78916783164987163487634, and name is " э к с п л y a Ta ц И И "
OK
Can see; " И р И H a Ac " itself is that 8 characters (comprise 7 Cyrillic Chinese character; With a Latin character " space "), if according to the AT order of the 3GPP standard of prior art, need the SIM space of 16 bytes; Adopt " USC2 81 codings " now, only needed the SIM space of 11 bytes.
Except can expanding two above-mentioned AT orders, can also be through " UCS2 80/81/82 adaptive coding " form of increase in "+CSCS " order being reached the purpose of efficient use SIM phone directory memory space.
Storage/the read method and the device of a kind of client identification card phone directory that the embodiment of the invention is provided below in conjunction with accompanying drawing are described in detail.
As shown in Figure 1, the date storage method of a kind of client identification card that the embodiment of the invention provides, in the process that realizes the embodiment of the invention, this method comprises:
101: the character to be stored that receives input;
102:, select coded format according to the character to be stored of said input; Wherein, described coded format comprises: GSM7, UCS2 80, UCS2 81 and UCS2 82; It is dynamic that said coding is selected, and according to user's input character, can dynamically judge current which kind of optimum current character of encoding, and priority orders can be:
GSM7→UCS2?81→UCS2?82→UCS2?80
That is to say that character of the every input of user all can be selected a coded system according to the character that the user has imported, as when importing preceding four characters; Character of every input all calculates minimum base address and side-play amount, when finding to be passed to the 4th character; 81 codings are suitable, but when being passed to the 5th character, calculating the back and found base address improper 81; Can only select 82 algorithms, finally confirm all character input completion up to the user, according to all input character selected encoding modes;
103: according to selected coded format, the character of said input is encoded, obtain character code;
104: said character code is sent to portable terminal, indicate said portable terminal that said character code is stored in the said client identification card of said portable terminal.
Further, as shown in Figure 2, the date storage method of the client identification card that provides for the embodiment of the invention; In the process that realizes the embodiment of the invention, concrete step is following:
201: the character to be stored that receives input;
202: according to the user inputs character that main frame receives, selecting coded format is GSM7 or UCS280;
203: according to described selection coding lattice is UCS2 80, obtains the minimum value of UCS2 80 characters; And then, obtain the deviant of said UCS2 80 characters according to the minimum value of said UCS2 80 characters; With UCS2 80 characters of said deviant in 127, select UCS2 81 or UCS2 82 to encode; And if the minimum value of described UCS2 80 characters selects UCS2 81 to encode in the represented scope of byte; If the minimum value of described UCS2 80 characters in the represented scope of two bytes, selects UCS2 82 to encode.That is to say, finish, then travel through all UCS280 characters when the user confirms all character inputs; As plot, other character calculates deviant, if deviant is in 127 minimum one of the numerical value of UCS2 80 characters; Just can use 81 or 82 codings, otherwise can only use 80 codings.According to the numerical value of plot, can further determine with 81 or 82 codings, if the minimum value of promptly described UCS2 80 characters in the represented scope of byte, selects UCS2 81 to encode; If the minimum value of described UCS2 80 characters in the represented scope of two bytes, selects UCS2 82 to encode.
204: according to said selected coded format, the length restriction of prompting client identification card storage data.Be the whenever defeated character of user, all can select a kind of coded system that is fit to this character, calculate also to fail how many characters according to the storage restriction of SIM then according to current defeated character; Coded format according to storage restriction, current input character number and the current selection of SIM comes to confirm the SIM residual memory space current length restriction that can store data of client identification card just jointly.That is to say what characters the user can also store.
205: according to selected coded format, the character of said input is encoded, obtain character code;
206: said character code is sent to portable terminal, indicate said portable terminal that said character code is stored in the said client identification card of said portable terminal.
As shown in Figure 3, the date storage method of the another kind of client identification card that the embodiment of the invention provides, in the process that realizes the embodiment of the invention, this method comprises:
301: receive the first coding data that main frame sends; Said first coding data is the data that said main frame is encoded the character of user's input to obtain according to first coded format; Wherein, described first coding data form comprises: GSM7 or UCS2 80;
302:, select second coded format according to said first coding data; Promptly according to the said first coding data that receives, selecting coded format is GSM7 or UCS2 80 or UCS2 81 or UCS2 82;
If selected coded format is UCS2 80, can be further according to side-play amount and the minimum value of the UCS2 80 of the character of said user's input, selecting coded format is UCS2 81 and UCS2 82.
303:, said first coding data is transformed second coded data according to said second coded format; Said second coded data is the data that the character of said user's input is encoded and obtained according to second coded format;
304: said second coded data is stored in the said client identification card.
The date storage method of the client identification card that the embodiment of the invention provides is selected coded format through being user inputs character, and it is little to make that the coding of user inputs character takes up room, thereby improves the data storage capacity of client identification card phone directory; In prior art; Except Latin languages such as West Europe can be set to a byte code of GSM7 coded format; Other Languages uses the coding of two bytes of UCS2 80 codings to compare; The embodiment of the invention can also select to take the less UCS2 of memory space 81 codings and UCS282 coding, thereby makes the coding of user inputs character can take less memory space, improves the data storage capacity of client identification card phone directory.
As shown in Figure 4, the embodiment of the invention that provide with method for reading data said Fig. 1, corresponding a kind of client identification card shown in 2, this method comprises:
401: send data read command to portable terminal;
402: receive the coded data that said portable terminal obtains from the said client identification card of said portable terminal according to said data read command;
403: the coded format according to said coded data is decoded to said coded data.
Wherein, described coded format comprises: GSM7, UCS2 80, UCS2 81 and UCS2 82.
Step according to the coded format of described coded data is decoded to said coded data further comprises:
Resolve said coded data, obtain the coded format of said coded data;
According to the coded format of said coded data, said coded data is decoded.
As shown in Figure 5, the embodiment of the invention that provide with method for reading data said corresponding a kind of client identification card shown in Figure 3, this method comprises:
501: the reading command that receives main frame;
502:, from said client identification card, obtain second coded data according to said reading command; Said second coded data is the data that user data is encoded and obtained with second coded format;
503: convert said second coded data into first coding data; Said first coding data is the data that said user data is encoded and obtained with first coded format; This step further comprises:
Confirm the coded format of said second coded data; Wherein, said second coded format is GSM7 or UCS2 80 or UCS2 81 or UCS2 82;
According to the coded format of said second coded data, convert said second coded data into said first coding data, wherein, said first coded format is GSM7 or UCS2 80.
504: said first coding data is sent to said main frame.
The method for reading data of the client identification card that the embodiment of the invention provides through the instruction of user's input, obtains the coded data that the user needs; Coded format according to said data is decoded accordingly, thereby the character that the user can be discerned is shown to the user; In prior art, only can decode with the coded format of UCS2 80 and compare GSM7, the embodiment of the invention can also be supported UCS2 81 and UCS2 82 decodings simultaneously.
A kind of main frame as shown in Figure 6, that the embodiment of the invention provides, this main frame comprises:
Receiving element 601 is used to receive the character to be stored of input;
Coded format selected cell 602 is used for the character said to be stored according to input, selects coded format;
Coding unit 603 is used for according to the selected coded format of said coded format selected cell said character to be stored being encoded, and obtains coded data;
Transmitting element 604 is used for said coded data and store instruction are sent to portable terminal, and said portable terminal is used for according to said store instruction said coded data being stored in the client identification card of said portable terminal.
Further, as shown in Figure 7, the main frame that the embodiment of the invention provides also comprises:
Tip element 701: be used for according to the selected coded format of said coded format selected cell the length restriction of prompting client identification card phone directory storage data.
Said coded format selected cell 602 further comprises:
Coded format chooser unit 702: be used for the character according to said input, selecting coded format is GSM7 or UCS2 80;
Minimum value is obtained subelement 703: being used for according to described selection coding lattice is UCS2 80, obtains the minimum value of UCS280 character;
Deviant is obtained subelement 704: be used for the minimum value according to said UCS2 80 characters, obtain the deviant of said UCS2 80 characters;
Deviant coded format chooser unit 705: be used for UCS2 80 characters of said deviant in 127, select UCS2 81 or UCS2 82 to encode; And
Minimum value coded format chooser unit 706: if the minimum value that is used to select described UCS2 80 characters selects UCS2 81 to encode in the represented scope of byte; If the minimum value of described UCS2 80 characters in the represented scope of two bytes, selects UCS2 82 to encode.
A kind of portable terminal as shown in Figure 8, that the embodiment of the invention provides, this portable terminal comprises:
Receiving element 801 is used to receive the first coding data that main frame sends; Said first coding data is the data that said main frame is encoded the character of user's input to obtain according to first coded format;
Coded format selected cell 802: be used for selecting second coded format according to said first coding data; Wherein, said second coded format is GSM7 or UCS2 80 or UCS2 81 or UCS2 82.
Coded format conversion unit 803: be used for said first coding data being converted into second coded data according to said second coded format; Said second coded data is the data that the character of said user's input is encoded and obtained according to second coded format;
Client identification card 804: be used to store said second coded data.
As shown in Figure 9, the storage system of the data of a kind of client identification card that provides for the embodiment of the invention; This system comprises:
Main frame is used to receive the character to be stored of input, selects coded format according to said character to be stored, and according to the coded format of selecting said character to be stored is encoded, and obtains coded data, sends said coded data and store instruction;
Portable terminal is used to receive store instruction, according to said store instruction said coded data is stored in the said client identification card of said portable terminal.
Shown in figure 10, the storage system of the data of the another kind of client identification card that provides for the embodiment of the invention; This system comprises:
Main frame is used to receive the character of input, and the character of said input is encoded with first coded format, obtains first coding data, sends said first coding data;
Portable terminal is used to receive said first coding data, according to said first coding data, selects second coded format, is converted into second coded data according to the said first coding data of said second coded format; And in the said client identification card with said second coded data storage and said portable terminal; Said second coded data is the data that the character of said user's input is encoded and obtained according to second coded format.
The data storage device and the system of the client identification card phone directory that the embodiment of the invention provides; Through selecting coded format for user inputs character; It is little to make that the coding of user inputs character takes up room, thereby improves the data storage capacity of client identification card phone directory; In prior art; Except Latin languages such as West Europe can be set to a byte code of GSM7 coded format; Other Languages uses the coding of two bytes of UCS2 80 codings to compare; The embodiment of the invention can also select to take the less UCS2 of memory space 81 codings and UCS2 82 codings, thereby makes the coding of user inputs character can take less memory space, improves the data storage capacity of client identification card phone directory.
A kind of main frame shown in figure 11, that the embodiment of the invention provides comprises:
Command sending unit 1101 is used for sending data read command to portable terminal;
Coded data acquiring unit 1102: be used for receiving the coded data that said portable terminal obtains from the said client identification card of said portable terminal according to said data read command;
Decoding unit 1103: be used for said coded data being decoded according to the coded format of said coded data.
Wherein, said decoding unit 1103 further, can comprise:
Coded format judgment sub-unit: be used to resolve said coded data, obtain the coded format of said coded data;
Decoding subelement: be used for coded format, said coded data is decoded according to said coded data.
Portable terminal shown in figure 12, that the embodiment of the invention provides, this portable terminal comprises:
Subscriber identification card 1201 is used for the memory encoding data;
Receiving element 1202 is used to receive the reading command of main frame;
Information acquisition unit 1203: be used for according to said reading command, from said subscriber identification card, obtain second coded data; Said second coded data is the data that user data is encoded and obtained with second coded format;
Transcoder unit 1204: be used for converting said second coded data into first coding data; Said first coding data is the data that said user data is encoded and obtained with first coded format;
Information transmitting unit 1205: be used for said first coding data is sent to said main frame.
Said transcoder unit 1204 further, comprising:
Judgment sub-unit: the coded format that is used to judge said second coded data; Wherein, said second coded format is GSM7 or UCS2 80 or UCS2 81 or UCS2 82;
The code conversion subelement: be used for the coded format according to said second coded data, convert said second coded data into said first coding data, wherein, said first coded format is GSM7 or UCS2 80.
Shown in figure 13, the reading system of the data of a kind of client identification card that provides for the embodiment of the invention, said system comprises:
Main frame is used to send data read command, and the received code data are decoded to said coded data according to the coded format of said coded data;
Portable terminal is used to receive said data read command, from the said client identification card of said portable terminal, obtains said coded data according to said data read command.
Shown in figure 14, the reading system of the data of the another kind of client identification card that provides for the embodiment of the invention, said system comprises:
Main frame is used to send reading command, and receives first coding data;
Portable terminal is used to receive said reading command, from the said client identification card of said portable terminal, obtains second coded data; Convert said second coded data into said first coding data, and said first coding data is sent to said main frame; Said second coded data is the data that user data is encoded and obtained with second coded format; Said first coding data is the data that said user data is encoded and obtained with first coded format.
The data fetch device and the system of the client identification card phone directory that the embodiment of the invention provides through the instruction of user's input, obtain the coded data that the user needs; Coded format according to said data is decoded accordingly, thereby the character that the user can be discerned is shown to the user; In prior art, only can decode with the coded format of UCS2 80 and compare GSM7, the embodiment of the invention can also support UCS2 81 and UCS2 82 decodings and coding to transform simultaneously.
Description through above execution mode; One of ordinary skill in the art will appreciate that: realize that all or part of step in the foregoing description method is to instruct relevant hardware to accomplish through program; Described program can be stored in the computer read/write memory medium, and this program comprises the step like above-mentioned method embodiment when carrying out; Described storage medium, as: ROM/RAM, magnetic disc, CD etc.
The above; Be merely embodiment of the present invention, but protection scope of the present invention is not limited thereto, any technical staff who is familiar with the present technique field is in the technical scope that the present invention discloses; Can expect easily changing or replacement, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of claim.